1 2009-11-05 Sebastien Pouliot <sebastien@ximian.com>
3 * class.c: When CoreCLR is enabled don't call mono_init_com_types
4 if MONO_CLASS_IS_IMPORT return true unless the type reside in
5 platform (trusted) code. Instead we return a TypeLoadException to
6 be thrown later. This is the exception thrown by Silverlight 2 if
7 a type, inside application (user) code is marked with [ComImport]
9 2009-11-05 Zoltan Varga <vargaz@gmail.com>
11 * icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
12 mono_is_debugger_attached () too.
14 * mono-debug.c (mono_is_debugger_attached): New helper function.
15 (mono_set_is_debugger_attached): Ditto.
17 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
19 * class.c: Add missing check for load errors after every
20 call to mono_class_setup_fields
24 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
26 metadata-verify.c (verify_tables_schema): Fix the error message.
28 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
30 * metadata.c: Change event table schema to use TDOR for event type
31 as this is what it's meant to be.
33 * metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
34 to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
37 * metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
38 longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
39 rows in MONO_TABLE_GENERICPARAM.
43 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
45 * class.c (mono_image_add_to_name_cache): Assert on duplicate
48 * reflection.c (mono_reflection_setup_internal_class): Avoid
49 registering a gc root the same MonoClass multiple times.
50 Don't register nested types on the global scope as they should
51 not be available there.
53 2009-11-05 Rolf Bjarne Kvinge <RKvinge@novell.com>
55 * culture-info-tables.h: regenerated.
57 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
59 * debug-helpers.c: avoid g_strdup() in mono_type_full_name().
61 2009-11-04 Sebastien Pouliot <sebastien@ximian.com>
63 * string-icalls.c|h: Remove string internal calls that are not
64 used anymore by the class libraries.
65 * icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
66 which is not used in the class librairies.
67 * icall-def.h: Update tables.
69 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
71 * class.h: Move mono_class_inflate_generic_type_checked...
73 * class-internals.h: to here and make it internal. We don't want to
74 further expose MonoGenericContext.
76 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
78 * verify.c (mono_method_verify): Improve error message.
80 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
82 * reflection.c (fieldref_encode_signature): If field_image is NULL then
83 the token is already properly encoded. Fixs 4.0 build.
85 2009-11-04 Rolf Bjarne Kvinge <RKvinge@novell.com>
87 * locales.c (construct_number_format): Check if the number index is
88 valid before trying to use it, if not, just return.
90 2009-11-04 Zoltan Varga <vargaz@gmail.com>
92 * marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
93 since that loses the abort state. Fixes #539394.
95 2009-11-03 Zoltan Varga <vargaz@gmail.com>
97 * marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
98 explicit this argument to the call signature.
99 (mono_marshal_get_icall_wrapper): Ditto.
101 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
103 * reflection.c (fieldref_encode_signature): Add new field_image parameter
104 to indicate which assembly to use when resolving a custom-mod.
106 Fixes handling of volatile fields used across assemblies as reported in #551513.
108 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
110 * loader.c: Improve error messages.
112 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
114 * class.c (mono_class_setup_methods): Only give a slot for virtual methods
115 of interfaces. Fixes IKVM.
117 * class.c (mono_class_setup_vtable_general): Improve debug spew.
119 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
121 * verify.c (verifier_inflate_type): Return the inflated type on success.
123 2009-11-02 Zoltan Varga <vargaz@gmail.com>
125 * debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.
127 * threads.c (mono_thread_attach): Call the profiler thread start callback.
129 * object-internals.h (_MonoThreadInternal): Add a 'flags' field.
131 * threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
134 * profiler.c: Add new profiler callbacks for runtime invoke.
136 * object.c (mono_runtime_invoke): Call the runtime invoke callbacks.
138 2009-11-01 Mark Probst <mark.probst@gmail.com>
140 * sgen-gc.c: Keep track of the reason for a major collection and
141 write it to the heap-dump file.
143 2009-10-31 Miguel de Icaza <miguel@novell.com>
145 * threads.c: refactor the code that initializes the
146 thread_start_args into a reusable function and use this in the two
147 methods that start up threads.
149 2009-10-31 Zoltan Varga <vargaz@gmail.com>
151 * appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
152 Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.
154 2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
156 * mono-perfcounters.c: add the "_Total" instance for CPU counters.
157 Until now, we only had the per-cpu(core) counters.
159 2009-10-28 Mark Probst <mark.probst@gmail.com>
161 * gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
162 mono_gc_get_suspend_signal(), which returns the suspend signal
163 number used by the GC.
165 2009-10-25 Zoltan Varga <vargaz@gmail.com>
167 * threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.
169 * threads.c (start_wrapper): Call mono_profiler_thread_start () later after
170 signalling start_notify.
172 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
174 * appdomain.c: do not test the st_mode field for shadow-copies.
177 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
179 * threadpool.[ch]: added hooks for thread start/finish and item
180 processing begin/end. For monotouch use only.
182 2009-10-24 Zoltan Varga <vargaz@gmail.com>
184 * threads.c (mono_thread_get_name): New helper function.
186 * reflection.c (resolve_object): Set handle_class for strings too.
187 (mono_reflection_create_custom_attr_data_args): New helper function to decode
188 a cattr blob into a set of arrays and structures without creating the custom
189 attributes themselves.
190 (create_custom_attr_data): Simplify using create_custom_attr_data_args.
192 * mono-debug.c (mono_debug_il_offset_from_address): New helper function.
194 * debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
197 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
199 * verify.c: Replace calls to mono_class_inflate_generic_type with
200 mono_class_inflate_generic_type_checked. Fixes #480005.
202 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
204 * class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
205 object since not all paths lead to callees initing it.
207 2009-10-23 Alp Toker <alp@nuanti.com>
209 Fix embedding API breakage from r144688. mono-compiler.h is an internal
210 header and should not be shipped:
212 * class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
213 which is specific to the mono build. Not going to work.
215 2009-10-23 Sebastien Pouliot <sebastien@ximian.com>
217 * security-manager.c: Report if core-clr is active from
218 ves_icall_System_Security_SecurityManager_get_SecurityEnabled
219 to allow Moonlight BCL to behave appropriately (both in browser
220 and outside, e.g. smcs)
222 2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
224 * mono-config.c: ignore UTF-8 BOM and report parser errors.
227 2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
231 2009-10-22 Rodrigo Kumpera <rkumpera@novell.com>
233 * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
234 a MonoError parameter.
236 * class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
237 version that can does proper error handling.
239 * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
241 * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
243 * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.
245 2009-10-20 Zoltan Varga <vargaz@gmail.com>
247 * debug-helpers.c (dis_one): Fix the disassembly of empty strings when
248 NO_UNALIGNED_ACCESS is defined.
250 2009-10-22 Zoltan Varga <vargaz@gmail.com>
252 * marshal.c (mono_string_builder_to_utf16): Applied patch from
253 Hib Eris <hib@hiberis.nl>. Return empty string for empty string builders.
256 2009-10-22 Mark Probst <mark.probst@gmail.com>
258 * sgen-gc.c: Shorten sections whenever possible.
260 2009-10-22 Mark Probst <mark.probst@gmail.com>
262 * sgen-gc.c: Use our portable semaphore #defines.
264 2009-10-22 Mark Probst <mark.probst@gmail.com>
266 * sgen-gc.c: A debug option for dumping the heap layout to a file
267 after each collection.
269 2009-10-21 Mark Probst <mark.probst@gmail.com>
271 * sgen-gc.c: Make managed write barriers atomic via
274 2009-10-21 Rodrigo Kumpera <rkumpera@novell.com>
276 * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
277 methods. Fixes #543021.
279 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
281 * socket-io.[ch]: fix VS build.
283 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
286 * socket-io.[ch]: implemented SendFile.
288 2009-10-20 Zoltan Varga <vargaz@gmail.com>
290 * class.c (mono_class_create_from_typedef): Initialize class->element_class
291 before the interfaces to avoid crashes later if class initialization fails.
294 * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
297 2009-10-20 Marek Safar <marek.safar@gmail.com>
299 * domain.c: Bump 4.0 version.
301 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
303 * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
304 code is known. (parse_public_key) Remove duplicate (unneeded) NULL
305 check since 'pubkey' can't be NULL at this stage
306 * icall.c (ves_icall_System_Array_FastCopy): Add comment about
307 the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
308 initialization of 'iter'
310 2009-10-16 Bill Holmes <billholmes54@gmail.com>
312 * cominterop.c : Search the interface parts of vtable to find
313 method matches. Fixes 547030.
315 Code is contributed under MIT/X11 license.
317 2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
319 * marshal.c: BeginInvoke cannot be called on multicast delegates with
320 multiple targets. Fixes bug #574426.
322 2009-10-14 Massimiliano Mantione <massi@ximian.com>
324 * profiler.h: Put here the definition of
325 MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
326 (and fix the build...).
328 2009-10-14 Massimiliano Mantione <massi@ximian.com>
330 * profiler.c, profiler.h, profiler-private.h:
331 Added support for different ways of getting call chains in stat mode.
333 2009-10-12 Mark Probst <mark.probst@gmail.com>
335 * object.c, object-internals.h: New function for computing the
336 size of an array, factored out of mono_array_new_full(). Use
337 SGen's functions for allocating arrays and vectors.
339 * sgen-gc.c, gc-internal.h: Special functions for allocating
340 arrays and vectors without race conditions. A managed array
343 * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
345 2009-10-12 Mark Probst <mark.probst@gmail.com>
347 * object.c, object.h, icall.c: Write barriers do the copying now,
348 as well, so no need for an additional memcpy.
350 * sgen-gc.c: Lock when storing remsets. Do the memory
351 copying/moving in the write barriers.
353 * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
355 * reflection.c: Added an assert.
357 2009-10-12 Mark Probst <mark.probst@gmail.com>
359 * threads.c, process.c: A few missing write barriers.
361 2009-10-12 Joel W. Reed <joelwreed@gmail.com>
363 * mono-perfcounters.c, mono-perfcounters-def.h: Add
364 network performance counters for bytes sent per second, bytes
365 received per second, and bytes total per second.
367 Code is contributed under MIT/X11 license.
369 2009-10-09 Mark Probst <mark.probst@gmail.com>
371 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
374 2009-10-09 Mark Probst <mark.probst@gmail.com>
376 * threads.c, object-internals.h, object.c: Move code for
377 transferring an object to a different domain (via
378 serialization/remoting) to object.c.
380 * object.c (call_unhandled_exception_delegate): If the exception
381 is in a different domain than the delegate, transfer the exception
384 2009-10-07 Zoltan Varga <vargaz@gmail.com>
386 * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
389 2009-10-06 Zoltan Varga <vargaz@gmail.com>
391 * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
393 2009-10-06 Mark Probst <mark.probst@gmail.com>
395 * object.c (mono_method_return_message_restore): Handle the case
396 where the argument is an instance of a generic type. Fixes
399 2009-10-06 Mark Probst <mark.probst@gmail.com>
401 * object.c (set_value): Write barrier fix - we must pass the
404 2009-10-05 Zoltan Varga <vargaz@gmail.com>
406 * domain.c (mono_init_internal): Print a useful error message when encountering
407 an old mscorlib, instead of crashing. Fixes #544307.
409 2009-10-04 Zoltan Varga <vargaz@gmail.com>
411 * appdomain.c (copy_app_domain_setup): Fix a warning.
413 * debug-helpers.c (dis_one): Ditto.
415 2009-10-04 Mark Probst <mark.probst@gmail.com>
417 * domain-internals.h, appdomain.c: The AppDomainSetup is copied
418 into the new domain, instead of referencing the original one.
420 * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
423 * appdomain.c: Corlib version bump.
425 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
427 * threadpool.c: one more...
429 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
431 * threadpool.c: forgot a LeaveCriticalSection when telling the idle
432 threads to die because we're shutting down. delgate5.exe works again.
434 2009-10-01 Bill Holmes <billholmes54@gmail.com>
436 * cominterop.c (mono_marshal_free_ccw_entry): Updating the
437 ccw_interface_hash table when a ccw is finalized.
439 Code is contributed under MIT/X11 license.
441 2009-09-30 Mark Probst <mark.probst@gmail.com>
443 * assembly.c, domain.c, image.c, metadata-internals.h: Split
444 domain and image unloading into two steps. We must do this
445 because clearing the domain in SGen requires the class metadata to
446 be intact, but we need to free the mono_g_hash_tables in case a
447 collection occurs during domain unloading and the roots would trip
450 2009-09-30 Mark Probst <mark.probst@gmail.com>
452 * object-internals.h: Remove serialized culture fields from
455 * icall-def.h, thread-types.h, threads.c: Remove serialized
458 * appdomain.c: Corlib version bump.
460 2009-09-30 Zoltan Varga <vargaz@gmail.com>
462 * marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
465 2009-09-30 Mark Probst <mark.probst@gmail.com>
467 * sgen-gc.c: Try to shorten the new section after a major
468 allocation to avoid ever-growing sections.
470 2009-10-13 Martin Baulig <martin@ximian.com>
472 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
473 `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
474 `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
475 `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
477 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
479 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
481 * threadpool.c: fixed the order in which 'completed' and the wait
482 handle, if any, are set. Fixes bug #542933 and delegate2.exe
483 No need to use the wait_handle field of ASyncCall. Make sure the
484 threadpool is active when adding a job or queueing an idle thread.
486 2009-09-29 Zoltan Varga <vargaz@gmail.com>
488 * object.c (mono_unhandled_exception): Fix a crash if there is no main thread.
490 * threads.c (build_wait_tids): Fix a crash if there is no main thread, like
491 when using --compile-all.
493 2009-09-27 Mark Probst <mark.probst@gmail.com>
495 * metadata.c (free_generic_class): Unregister the field_objects
496 roots if we're using SGen.
498 2009-09-27 Mark Probst <mark.probst@gmail.com>
500 * reflection.c (mono_dynamic_image_free): Deregister the GC root
501 for GenericParamTableEntry.gparam.
503 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
505 * marshal.c: don't create the handle when calling. It is created later
508 2009-09-26 Mark Probst <mark.probst@gmail.com>
510 * sgen-gc.c: Warning fixes.
512 2009-09-26 Mark Probst <mark.probst@gmail.com>
514 * sgen-gc.c: New debug option "xdomain-checks", which scans the
515 whole heap for cross-domain references before each collection.
517 * sgen-scan-object.h: The scan action can now use SCAN to scan the
520 * threadpool-internals.h, threadpool.c: New function
521 mono_thread_pool_is_queue_array() for checking whether a given
522 array is used as a (cross-domain) queue by the thread pool code.
524 2009-09-26 Mark Probst <mark.probst@gmail.com>
526 * sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
527 searches the whole heap for objects containing a specific
528 reference. Only for debugging.
530 2009-09-26 Mark Probst <mark.probst@gmail.com>
532 * appdomain.c (MONO_CORLIB_VERSION): Bumped.
534 * icall-def.h, threads.c, threads-types.h: New icalls for copying
535 byte arrays between domains.
537 2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
541 * mono-perfcounters-def.h:
542 * mono-perfcounters.c:
543 -There is a list of idle threads
544 -Each of those idle threads wait on their own WaitHandle instead
545 of all of them using the same semaphore. When a new work item is
546 added, the job is assigned directly to an idle thread or a newly
547 created one if possible and then the handle for that thread is
548 signaled. Compare that to the current approach where all the
549 threads in the pool compete to dequeue a job from the same
551 -New struct ThreadPool that brings together the bunch of static
552 variable for each threadpool (IO and regular).
553 -New performance counters: # of items added and its rate per
554 threadpool. The rate will be used later, perhaps together with
555 other perf. counters, to decide when idle threads should exit.
557 2009-09-25 Jonathan Chambers <joncham@gmail.com>
559 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal):
560 Fix typo on Windows build.
561 (ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
563 Code is contributed under MIT/X11 license.
565 2009-09-25 Mark Probst <mark.probst@gmail.com>
567 * object-internals.h: The Thread class is split up into Thread and
568 InternalThread now. We have exactly one InternalThread per
569 thread, and at most one Thread per appdomain per thread. Most
570 data is stored in InternalThread. All InternalThread objects live
573 * class-internals.h: Add internal_thread_class to MonoDefaults.
575 * appdomain.c (mono_domain_unload), attach.c (receiver_thread),
576 domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
577 socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
578 resulting from the split of the Thread class.
580 * gc-internal.h: Prototype for new function for checking whether a
581 thread is the finalizer thread.
583 * appdomain.c: Corlib version bump.
585 2009-09-25 Rolf Bjarne Kvinge <RKvinge@novell.com>
587 * appdomain.c|h: Add a mono_domain_try_unload method which is
588 equivalent to mono_domain_unload, except that it returns an exception
589 instead of throwing it. Make mono_domain_unload use the
590 mono_domain_try_unload method to avoid code-duplication.
592 2009-09-25 Zoltan Varga <vargaz@gmail.com>
594 * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
597 2009-09-24 Zoltan Varga <vargaz@gmail.com>
599 * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
600 aborting when a conversion is not implemented.
602 2009-09-23 Miguel de Icaza <miguel@novell.com>
604 * verify.c: when comparing culture strings, use g_ascii_strcmp
606 * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
607 when comparing public key tokens to use memcmp on 16 bytes. I do
608 not believe this ever worked as advertised in the past.
610 The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
611 which would have always failed earlier.
613 2009-06-25 Miguel de Icaza <miguel@novell.com>
615 * gc.c: Raise a NullArgumentException if the object passed is
618 2009-09-22 Zoltan Varga <vargaz@gmail.com>
620 * image.c (mono_image_close): Atomically decrement the reference count and
621 remove the image from the hash tables, to prevent another thread from seeing a
622 dying MonoImage. Fixes #541194.
624 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
626 * threadpool.c: actually use the minimum number of 'completion ports'
627 (for us is just a potential worker thread).
629 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
631 * threadpool.c: remove ares_htable. It does not make sense any more
632 since the same objects are now stored in GC-tracked arrays while they are
635 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
637 * threadpool.c: increase the minimum length of the queues to 128.
640 2009-09-21 Zoltan Varga <vargaz@gmail.com>
642 * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
643 return the modified signature used by string ctors.
645 2009-09-20 Zoltan Varga <vargaz@gmail.com>
647 * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
648 to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
649 method, to be used by full-aot.
651 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
653 Since the runtime supports lazy initialization of a type's vtable and this can cause a type
654 to fail, we need to ensure that the vtable is properly initialized at spots were the type must
657 * class.c (mono_class_init): Fail array types if their element type fails initialization
660 * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
661 initialization, additionally we request the element_type vtable to be initialized as well.
663 This is fine and should not increase the working set in any meaningful way since it's reasonable
664 to assume that most code will create an array and eventually populate it, which will require the
665 type's vtable to be initialized.
667 * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
669 2009-09-17 Atsushi Enomoto <atsushi@ximian.com>
671 * normalization-tables.h : regenerated.
673 2009-09-16 Zoltan Varga <vargaz@gmail.com>
675 * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
676 a leb128 encoding can take up to 5 bytes.
678 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
680 * class.c (verify_class_overrides): Remove useless argument.
682 * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
683 before interface enumeration as this is no longer required.
685 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
687 * class.c: New function mono_class_is_assignable_from_slow that is safe to be
688 used under mono_class_init context. This functions avoid any code path that
689 calls mono_class_init, which leads it to be slow as some things like the interface
690 bitmap are not available.
692 * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
693 of it's own broken version. Fixes the verifier part of #538588.
695 * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
698 2009-09-15 Mark Probst <mark.probst@gmail.com>
700 * class.c (mono_class_init): Always set an exception in a class if
701 vtable setup fails. Fixes #538577.
703 * generic-sharing.c: Raise an exception if mono_class_vtable()
706 2009-09-13 Zoltan Varga <vargaz@gmail.com>
708 * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance
709 methods of vtypes, as they could be incorrectly shared with static methods
710 taking an IntPtr argument.
712 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
716 * class-internals.h: renamed waithandle_class to
717 manualresetevent_class.
718 * marshal.c: propagate the exception if a remoting BeginInvoke call
721 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
723 * object.c: Properly handle vtable failures.
725 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
727 * socket-io.c: Assert on vtable failure.
729 * mono-mlist.c: Assert on vtable failure.
731 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
733 * marshal.c: Assert on vtable failure.
735 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
737 * icall.c: Properly handle vtable failures.
739 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
741 * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
743 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
745 * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
747 * console-unix.c (do_console_cancel_event): Same.
749 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
751 * class-internals.h: Add mono_class_vtable_full function that allows control
752 if an exception should be raised or not.
754 * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
755 to do what its documentation say, that is to return NULL and set exception_type on
758 * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
759 and change the code to honor it.
761 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
763 * verify.c: Fix typo in error message.
765 2009-09-10 Sebastien Pouliot <sebastien@ximian.com>
767 * security-core-clr.c: Fix default_platform_check so it can run
768 the runtime coreclr tests (without an infinite recursion when
769 throwing an exception).
771 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
773 object.c (mono_delegate_ctor_with_method): Guard against null method.
775 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
777 * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
778 that should be replaced with error handling later.
780 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
782 * marshal.c (mono_delegate_end_invoke): Fix warning.
784 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
786 * loader.c (mono_field_from_token): Properly handle invalid
789 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
791 * pedump.c (verify_image_file): Skip types that can't be
794 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
796 * verify.c: Look for recursive valuetypes only against the
797 type been initialized as this is a lot simpler and works.
799 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
801 * verify.c: Ensure that fields are properly loaded before
804 2009-09-10 Bill Holmes <billholmes54@gmail.com>
806 * object.c (mono_object_get_virtual_method) : Call
807 mono_cominterop_get_invoke if the object is a COM object.
809 Code is contributed under MIT/X11 license.
811 2009-09-09 Rodrigo Kumpera <rkumpera@novell.com>
813 * verify.c: Check for recursive valuetype definitions.
815 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
817 Use inheritance-aware interface offsets. Inherited types use the same offsets
818 of their parents. This reduce offset duplication in case more than one type in
819 the inheritance tree explicitly implements the same interface.
821 This also removes a source of vtable bubbles found in #532409. An abstract type
822 isn't required to provide abstract methods to all interfaces it implements, which
823 resulted in a bubble with the previous scheme as the child would get a non-full
824 vtable from its parent. We fail all concrete types with vtable bubbles, so this
827 This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
828 it's expected to not cause any significant increase beyond that.
830 * class.c (setup_interface_offsets): Compute super class iface offsets
831 first to force sharing.
833 * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
834 dumping only the relevant ones.
836 * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
837 methods a new slot regardless if they belong to an interface or not. This allows
838 an inherited type to override the iface method separately from the class one.
840 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
842 * threadpool.c: make the Sleep() alertable to prevent delays exiting
843 applications that take less than 2s to execute.
846 2009-09-04 Zoltan Varga <vargaz@gmail.com>
848 * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
850 * object.c (mono_get_runtime_callbacks): New helper function to return
851 the runtime callbacks.
853 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
854 mono_get_runtime_build_info () as the display name.
856 2009-09-03 Zoltan Varga <vargaz@gmail.com>
858 * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
859 argument, since NEWARR expects a native int. Fixes #481559.
861 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
863 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
864 against broken SRE methods.
866 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
868 * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
869 a NULL variable. Abort early on failure.
871 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
873 * class.c (can_access_type): Fail visibility test for non nested
874 types with nested visibility.
876 2009-09-02 Sebastien Pouliot <sebastien@ximian.com>
878 * assembly.c (parse_public_key): Avoid allocating (and not
879 freeing) the public key array when it's not requested by the
881 * threads.c (mono_thread_manage, mono_thread_create_internal,
882 ves_icall_System_Threading_Thread_Thread_internal): Free
883 allocated memory on error.
885 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
887 * icall.c, icall-def.h: Remove some dead code from early SRE changes.
889 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
891 * class.c (mono_class_setup_fields): Remove duplicated local variable
893 Rename gklass to gtd to reflect the fact that it points to the generic
895 Remove the duplicated call to mono_class_setup_fields on gtd and move
896 the error check to the beginning.
898 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
900 * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
901 Remove cruft of the previous patch.
903 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
905 * metadata-verify.c (verify_method_table): Check for abstract + final.
908 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
910 * verify.c (verify_class_fields): Check for duplicate fields.
912 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
914 * metadata-verify.c: Verify the typeref table for duplicates.
916 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
918 This reverts r140936 and properly handles interfaces with static methods. The
919 right fix is to ensure vtables without bubles which is an easier to verify
920 constraint. We should avoid such special cases as of the reverted patch as those
921 only make the runtime more brittle.
923 * class.c (mono_class_setup_vtable_general): Revert previous change that handle
924 static methods on interfaces.
926 * class.c (setup_interface_offsets): Use the number of virtual methods when
927 calculating interface offsets instead of the number of methods. This way we
928 avoid bubles on the layout.
930 2009-08-31 Rodrigo Kumpera <rkumpera@novell.com>
932 * metadata-verify.c (verify_metadata_header): Some very smart
933 obfuscators like to add extra stream headers. Ignore them.
935 2009-08-30 Zoltan Varga <vargaz@gmail.com>
937 * class.c (mono_class_setup_vtable_general): Verify interfaces with static
940 2009-08-29 Rodrigo Kumpera <rkumpera@novell.com>
942 * metadata-verify.c: Verify for duplicated types.
944 2009-08-28 Rodrigo Kumpera <rkumpera@novell.com>
946 * metadata-verify.c (verify_typedef_table): Verify for nested types
947 without an entry on the nested class table.
949 2009-08-28 Zoltan Varga <vargaz@gmail.com>
951 * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
952 <tom_hindle@sil.org>. Add locking around hash table accesses.
954 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
956 * verify.c (mono_verifier_verify_class): Verify all interface if
957 really are interfaces. Fixes #534184.
959 2009-08-27 Rodrigo Kumpera <rkumpera@novell.com>
961 * pedump.c: Initialize all types during metadata validation so we report
962 errors only detected as part of class initialization.
964 2009-08-26 Rodrigo Kumpera <rkumpera@novell.com>
966 * metadata-verify.c (verify_method_table): PInvoke requires method to
967 be static. Fixes #534189
969 2009-08-26 Zoltan Varga <vargaz@gmail.com>
971 * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
974 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
976 * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
977 for holes or bad methods. Fixes #525314.
979 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
981 * class.c (setup_interface_offsets): Don't allocate slot
982 for the same interface multiple times. This creates bubbles
983 that waster space and make vtable verification harder.
985 The same interface get a slot multiple times since we need
986 to get the closure of all implemented interfaces, which means
987 the same interface is reported multiple times.
989 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
991 * verify.c (mono_verifier_verify_class): Don't check the fields
992 of generic instances since the context on which they got expanded
993 might lead to false positives.
995 Such thing happens when a generic type is inflated in the context
996 of a generic method and the inflated type of a field turns into a
997 generic method argument, which causes the checking code to think
998 it's an invalid class when it's not.
1000 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
1002 * verify.c (mono_type_is_valid_in_context): Verify if type
1003 is NULL and remove duplicate test.
1005 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
1007 * verify.c (mono_verifier_verify_class): Check fields for
1008 invalid generic arguments.
1010 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
1012 * class.c (verify_class_overrides): Verify if for static
1013 and non virtual methods.
1015 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
1017 * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
1018 Check for errors after retrieving the vtable.
1020 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
1022 * class.c (mono_class_setup_vtable_general): Verify
1023 if method overrides are valid before processing them.
1025 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
1027 * marshal.c (mono_array_to_lparray): Fix minimal build with
1028 cominterop disabled.
1030 * marshal.c (mono_free_lparray): Same.
1032 2009-08-21 Mark Probst <mark.probst@gmail.com>
1034 * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
1035 the hash function for the ares_htable.
1037 2009-08-20 Rodrigo Kumpera <rkumpera@novell.com>
1039 * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
1040 bit for assembly flags. MS is ok with it but there is no spec anywhere
1043 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1045 * class.c (mono_class_create_from_typedef): Emit profiler events
1048 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1050 * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
1051 Release memory on failure.
1053 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1055 * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
1056 to the internal API.
1058 * metadata.c (get_constraints): Use a single-linked table as we don't
1059 traverse it backward. Fail and return FALSE if only of the contraint types
1062 * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
1063 to mono_metadata_load_generic_param_constraints except for having a return value.
1064 This has to be done since the later is part of the public API.
1066 * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
1069 * loader.c (mono_get_method_from_token): Properly check the loading of constraints
1070 and fail the method.
1072 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1074 * metadata-verify.c (is_valid_method_header): Add work-around to deal
1075 with MS broken behavior of emmitting EH section sizes without the
1078 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1080 * metadata.c (mono_type_create_from_typespec): Don't allocate image
1081 memory until we're sure that we'll need it. This avoids leaking for
1082 broken types or duplicated instantiation.
1084 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1086 * metadata-verify.c (is_valid_method_header): Fix stupid formating
1089 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1091 * metadata-verify.c (is_valid_method_header): Fix number of clauses
1092 and expected size calculation.
1094 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1096 * class.c (mono_class_get_field_idx): Add fixme for broken
1097 behavior for types with multiple fields with the same name.
1098 I would rather fix it, but have no idea on how to generate
1099 such artifact for testing.
1101 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1103 * verify.c (verifier_load_field): We should allow references to
1104 fields to be made using the generic type definition. It's up to
1105 the loader system to fail invalid ops.
1107 * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
1110 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1112 * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
1114 * metadata-internals.h: Fix declaration of
1115 mono_metadata_interfaces_from_typedef_full.
1117 * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
1118 heap_alloc_result parameter that controls if the result should be
1121 * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
1122 array be g_malloc'd and properly document this public API function.
1124 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1126 * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
1127 remove METHOD_HEADER_TINY_FORMAT1.
1129 * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
1131 * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
1133 Both spec and MS uses only 2 bits to enumerate the kind of header.
1134 So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
1135 is superfluous, only used for tiny headers with odd code lengths.
1137 This change also make sure that mono doesn't wronly interpret bit 2
1138 of fat header flags, which is currently reserved.
1140 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1142 * metadata.c (do_mono_metadata_parse_type): Do error
1143 checking for element types. Don't abort if presented
1144 with a broken type kind.
1146 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1148 * metadata.c (mono_metadata_parse_method_signature_full):
1149 Gracefully fail bad vararg signatures.
1151 2009-08-18 Christian Hergert <chris@dronelabs.com>
1154 * class.c: Fix warnings for uninitialized variables.
1156 2009-08-18 Christian Hergert <chris@dronelabs.com>
1158 * icall.c: Fix _NSGetEnviron method declaration warning.
1160 2009-08-18 Christian Hergert <chris@dronelabs.com>
1163 * reflection.c: Make bitwise checks explicit.
1165 2009-08-18 Christian Hergert <chris@dronelabs.com>
1168 * marshal.c: Fix printf warnings.
1170 2009-08-18 Zoltan Varga <vargaz@gmail.com>
1172 * reflection.c (encode_cattr_value): Fix a warning.
1174 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1176 * metadata.c (mono_metadata_parse_array_full): Fix memory leak
1179 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1181 * loader.c (mono_method_signature): Don't assert on broken
1182 signature. Print a more useful error message.
1184 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1186 * loader.c (mono_method_get_marshal_info): Assert if
1187 signature is invalid. Bounds check stores to the
1190 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1192 * loader.c (field_from_memberref): Fix warning.
1194 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1196 * loader.c (mono_method_get_param_names): Check if signature
1197 is null. Don't store beyond the size of the name array.
1199 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1201 * loader.c (mono_get_method_constrained): Check if signature
1204 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1206 * loader.c (mono_loader_set_error_bad_image): Improve
1209 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1211 * loader.c (mono_get_method_full): Convert an assertion
1212 into a loader error.
1214 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1216 * class-internals.h, class.c: Better naming and documentation.
1218 2009-08-17 Zoltan Varga <vargaz@gmail.com>
1220 * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
1223 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1225 * loader.c (mono_method_get_signature_full): Fail gracefully if signature
1228 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1230 * loader.c (mono_loader_error_prepare_exception): Handle missing field
1231 errors with no class set.
1233 * loader.c (field_from_memberref): If the field signature is of the wrong
1234 type fail with a MissingFieldException instead of a BadImageException as
1235 this is the behavior observed on MS.
1237 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1239 * loader.c (field_from_memberref): Don't crash if either the field
1240 signature or the typespec class are invalid.
1242 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1244 * verify.c (verifier_load_field): Don't allow field related
1245 ops to reference fields on generic type definition.
1247 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1249 * metadata-verify.c: Add new warning level for errors specified
1250 by ECMA 335 but that MS ignores.
1252 * metadata-verify.c (verify_method_table): Make compiler controled
1253 visibility + (rt)specialname error a warning as MS ignores this. Ignoring
1254 this check is safe because the end result will only be some visibility
1255 exceptions been thrown.
1257 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1259 * verify.c (get_boxable_mono_type): Don't allow the
1260 use of the generic type definition on boxed type positions.
1264 2009-08-14 Mark Probst <mark.probst@gmail.com>
1266 * threadpool.c: Make sure no cross-domain references remain in
1267 ares_htable or the arrays that are thrown away when resizing.
1269 2009-08-14 Mark Probst <mark.probst@gmail.com>
1271 * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
1272 list of classes for which we have to unregister reflection_info
1273 with the GC and which are not in the namespace cache.
1275 * reflection.c (mono_reflection_initialize_generic_parameter): Add
1276 the class to the list.
1278 2009-08-14 Mark Probst <mark.probst@gmail.com>
1280 * domain.c (mono_domain_free): Unregister the GC roots in
1283 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
1285 * reflection.c (mono_reflection_type_get_handle): Fix typo.
1287 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
1289 * class.c: Add mono_class_get_field_from_name_full which does
1290 the same as mono_class_get_field_from_name but does check field
1293 * class-internals.h: Export mono_class_get_field_from_name_full as
1294 part of the internal API.
1296 * loader.c (field_from_memberref): Search fields by name and signature
1297 as it's valid to have two fields with same name but different types.
1301 2009-08-10 Rodrigo Kumpera <rkumpera@novell.com>
1303 * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
1305 * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
1307 * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
1310 2009-08-13 Zoltan Varga <vargaz@gmail.com>
1312 * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
1314 * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
1316 2009-08-12 Mark Probst <mark.probst@gmail.com>
1318 * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
1319 to sgen-scan-object.h, which can be included and parameterized via
1322 * Makefile.am: sgen-scan-object.h added.
1324 2009-08-12 Mark Probst <mark.probst@gmail.com>
1326 * gc.c: #define GC_dont_gc if we're compiling with SGen.
1328 2009-08-12 Mark Probst <mark.probst@gmail.com>
1330 * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
1331 before clearing a domain in the GC.
1333 2009-08-12 Mark Probst <mark.probst@gmail.com>
1335 * exception.c (mono_exception_from_name_domain): Actually create
1336 the exception in the specified domain.
1338 * appdomain.c (mono_domain_create_appdomain_internal): Create the
1339 OutOfMemoryException a bit later so that the domain is inialized
1340 "enough" that it works.
1342 2009-08-12 Mark Probst <mark.probst@gmail.com>
1344 * threads.c (thread_cleanup): Clean up the cached_culture_info
1345 array to prevent cross-domain references.
1347 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
1349 * metadata.c: more documentation for MonoType accessors.
1351 2009-08-11 Raja R Harinath <harinath@hurrynot.org>
1353 Fix incorrect size definitions where the tail array isn't a list
1355 * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
1357 * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
1358 * metadata.h (MONO_SIZEOF_TYPE): Likewise.
1359 * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
1361 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1364 * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
1366 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1370 * metadata-internals.h:
1372 * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
1374 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1381 * reflection.c: #define for sizeof in MonoType and
1382 MonoMethodSignature.
1384 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1387 * domain-internals.h: add and use #define's instead of sizeof()
1388 for MonoJitInfo and MonoJitInfoTable.
1390 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1393 * class.h: use #define instead of sizeof() for MonoRemoteClass.
1395 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1400 * class-internals.h:
1401 * generic-sharing.c:
1402 * marshal.c: use a #define instead of sizeof() for a few
1403 structures that use a zero-length array.
1405 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com>
1407 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
1408 to handle inflated generic methods.
1410 * appdomain.c: Bump corlib version.
1412 * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
1415 * reflection.c (fixup_method): Same
1417 * reflection.c (resolve_object): Same.
1419 * reflection.c (inflate_method): Replace a g_assert_not_reached with a
1420 g_error and a decent message.
1422 2009-08-06 Massimiliano Mantione <massi@ximian.com>
1424 * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
1425 from the object because it could not yet be available globally
1426 (it happens if the profiler tries to create a gchandle on the
1427 MonoThread object of a thread that is still registering itself
1430 2009-08-04 Rodrigo Kumpera <rkumpera@novell.com>
1432 * reflection.c (mono_generic_class_get_object): Initialized the
1433 managed type arguments array.
1435 * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
1437 * appdomain.c: Bump corlib version.
1439 2009-08-04 Zoltan Varga <vargaz@gmail.com>
1441 * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
1444 2009-08-03 Zoltan Varga <vargaz@gmail.com>
1446 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
1447 Avoid a crash if synch_cs is not set.
1449 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
1450 Handle the case when the handle is 0.
1452 * appdomain.c: Bump corlib version.
1454 2009-08-02 Zoltan Varga <vargaz@gmail.com>
1456 * reflection.c (mono_type_get_object): Fix a warning.
1458 2009-08-01 Mark Probst <mark.probst@gmail.com>
1460 * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
1461 descriptor here. We assume it's already been computed.
1463 * generic-sharing.c (instantiate_other_info): Compute the GC
1464 descriptor for info type MONO_RGCTX_INFO_KLASS.
1466 2009-08-01 Mark Probst <mark.probst@gmail.com>
1468 * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
1469 type, so don't use MONO_OBJECT_SETREF to set a field.
1471 2009-08-01 Mark Probst <mark.probst@gmail.com>
1473 * gc.c: We were missing one case where invoking a finalizer would
1474 not reset the domain. Also, in the finalizer thread loop, assert
1475 that we're in the root domain.
1477 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1479 * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
1480 if the type is not an array.
1482 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1484 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
1485 method bound to the declaring type of the method. Raise an exception
1486 if the type is not a generic param.
1488 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1490 * class.c (print_unimplemented_interface_method_info): Print the
1493 * class.c (mono_class_setup_vtable_general): When dealing with a
1494 generic instance first check if the generic type definition is
1497 2009-02-11 Tom Hindke <tom_hindle@sil.org>
1499 * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
1501 * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
1503 * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
1505 * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
1507 * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
1509 Code is contributed under MIT/X11 license
1511 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
1513 * verify.c: Fix naming of stelem and ldelem.
1515 2009-07-30 Mark Probst <mark.probst@gmail.com>
1517 * generic-sharing.c: Replace the templates lock with the loader
1518 lock because of very hard to resolve deadlock issues.
1520 2009-07-30 Zoltan Varga <vargaz@gmail.com>
1522 * icall.c (ves_icall_Type_GetMethodsByName): Use
1523 mono_class_get_vtable_size () instead of accessing klass->vtable_size
1524 directly. Fixes #525338.
1526 * class.c (mono_class_get_vtable_size): New helper function.
1528 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
1529 the field belongs to the type. Fixes #525733.
1531 2009-07-30 Mark Probst <mark.probst@gmail.com>
1533 * sgen-gc.c: When we stop a thread and its stack top is not within
1534 its allocated stack (because it's in an altstack signal handler),
1535 restart it and stop it again, until it is.
1537 2009-07-30 Mark Probst <mark.probst@gmail.com>
1539 * sgen-gc.c: Take a thread's stack top and registers from the
1540 sigcontext in the suspend signal handler.
1542 * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
1543 stuff to sgen-archdep.h.
1545 * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
1546 caller, because have code in sgen-archdep.h to acquire that data.
1548 2009-07-29 Massimiliano Mantione <massi@ximian.com>
1550 * profiler.c, profiler.h, profiler-private.h:
1551 Added support for keeping track of code chunks and buffers.
1553 2009-07-29 Rodrigo Kumpera <rkumpera@novell.com>
1555 * metadata-verify.c: Fix endianness problems on decoding functions.
1556 Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
1558 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
1560 * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
1561 schema for vectors and one dimension SZARRAY.
1563 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
1565 * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
1566 schema for vectors and one dimension SZARRAY.
1568 2009-07-27 Mark Probst <mark.probst@gmail.com>
1570 * icall-def.h, thread-types.h, threads.c: New separate icalls for
1571 Interlocked.(Compare)Exchange with object arguments, which invoke
1574 2009-07-26 Miguel de Icaza <miguel@novell.com>
1576 * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
1577 passed invalid arguments. Fixes another crasher in the
1578 Silverlight test suite.
1580 * class.c (mono_class_array_element_size): Return 0 for the size
1581 of the class; This fixes the crasher exposed by :
1583 typeof (void).MakeArrayType ();
1585 * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
1586 if there is no method to dereference. Put all the code that
1587 depends on this inside the if (method) block.
1589 This fixes the crasher exposed by Microsoft's Silvelright CLR test
1590 suite ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
1592 With this change, we pass the test.
1594 * reflection.c (mono_reflection_sighelper_get_signature_local):
1595 Only dereference the assembly if it has been set. Fixes a
1596 crasher exposed by #525328
1598 2009-07-25 Mark Probst <mark.probst@gmail.com>
1600 * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
1601 don't perform the store in mono_gc_wbarrier_generic_nostore().
1602 Remove the second argument (value), which is not needed.
1604 2009-07-24 Zoltan Varga <vargaz@gmail.com>
1606 * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
1609 * boehm-gc.c: Ditto.
1611 2009-07-24 Mark Probst <mark.probst@gmail.com>
1613 * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
1614 not perform the store itself. Introduce
1615 mono_gc_wbarrier_generic_nostore(), which is the same as
1616 mono_gc_wbarrier_generic_store(), except it doesn't perform the
1619 2009-07-24 Mark Probst <mark.probst@gmail.com>
1621 * icall.c (ves_icall_System_Array_SetGenericValueImpl):
1622 mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
1623 we still need the memcpy().
1625 2009-07-22 Mark Probst <mark.probst@gmail.com>
1627 * sgen-gc.c: Align array bounds calculation to mono_array_size_t
1628 so that big arrays are handled correctly. Always use
1629 safe_object_get_size() to calculate array object sizes, which
1630 takes bounds into account.
1632 2009-07-22 Mark Probst <mark.probst@gmail.com>
1634 * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
1635 GC descriptor is computed before we use it.
1637 2009-07-22 Mark Probst <mark.probst@gmail.com>
1639 * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
1640 write barrier if necessary.
1642 2009-07-22 Mark Probst <mark.probst@gmail.com>
1644 * icall-def.h, icall.c, thread-types.h: New separate icall for
1645 VolatileWrite(object&,object) that uses a write barrier.
1647 * console-unix.c, file-io.c, icall.c, threads.c: Use write
1648 barriers in icalls which write to "ref" or "out" arguments.
1650 2009-07-21 Zoltan Varga <vargaz@gmail.com>
1652 * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
1653 handler in a separate icall, to reduce the size of the wrappers.
1655 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1657 * metadata-verify.c (is_valid_typespec_blob): Fix error message.
1659 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1661 * metadata-verify.c (parse_field): Allow byref field.
1663 * metadata-verify.c (parse_locals_signature): Allow byref locals.
1665 * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
1667 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1669 * verify.c (do_cast): Fail for any non reference type that isn't boxed.
1672 2009-07-20 Robert Jordan <robertj@gmx.net>
1674 * cominterop.c (cominterop_get_managed_wrapper_adjusted):
1675 Fix invalid IL in valuetype handling (STOBJ must push the
1676 corresponding class). Fixes bug #523149.
1678 Code is contributed under MIT/X11 license.
1680 2009-07-20 Geoff Norton <gnorton@novell.com>
1682 * gc.c: Use proper semaphores where available on posix and darwin.
1684 2009-07-19 Geoff Norton <gnorton@novell.com>
1686 * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
1688 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
1690 * refletion.c (is_sre_usertype): Change name to is_usertype and
1691 invert it's result so it returns true if the type is an user type
1692 and not the opposite.
1694 * reflection.c (is_*_type): Change all of those to use new macro
1695 check_corlib_type_cached that cached the type lookup so we don't
1696 need to do string comparisons all the type. Changed the signature
1697 to take a MonoClass instead.
1699 * reflection.c: Change mono_image_create_token and resolve_object
1700 to use is_sre_* functions.
1702 2009-07-18 Mark Probst <mark.probst@gmail.com>
1704 * sgen-gc.c: Check for writes to the stack in the managed
1707 2009-07-18 Mark Probst <mark.probst@gmail.com>
1709 * sgen-gc.c: When a thread is unregistered, don't free its remsets
1710 but put them on a list which is processed with the other thread's
1713 2009-07-18 Mark Probst <mark.probst@gmail.com>
1715 * sgen-gc.c: Fix and enable the internal allocator instead of
1716 using malloc/free (which causes deadlocks).
1718 2009-07-16 Rodrigo Kumpera <rkumpera@novell.com>
1720 * refletion.c: Fix builds with SRE disabled by adding a minimal
1721 implementation of mono_reflection_type_get_handle.
1723 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1725 * refletion.c: Make mono_reflection_type_get_handle non static.
1727 * object-internals.h: Export mono_reflection_type_get_handle.
1729 * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
1730 unmanaged handle using mono_reflection_type_get_handle.
1732 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1734 * refletion.c: Replace all reads of MonoReflectionType::type with
1735 calls to mono_reflection_type_get_handle. Only the functions that
1736 deal with constructing TypeBuilder::type have not been changed
1737 because they have to deal with NULL values.
1739 This is a first step into supporting reflection types that don't
1740 map directly into their unmanaged counterpart.
1742 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1744 * metadata-verify.c (parse_locals_signature): Don't complain
1745 on signature with zero locals since MS generates it and doesn't
1748 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1750 * reflection.c (mono_image_get_array_token): Resolve return
1751 type using mono_reflection_type_get_handle.
1753 * reflection.c (mono_image_get_array_token): Resolve array method
1754 parent type using mono_reflection_type_get_handle.
1756 2009-07-14 Zoltan Varga <vargaz@gmail.com>
1758 * reflection.c (mono_image_basic_init): Applied patch from
1759 <Dax@daxxfiles.net>. Set the public key token from the assembly
1760 builder. Fixes #518909.
1762 * appdomain.c: Bump corlib version.
1764 2009-07-13 Zoltan Varga <vargaz@gmail.com>
1766 * class.c (mono_class_needs_cctor_run): Make this return false if
1767 the class has no cctor.
1769 2009-07-13 Mark Probst <mark.probst@gmail.com>
1771 * sgen-gc.c: When the minor GC needs to allocate a new section,
1772 invoke the major GC afterwards.
1774 2009-07-14 Bill Holmes <billholmes54@gmail.com>
1776 * process.c (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
1777 Applying the window_style field to the SHELLEXECUTEINFO struct.
1779 Code is contributed under MIT/X11 license.
1781 2009-07-13 Mark Probst <mark.probst@gmail.com>
1783 * sgen-gc.c: Fix the race condition in the unmanaged allocator by
1784 locking earlier. Fix it in the managed allocator by making sure
1785 that no thread is stopped there before the GC runs. If we do stop
1786 a thread there, we restart it and let it run a but, until it stops
1789 * gc-internal.h, gc.c: Function for getting the IP from a signal
1790 context via a function registered by mini.
1792 2009-07-11 Zoltan Varga <vargaz@gmail.com>
1794 * object-internals.h (MonoIntPtr): New structure describing a boxed
1797 * object.c (mono_runtime_invoke_array): Handle ptr arguments and
1798 returns. Fixes #519953.
1800 * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
1802 2009-07-09 Mark Probst <mark.probst@gmail.com>
1804 * class-internals.h, generic-sharing.c: New RGCTX info type for
1805 getting a remoting invoke with check wrapper.
1807 2009-07-07 Geoff Norton <gnorton@novell.com>
1809 * icall-def.h: Fix the enable-minimal build.
1811 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1813 * object-internals.h: Add MonoReflectionDerivedType.
1815 * reflection.c: Implement support for PointerType.
1816 Fixed tons of warnings.
1818 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1820 * object-internals.h: Add MonoReflectionByRefType.
1822 * reflection.c: Implement support for ByRefType.
1824 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1826 * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
1828 * object-internals.h: Add MonoReflectionArrayType and
1829 mono_reflection_create_unmanaged_type.
1831 * reflection.c: Implement support for ArrayType.
1833 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1835 * metadata-verify.c (is_valid_method_header): Parse EH block
1838 2009-07-03 Mark Probst <mark.probst@gmail.com>
1840 * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
1841 processing the disappearing links, and process disappearing links
1842 in a loop until no new objects are copied.
1844 2009-07-03 Mark Probst <mark.probst@gmail.com>
1846 * object.c (handle_enum): Invoke the write barrier when copying
1847 value type instances.
1849 * sgen-gc.c: Register remsets for unmanaged write barriers only
1850 when the address written to is actually on the heap. This makes
1851 set_value() in object.c work without requiring that the result be
1854 2009-07-02 Rodrigo Kumpera <rkumpera@novell.com>
1856 The runtime wrappers are all bound to a given type that must
1857 exist in the same image. For regular images we use the <Module>
1858 type, which is required to exist for all images.
1860 The <Module> type can't be used for dynamic images because it
1861 might not exist at the time the wrapper is required, so we create
1862 a synthetic type to use instead.
1864 The current code works because of the 2 stage setup of MonoClass,
1865 but once this is gone it will no longer work.
1867 * icall-def.h: Add ModuleBuilder::set_wrappers_type.
1869 * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
1871 * object-internals.h: Export mono_image_set_wrappers_type icall
1872 as part of the internal API.
1874 * marshal.c (get_wrapper_target_class): If the image is dynamic,
1875 use MonoDynamicImage::wrappers_type instead of the <Module> type.
1877 reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
1878 image wrappers_type to the provided value.
1880 2009-07-01 Rodrigo Kumpera <rkumpera@novell.com>
1882 * appdomain.c (deregister_reflection_info_roots): No need
1883 to use the image lock here.
1885 2009-07-02 Mark Probst <mark.probst@gmail.com>
1887 * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
1889 2009-06-29 Zoltan Varga <vargaz@gmail.com>
1891 * threads.c: Store the thread start argument in a hash table instead of
1892 registering it as a root, as libgc doesn't support unregistering roots
1893 under windows, leading to 'too many root sets' errors when many threads
1896 * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
1897 shutdown, they can still be referenced by the other dying objects.
1900 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1902 * socket-io.c: DontLinger does not allow LingerOptions.
1904 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1906 * metadata-verify.c: The spec doesn't mention that it's possible to add
1907 custom attribute to a generic parameter. Fixed.
1909 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1911 * class.c (inflate_generic_type): Don't crash while trying to output a message
1912 on why we're aborting.
1914 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1916 * socket-io.c: DontLinger can take an int or a boolean too.
1918 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
1920 * gc.c: check for a null argument to SuppressFinalize () and
1921 ReRegisterForFinalize ().
1923 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1925 * loader.c (method_from_methodspec): Call into the verifier to check
1928 * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
1930 * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
1931 part of the internal API.
1933 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1935 * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
1938 * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
1940 * verify-internals.h: Export mono_verifier_verify_typespec_signature as
1941 part of the internal API.
1943 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1945 * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
1948 * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
1951 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1952 part of the internal API.
1954 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1956 * metadata-verify.c: Use is_valid_blob_object to verify blob validity
1957 when doing basic verification.
1959 This check must be done since the runtime peeks into signatures in much
1960 more places than it does decoding so it makes sense to ensure that all
1961 pointers to blob objects are well formed.
1963 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1965 * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
1966 Use proper overflow dectection. Fix usage of it.
1968 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1970 * loader.c (field_from_memberref): Call into the verifier to check
1973 * loader.c (mono_method_get_signature_full): Same.
1975 * loader.c (method_from_memberref): Same.
1977 * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
1979 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1980 part of the internal API.
1982 2009-06-25 Mark Probst <mark.probst@gmail.com>
1984 * threadpool.c (mono_thread_pool_add): If the domain is unloading
1985 or unloaded, still return an AsyncResult, but don't add it to the
1988 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1990 * threads.c: fix missing colon when DEBUG is defined.
1992 2009-06-25 Mark Probst <mark.probst@gmail.com>
1994 * threadpool.c: Don't add new calls to a threadpool if the domain
1995 of the call is unloading or unloaded. When dequeuing a job, null
1996 the reference in the queue.
1998 2009-06-25 Mark Probst <mark.probst@gmail.com>
2000 * sgen-gc.c (null_link_in_range): Add the dislink for the old
2001 generation if an object was moved.
2003 2009-06-25 Sylvain Dupont <duposyl@gmail.com>
2005 * cominterop.h cominterop.c marshal.c: Added support for marshalling out
2006 parameters of type SAFEARRAY[VARIANT].
2008 * reflection.c (encode_marshal_blob): Properly generate element type
2009 (SafeArraySubType marshal attribute option).
2011 Code is contributed under MIT/X11 license.
2013 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
2015 * reflection.c: in mono_method_clear_object () really ensure all the
2016 objects are removed.
2018 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2020 * loader.c (mono_method_signature): Call into the verifier to check
2021 the method signature.
2023 * metadata-verify.c (verify_method_table): Move signature verification
2024 to verify_method_table_full.
2026 * metadata-verify.c: Add mono_verifier_verify_method_signature.
2028 * verify-internals.h: Export mono_verifier_verify_method_signature as
2029 part of the internal API.
2031 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2033 * loader.c (mono_method_get_header): Call into the verifier to
2034 check the method header.
2036 * metadata-verify.c: Add mono_verifier_verify_method_header.
2038 * verify-internals.h: Export mono_verifier_verify_method_header as
2039 part of the internal API.
2041 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2043 * class.c (mono_class_find_enum_basetype): Call into the verifier to
2044 check the field signature. Replace an assert with an explicit check.
2046 * class.c (mono_class_setup_fields): Call into the verifier to check
2047 the field signature.
2049 * metadata-verify.c: Add mono_verifier_verify_field_signature.
2051 * verify-internals.h: Export mono_verifier_verify_field_signature as
2052 part of the internal API.
2054 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2056 * class.c (mono_class_find_enum_basetype): Simplify this function
2057 by moving code outside of the loop and not decoding static fields.
2059 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2061 * metadata-verify.c (verify_typedef_table): Check the extends
2062 token here. Move to here a flags check from verify_typedef_table_full.
2064 2009-06-24 Zoltan Varga <vargaz@gmail.com>
2066 * metadata-verify.c (is_valid_method_header): Fix a warning.
2068 * metadata-internals.h (MonoImage): Remove the unused
2069 static_rgctx_invoke_wrapper_cache.
2071 * image.c marshal.c: Ditto.
2073 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
2075 * image.c (do_mono_image_load): Enable table data verification.
2077 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
2079 * metadata-verify.c (is_valid_constant): Fix nullref check.
2081 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
2083 * metadata-verify.c (is_valid_constant): Fix string bounds check.
2085 2009-06-22 Mark Probst <mark.probst@gmail.com>
2087 * sgen-gc.c: Managed allocation with pthreads TLS.
2089 * threads.c, threads-types.h: Functions for the JIT to tell the
2090 runtime whether it supports the MONO_TLS opcode.
2092 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
2094 * metadata-verify.c (verify_param_table): Fix a crash for assemblies
2097 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
2099 * metadata-verify.c (is_valid_constant): Fix the string length check.
2100 Use safe overflow checking. Add decent error messages.
2102 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
2104 * metadata-verify.c: Move remaininh blob checks to the offline
2107 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
2109 * metadata-verify.c: Move more blob checks to the offline verification
2112 2009-06-22 Bill Holmes <billholmes54@gmail.com>
2114 * object-internals.h : Adding interrupt_on_stop field.
2116 * threads.c (mono_thread_request_interruption) : On Windows exit the
2117 thread if interrupt_on_stop is set.
2119 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
2120 Removing old interrupt logic and setting the interrupt_on_stop for the
2121 thread when calling accept.
2123 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
2124 setting the interrupt_on_stop for the thread when calling accept.
2126 Contributed under MIT/X11 license.
2128 2009-06-20 Martin Baulig <martin@ximian.com>
2130 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
2132 2009-06-21 Zoltan Varga <vargaz@gmail.com>
2134 * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
2135 running in no-exec mode.
2137 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2139 * metadata-verify.c (verify_method_table): Move header
2140 checking to verify_method_table_full.
2142 * metata-verify.c (mono_verifier_verify_full_table_data):
2143 Call verify_method_table_full.
2145 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2147 * metadata-verify.c (verify_field_table): Move signature
2148 checking to verify_field_table_full.
2150 * metata-verify.c (mono_verifier_verify_full_table_data):
2151 Call verify_field_table_full.
2153 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2155 * metadata-verify.c (verify_typedef_table): Move remaining
2156 stuff to verify_typedef_table_full.
2158 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2160 * metadata-verify.c: Kill is_corlib from VerifyContext.
2161 It is only used by the offline mode.
2162 So we better remove it from the runtime path.
2164 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2166 * metadata-verify.c: Add new mono_verifier_verify_full_table_data
2167 function that perform the offline metadata verification steps.
2169 * metadata-verify.c (verify_typedef_table): Move some checks to
2170 verify_typedef_table_full and make it been called by new function
2171 mono_verifier_verify_full_table_data.
2173 * pedump.c: Call mono_verifier_verify_full_table_data.
2175 * verify-internals.h: Export mono_verifier_verify_full_table_data as
2176 part of the internal API.
2178 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2180 * metadata-verify.c (typedef_is_system_object): Fix System.Object
2183 * metadata-verify.c (verify_implmap_table): Fix implmap invalid
2184 flags bits. SupportLastError was confused as bit 7 instead of 6.
2186 * metadata-verify.c (verify_implmap_table): Fix import scope verification
2187 to check against the module ref table instead of module.
2189 * metadata-verify.c (verify_implmap_table): Fix corlib check.
2191 * pedump.c: Call mono_image_load_names.
2193 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2195 * image.c: Extract mono_image_load_names from do_mono_image_load.
2197 * metadata-internals.h: Export mono_image_load_names as part of
2200 2009-06-19 Zoltan Varga <vargaz@gmail.com>
2202 * metadata.c (mono_metadata_cleanup): Free the generic method cache
2203 first, as it could reference data in the other caches.
2205 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
2207 * metadata-verify.c: Finished with method header verification.
2209 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
2211 * metadata-verify.c: Added more header verification code.
2212 Now only EH clauses are missing.
2214 2009-06-17 Zoltan Varga <vargaz@gmail.com>
2216 * marshal.c (get_runtime_invoke_type): Don't share primitive types
2219 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
2221 * metadata-verify.c: Initial method header verification.
2223 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
2225 * metadata-verify.c (verify_import_table): The IAT contents
2226 might end been patched by the windows DL when running with
2229 2009-06-15 Rodrigo Kumpera <rkumpera@novell.com>
2231 * class.c (mono_class_from_typeref): If the enclosing type is not
2232 found return null instead of crashing. Fixes #508487.
2234 2009-06-15 Atsushi Enomoto <atsushi@ximian.com>
2236 * normalization-tables.h : updated to the latest unicode charcter
2238 * appdomain.c : bump corlib version.
2240 2009-06-14 Zoltan Varga <vargaz@gmail.com>
2242 * class.c (mono_class_from_name): Fix support for assembly references
2243 in the EXPORTEDTYPE table. Fixes #511704.
2245 2009-06-13 Geoff Norton <gnorton@novell.com>
2247 * domain.c: Ensure that mono_domain_assembly_open actually opens the
2248 assembly in the target domain.
2250 2009-06-12 Robert Jordan <robertj@gmx.net>
2252 * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
2253 because "this" of the managed signature has become an
2254 ordinary parameter in the unmanaged signature.
2256 2009-06-12 Zoltan Varga <vargaz@gmail.com>
2258 * class-internals.h (struct _MonoGenericContainer): Add an 'image'
2259 field for owner-less generic containers.
2261 * reflection.c (mono_reflection_initialize_generic_parameter): Set the
2262 image field of the owner-less generic containers created here.
2264 * metadata.c (mono_metadata_load_generic_params): Ditto, the
2265 contain is ownerless until the caller sets its owner.
2267 * metadata.c (type_in_image): Handle owner-less generic containers
2270 2009-06-11 Zoltan Varga <vargaz@gmail.com>
2272 * image.c (mono_image_close): Support debug_assembly_unload for
2275 2009-06-11 Andrés G. Aragoneses <aaragoneses@novell.com>
2277 * class.c: Fix some typos in comments.
2279 2009-06-11 Zoltan Varga <vargaz@gmail.com>
2281 * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
2283 * threads.c (mono_thread_execute_interruption): Avoid creating the
2284 abort exception object while holding the synch_cs lock.
2286 2009-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2288 * metadata-verify.c: Verify basic cattr content.
2290 2009-06-10 Zoltan Varga <vargaz@gmail.com>
2292 * reflection.c (add_exported_type): Don't set the FORWARDER flag on
2295 * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
2296 support for nested types. Fixes #511704.
2298 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2300 * metadata-verify.c: Verify methodspec signatures.
2302 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2304 * metadata-verify.c: Verify typespec signatures.
2306 2009-06-09 Zoltan Varga <vargaz@gmail.com>
2308 * metadata.c (free_inflated_method): Call
2309 mono_marshal_free_inflated_wrappers (), which was missed earlier.
2311 2009-06-08 Miguel de Icaza <miguel@novell.com>
2313 * mono-config.c: Small change to report the PPC64/ILP32 model.
2315 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2317 * metadata-verify.c (parse_type): Check szarray.
2319 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2321 * metadata-verify.c (parse_type): Check fnptr.
2323 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2325 * metadata-verify.c (parse_type): Check generic instances.
2327 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2329 * metadata-verify.c (parse_type): Check array shape.
2331 2009-06-05 Robert Jordan <robertj@gmx.net>
2333 * class.c (mono_class_create_from_typedef): Check only for
2334 mscorlib's System.Array.
2336 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2338 * metadata-verify.c (parse_type): Check pointer, class/valuetype
2341 * metadata-verify.c (parse_field): Check the signature.
2343 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2345 * metadata-verify.c: Implement locals signature check.
2347 2009-06-04 Marek Safar <marek.safar@gmail.com>
2349 * domain.c: Add .NET 4.0 Beta 1 version.
2351 2009-06-04 Bill Holmes <billholmes54@gmail.com>
2353 * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
2354 For QueryInterface on CCWs consider the base class
2357 Code is contributed under MIT/X11 license.
2359 2009-06-04 Zoltan Varga <vargaz@gmail.com>
2361 * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
2363 * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
2366 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
2367 adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
2369 * generic-sharing.c (inflate_other_data): Ditto.
2371 2009-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2373 * metadata-verify.c: Implement property signature check.
2375 2009-06-04 Mark Probst <mark.probst@gmail.com>
2377 * sgen-gc.h: Register saving support for PPC.
2379 2009-06-04 Mark Probst <mark.probst@gmail.com>
2381 * sgen-gc.c: Fixed a pthread TLS screwup.
2383 2009-06-04 Mark Probst <mark.probst@gmail.com>
2385 * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
2388 2009-06-04 Mark Probst <mark.probst@gmail.com>
2390 * sgen-gc.c: Disable TLA and managed allocation if the __thread
2391 keyword is not supported.
2393 2009-06-04 Zoltan Varga <vargaz@gmail.com>
2395 * marshal.c metadata.c: Applied patch from Ulrich Weigand
2396 <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
2397 the inflated method is freed. Fixes #508389.
2399 The code is contributed under the MIT/X11 license.
2401 2009-06-03 Zoltan Varga <vargaz@gmail.com>
2403 * marshal.c (get_wrapper_target_class): New helper function.
2404 (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
2405 the <Module> class of the image. Fixes #509049.
2407 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2409 * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
2410 Check if the thread was interrupted and proccess it straight away.
2411 Makes abortion much more responsive.
2413 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2415 * threads.c (mono_thread_execute_interruption): Use atomic cas with
2416 MonoThread::interruption_requested to match it's counterpart.
2418 Fixes a hang in abort-stress-1 on a 2 core x86.
2420 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
2423 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2425 Change MonoImage::name_cache to be protected by the image lock
2426 instead of the loader lock.
2428 * appdomain.c (deregister_reflection_info_roots): Protect access
2431 * class.c (mono_image_init_name_cache): Change from the loader lock
2432 to the image lock. Check if the cache wasn't already created.
2434 * class.c: Change from the loader to the image lock.
2436 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
2437 the code to hold the image lock while iterating over name_cache and
2438 not go into mono_array_new holding it.
2440 * metadata-internals.h: Add a comment about this change.
2442 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2444 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2445 Under the 2.0 profile raise the loader error.
2449 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2451 * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
2452 of ldind opcode for generic instances so we don't fail for direct wrappers.
2453 This only affect direct calls.
2455 2009-05-31 Zoltan Varga <vargaz@gmail.com>
2457 * reflection.c (create_dynamic_mono_image): Fix warnings.
2459 * generic-sharing.c (other_info_equal): Ditto.
2461 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2463 * metadata-verify.c: Implement field signature check.
2465 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2467 * metadata-verify.c: Implement standalone signature check.
2469 2009-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2471 * metadata-verify.c: Implement methodref signature check.
2473 2009-05-28 Zoltan Varga <vargaz@gmail.com>
2475 * object-internals.h (MonoRuntimeCallbacks): New structure containing
2476 callbacks supplied by the runtime.
2478 * object.c (mono_install_callbacks): New internal function to install
2481 * object.c (mono_create_ftnptr): Move the implementation of this to
2484 * object.c (mono_get_addr_from_ftnptr): Ditto.
2486 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2488 * metadata-verify.c (parse_return_type): Proper byref check.
2489 * metadata-verify.c (is_valid_method_signature): Check for zero arity
2490 generic signatures and method params.
2492 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2494 * metadata-verify.c (decode_signature_header): Fix bounds check.
2496 * metadata-verify.c (parse_custom_mods): Check custom mods.
2498 * metadata-verify.c (parse_type): Do initial basic verification
2501 * metadata-verify.c (is_valid_method_signature): Parse the generic
2504 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
2506 * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
2507 discarded based on their most specific definition so we set the method_slots
2508 array before checking if the method is acceptable or not.
2512 2009-05-26 Mark Probst <mark.probst@gmail.com>
2514 * icall.c: Free the old array when resizing a mono_ptr_array.
2516 2009-05-26 Mark Probst <mark.probst@gmail.com>
2518 * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
2519 for the hashes whose keys are managed objects.
2521 2009-05-26 Mark Probst <mark.probst@gmail.com>
2523 * object-internals.h, threads.c: Set the execution context on
2524 thread start here, not in corlib.
2526 * appdomain.c: Bump corlib version.
2528 2009-05-27 Martin Baulig <martin@ximian.com>
2530 * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
2531 if `_mono_debug_using_mono_debugger' is set to make things work
2532 properly when embedding Mono.
2534 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2536 * class.c (mono_class_setup_fields): Don't mark simd types as having
2537 16 bytes alignment as the whole runtime doesn't support.
2539 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2541 * metadata-verify.c (safe_read): Use endian safe read macros.
2543 2009-05-25 Zoltan Varga <vargaz@gmail.com>
2545 * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
2546 it is read-only when using full aot.
2548 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2550 * metadata-verify.c (is_valid_method_signature): Verify parts
2551 of the return type. Provide an error message in case of failure.
2553 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2555 * metadata-verify.c (is_valid_method_signature): Verify the call conv.
2557 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2559 * metadata-verify.c: Include the size prefix in the bounds check.
2561 2009-05-22 Miguel de Icaza <miguel@novell.com>
2563 * icall.c: Remove warnings.
2565 * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
2566 prevent auto-detection based on GCC defines.
2570 * metadata-verify.c: Do not include signal.h
2572 * generic-sharing.c, marshal.c: Add returns to avoid some warning
2573 messages. Not sure why the g_assert_not_reached is not enough to
2577 * appdomain.c: Remove code that is not used when
2578 DISABLE_SHADOW_COPY is set.
2580 * image.c: use g_getenv
2582 2009-05-21 Miguel de Icaza <miguel@novell.com>
2584 * reflection.c: Remove code that it not used with
2585 DISABLE_REFLECTION_EMIT is defined.
2587 2009-05-21 Zoltan Varga <vargaz@gmail.com>
2589 * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
2592 2009-05-20 Miguel de Icaza <miguel@novell.com>
2595 (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
2596 the ifdef here and instead put that on io-layer
2598 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2600 * metadata-verify.c: Verify the generic param constraint table.
2602 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2604 * metadata-verify.c (verify_generic_param_table): Fix
2605 thinko on the valid flags bits for generic params.
2607 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2609 * metadata-verify.c: Verify the methodspec table.
2611 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2613 * metadata-verify.c: Verify the generic param table.
2615 2009-05-19 Mark Probst <mark.probst@gmail.com>
2617 * sgen-gc.c: Store and use the count with REMSET_VTYPE.
2619 2009-05-19 Mark Probst <mark.probst@gmail.com>
2621 * sgen-gc.c: Use generation enum more consistently and use the
2622 correct generation in mono_gc_register_for_finalization().
2624 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
2626 * metadata-verify.c: Verify the nested class table.
2628 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
2630 * metadata-verify.c: Verify the manifest resource table.
2632 2009-05-17 Zoltan Varga <vargaz@gmail.com>
2634 * debug-helpers.c (dis_one): Add little-endian support for ldstr.
2636 2009-05-16 Zoltan Varga <vargaz@gmail.com>
2638 * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
2639 wrappers, this is now done in the JIT.
2641 * class.c (mono_set_generic_sharing_supported): New internal function.
2642 (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
2644 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2646 * metadata-verify.c: Verify the exported type table.
2648 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2650 * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
2652 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2654 * metadata-verify.c: Verify the file table.
2656 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2658 * metadata-verify.c (verify_assembly_table): Fix an error message.
2660 * metadata-verify.c: Verify the assemblyref table.
2662 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2664 * metadata-verify.c (verify_assembly_table): Fix the valid
2665 bits mask for flags.
2667 2009-05-15 Zoltan Varga <vargaz@gmail.com>
2669 * debug-helpers.c (mono_method_full_name): Print generic parameters of
2670 generic methods as well.
2672 2009-05-15 Geoff Norton <gnorton@novell.com>
2674 * gc.c: MachO/Darwin supports and uses semaphores fine for this
2675 use-case and is significantly more performant than the wapi layer.
2677 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2679 * metadata-verify.c: Verify the assembly table.
2681 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2683 * metadata-verify.c: Fix rows limit check.
2685 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2687 * metadata-verify.c: Verify the fieldrva table.
2689 2009-05-13 Mark Probst <mark.probst@gmail.com>
2691 * sgen.c: Speed up weak links and finalizers by grouping them by
2694 2009-05-13 Mark Probst <mark.probst@gmail.com>
2696 * marshal.c (delegate_hash_table_add): When overwriting an entry,
2697 free the old GCHandle (only applies to SGen).
2699 2009-05-13 Zoltan Varga <vargaz@gmail.com>
2701 * loader.c (mono_get_method_from_token): Avoid the expensive call to
2702 mono_metadata_load_generic_params () for non-generic methods.
2704 2009-05-12 Mark Probst <mark.probst@gmail.com>
2706 * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
2707 New function for returning a monitor's weak link if it has one.
2709 * sgen-gc.c: Remove an object's monitor's weak link (if it has
2710 one) when clearing a domain. These can still be around because
2711 the object might not have been collected.
2713 2009-05-12 Zoltan Varga <vargaz@gmail.com>
2715 * gc.c: Fix a warning.
2717 2009-05-12 Kornél Pál <kornelpal@gmail.com>
2719 * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
2720 prevous wait that resulted in a deadlock on Windows when initializing
2721 the runtime form DllMain. Also results in improved startup time.
2722 (finalizer_thread): Get rid of thread_started_event.
2723 * threads.c, threads-types.h (mono_thread_create_internal): Return the
2724 resulting MonoThread.
2726 Contributed under MIT/X11 license.
2728 2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
2730 * metadata-verify.c: Verify the implmap table.
2731 Don't require that #US and #Strings be present.
2733 2009-05-11 Sebastien Pouliot <sebastien@ximian.com>
2735 * security-core-clr.c: Delegate checks are done at creation time,
2736 not a invocation time. Fix exception for Telerik Silverlight demo
2738 2009-05-11 Mark Probst <mark.probst@gmail.com>
2740 * sgen-gc.c (need_remove_object_for_domain): Remove the special
2741 case for the Thread class.
2743 * threads.c: Do clean-up of abort exception/state in
2744 thread_cleanup() instead of Thread.free_internal(). Also clean up
2745 current_appcontext. The reason we have to do that is because
2746 those references might point into another domain and if that
2747 domain is unloaded before the thread is finalized, they point to
2750 2009-05-10 Andreas Faerber <andreas.faerber@web.de>
2752 * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
2755 Contributed unter MIT/X11 license.
2757 2009-05-09 Miguel de Icaza <miguel@novell.com>
2759 * verify.c, metadata-verifier.c: Add support for disabling the
2760 verifier in some builds.
2762 [ Sorry, my previous commit accidentally commited some work in
2765 2009-05-08 Zoltan Varga <vargaz@gmail.com>
2767 * class.c (mono_class_setup_fields): Set class->field.first for
2770 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
2772 * metadata-verify.c: Verify the typespec table.
2774 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
2776 * metadata-verify.c: Verify the module table.
2778 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2780 * metadata-verify.c: Verify the methodimpl table.
2782 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2784 * metadata-verify.c: Verify the property table.
2786 2009-05-06 Zoltan Varga <vargaz@gmail.com>
2788 * debug-helpers.c (mono_method_desc_match): Add support for generic
2791 2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
2793 * metadata-verify.c: Verify the propertymap table.
2795 2009-05-04 Rodrigo Kumpera <rkumpera@novell.com>
2797 * metadata-verify.c: Verify the event table.
2799 * metadata-verify.c (search_sorted_table): Fix offset
2802 2009-05-02 Zoltan Varga <vargaz@gmail.com>
2804 * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
2806 2009-05-01 Mark Probst <mark.probst@gmail.com>
2808 * gc.c (mono_gc_run_finalize): Don't set the domain too late,
2809 because mono_delegate_free_ftnptr() needs it.
2811 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2813 * metadata-verify.c: Verify the eventmap table.
2815 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2817 * metadata-verify.c: Verify the standalonesig table.
2819 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2821 * metadata-verify.c: Verify the field layout table.
2823 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2825 * class.c (mono_type_get_name_recurse): Don't crash
2826 for ownerless generic params.
2828 * debug-helpers.c (mono_type_get_desc): Correct the format
2829 for ownerless generic params.
2831 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2833 * metadata-verify.c: Verify the class layout table.
2835 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2837 * metadata-verify.c: Verify the decl security table.
2839 2009-04-30 Mark Probst <mark.probst@gmail.com>
2841 * domain.c (mono_domain_set_internal_with_options): Don't do
2842 anything if the old domain is the same as the old one. Fixes
2845 2009-04-30 Mark Probst <mark.probst@gmail.com>
2847 * appdomain.c: Deregister the reflection_info roots when unloading
2850 * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
2851 memory allocated by a domain and frees its disappearing links.
2853 * boehm-gc.c, null-gc.c: Empty implementation of
2854 mono_gc_clear_domain().
2856 2009-04-30 Mark Probst <mark.probst@gmail.com>
2858 * appdomain.c (clear_cached_vtable): Free the static fields memory
2861 2009-04-30 Mark Probst <mark.probst@gmail.com>
2863 * gc.c: Set the correct domain when invoking finalizers.
2865 * appdomain.c: Set the correct domain when creating threads.
2867 2009-04-30 Mark Probst <mark.probst@gmail.com>
2869 * sgen-gc.c: Fix skip size for vectors.
2871 2009-05-03 Martin Baulig <martin@ximian.com>
2873 * mono-debug-debugger.c
2874 (mono_debugger_check_breakpoints): Check class init handlers even
2875 if we don't have any method load handers.
2877 2009-04-30 Zoltan Varga <vargaz@gmail.com>
2879 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
2880 returning refonly assemblies if refonly is FALSE. Fixes #499013.
2882 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
2884 * metadata-verify.c: Verify the field marshal table.
2886 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
2888 * metadata-verify.c: Verify the custom attribute table.
2890 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2892 * metadata-verify.c: Verify the constant table.
2894 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2896 * metadata-verify.c: Verify the memberef table.
2898 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2900 * metadata-verify.c (get_coded_index_token): Remove
2903 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2905 * metadata-verify.c: Verify the interfaceimpl table.
2907 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2909 * verify.c: Improve error message.
2911 * debug-helpers.c (mono_type_get_desc): Harden the code that
2912 deals with VAR and MVAR.
2914 2009-04-28 Zoltan Varga <vargaz@gmail.com>
2916 * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
2919 2009-04-23 Tom Hindle <tom_hindle@sil.org>
2921 * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
2922 changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
2924 2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
2926 * security-core-clr.c: Avoid redundant checks for platform code,
2927 e.g. check for method and for class (very common) and check
2928 for class and outer class (less common)...
2930 2009-04-27 Zoltan Varga <vargaz@gmail.com>
2932 * reflection.c: Avoid returning random cattrs for synthetic methods.
2935 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2937 * assembly.c: assemblies in the GAC should never be shadow-copied.
2939 2009-04-26 Mark Probst <mark.probst@gmail.com>
2941 * domain.c, domain-internals.h: Disable
2942 track_resurrection_{objects,handles}_hash in MonoDomain if using
2945 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2947 * metadata-verify.c: Verify the param table.
2949 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2951 * metadata-verify.c (verify_typedef_table): Range check FieldList and
2954 * metadata-verify.c (verify_method_table): Proper check the ParamList
2957 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2959 * metadata-verify.c (verify_method_table): Check for runtime
2960 implemented functions such as delegate .ctors. Remove spurious
2963 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2965 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
2967 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2969 Don't allocate MonoGenericInfo for ownerless generic params.
2970 * class-internals.h (MonoGenericParam::info): Move field to ...
2971 (MonoGenericParamFull): ... this. New struct.
2972 (MonoGenericContainer::type_params): Change type to
2973 MonoGenericParamFull.
2974 (MonoGenericParam, MonoGenericContainer): Update accessors.
2975 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
2976 'info' field for ownerless generic param.
2977 (mono_metadata_load_generic_params): Update to changes.
2978 * reflection.c (mono_reflection_create_generic_class): Likewise.
2979 (reflection_methodbuilder_to_mono_method): Likewise.
2980 (mono_reflection_initialize_generic_parameter): Likewise.
2982 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2984 Don't use MonoGenericParamInfo for ownerless generic params.
2985 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
2986 use ParamInfo class at all.
2987 (mono_class_from_generic_parameter): Use them.
2988 (make_generic_param_class): Fix a couple of instances where 'pinfo
2989 == NULL' wasn't handle.
2991 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2993 * class.c (make_generic_param_class): Carve out of ...
2994 (mono_class_from_generic_parameter): ... here.
2996 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2998 Simplify mono_class_from_generic_parameter
2999 * class-internals.h (MonoGenericParamInfo::token): New field.
3000 * metadata.c (mono_metadata_load_generic_params): Initialize it
3002 * class.c (mono_class_from_generic_parameter): Use it instead of
3003 searching through metadata.
3005 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3007 * metadata-verify.c: Add verification of the method table.
3009 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3011 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
3012 Delegate::Invoke optimization.
3014 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3016 * appdomain.c (mono_domain_create_appdomain_internal): Free the
3017 string returned by get_shadow_assembly_location_base.
3019 * appdomain.c (get_shadow_assembly_location_base): Add a comment
3020 about caller's ownership.
3022 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3024 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
3025 reflection memory on domain unload.
3027 * domain.c (mono_domain_free): Don't free refobject_hash, let the
3028 reflection cleanup code do it.
3030 * domain-internals.h: Add mono_reflection_cleanup_domain.
3032 This fixes a memory leak for managed mirrors of reflection objects
3035 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
3037 * metadata-verify.c: Implement more verification of the field table.
3039 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
3041 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
3042 doesn't try to parse the input assembly, which can be broken.
3044 2009-04-23 Mark Probst <mark.probst@gmail.com>
3046 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
3047 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
3048 by using the lowest bit in the link to store whether the link is
3049 tracked. Move the track_resurrection hashes into boehm-gc.c.
3051 2009-04-22 Miguel de Icaza <miguel@novell.com>
3053 * Makefile.am: Split the console support in platform specific code
3054 and put together a framework for making this easy in the future so
3055 that we can start splitting code instead of having a mess of PLATFORM_WIN32
3057 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
3059 * pedump.c: Fix a warning.
3061 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
3063 * verify.c (mono_delegate_type_equal): Compare valuetypes using
3064 mono_class_from_mono_type to avoid bad interactions with the dual representation
3065 of the generic type definition.
3067 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
3069 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
3070 get the MonoClass for the call context type as it might be a generic
3075 2009-04-21 Mark Probst <mark.probst@gmail.com>
3077 * object-internals.h: The Thread object has no execution_context
3080 * threads.c, threadpool.c, threads-types.h: Accessor functions for
3081 the execution context.
3083 * appdomain.c: Bump corlib version.
3085 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3087 * verify.c (do_newobj): Improve error message.
3089 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3091 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
3092 is nested in the filter block.
3094 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
3095 block is not fully nested.
3099 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3101 * verify.c (verify_type_compatibility_full): Compare MonoClass and
3102 not MonoType to check for equality of valuetypes as the generic type
3103 definition allows for two different encodings: the generic type definition
3104 class or a generic instance over the GTD arguments.
3108 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3110 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
3112 * verify.c (do_initobj): Improve error message.
3114 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3116 * metadata-verify.c: Enable pe verification as the issue with #496453
3117 is that the authenticode data directory have a different unspecified
3118 format. Ignore it for now.
3120 * pedump.c: Run the metadata verifier together with the IL verifier.
3124 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
3126 * metadata-verify.c: Temporarily disable pe verification due to #496453.
3128 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
3130 * class.c (can_access_type): Check visibility against
3131 the element type for pointers and arrays.
3135 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
3137 * metadata-verify.c: Fix cli and table verification to use information
3138 from the MonoImage. A lot of duplicated code got killed.
3140 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
3143 This patch starts to integrate the metadata verifier with the runtime code.
3145 This patch causes major regression in functionality for the metadata verifier
3146 as cli and table verification are disabled since they require to be ported to
3147 use MonoImage information.
3149 * image.c (do_mono_image_load): Split the code in this function
3150 into mono_image_load_pe_data and mono_image_load_cli_data.
3151 Add care_about_pecoff parameter to not load pecoff data.
3152 Call into the metadata verifier for pecoff and cli verification.
3154 * image.c (mono_image_open_raw): New function that doesn't perform
3155 any parsing of the image contents.
3157 The reason for the 3 new functions is to give pedump better control
3158 into the interaction with the verifier.
3160 * metadata-internals.h: Add new functions from image.c as part of the
3163 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
3164 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
3165 to make those functions work together with the runtime.
3167 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
3168 true if the image needs to be verified.
3170 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
3172 * pedump.c: Use new metadata verifier API.
3174 2009-04-19 Zoltan Varga <vargaz@gmail.com>
3176 * object.c (mono_install_vtable_trampoline): Make this receive a
3177 trampoline creation function instead of trampoline, allowing the JIT
3178 to use a different trampoline for each vtable.
3180 2009-04-18 Mark Probst <mark.probst@gmail.com>
3182 * object.c (mono_raise_exception): Don't reset the thread abort
3183 exception state here.
3185 2009-04-18 Mark Probst <mark.probst@gmail.com>
3187 * icall-def.h: New icall for getting the thread abort exception
3190 * object.c, thread.c, object-internals.h: A thread's abort
3191 exception state is now a GC handle. To get the object it stands
3192 for, we must move it into the current app domain, if it's
3193 different than the one where it originated from.
3195 * appdomain.c: Bump corlib version.
3197 * domain.c, domain-internals.h: New function for setting the
3198 domain and migrate the thread abort exception or not.
3200 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3202 * metadata-verify.c: Add initial verification of the
3205 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3207 * metadata-verify.c: Add a macro to conditionally enable
3208 dumping of verification information. Add make_coded_token
3209 and search_sorted_table to enable search sorted tables
3210 by a given coded token.
3212 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3214 * metadata-verify.c: Add array mapping from table index
3215 to description offset. Add get_col_offset and get_col_size
3218 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3220 * metadata-verify.c: Add remaining table descriptions offsets.
3221 Add remaining coded index descriptions.
3223 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3225 * metadata-verify.c: Fixed constant table description.
3226 Fixed calculation of HasCustomAttribute coded index size.
3227 Fixed calculation of size for many table indexes.
3229 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3231 * pedump.c (dump_metadata): Dump table offset instead
3232 of useless pointer in memory.
3234 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3236 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
3238 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3240 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
3241 a missing of for interface types.
3243 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3245 * metadata-verify.c (verify_pe_optional_header): Add comment of why
3246 the code is commented.
3248 * metadata-verify.c (verify_resources_table): Remove spurious printf
3249 and don't fail if there are unmanaged resources. Gmcs generates a useless
3250 one for all assemblies - I bet it's some MS compatibility junk.
3252 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3254 * metadata-verify.c (verify_typedef_table): Verify the extends field.
3256 * metadata-verify.c (mono_image_verify): Add a is_corlib.
3258 * verify-internals.h: Same.
3260 * pedump.c: Fix for mono_image_verify new signature.
3262 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3264 * metadata-verify.c (verify_typedef_table): Verify for some invalid
3267 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3269 * metadata-verify.c (verify_module_table): Ignore the generation field.
3271 2009-04-15 Martin Baulig <martin@ximian.com>
3273 * debug-mono-symfile.c
3274 (mono_debug_symfile_lookup_location): Don't print a warning for
3275 unknown extended opcodes if they're within 0x40 and 0x7f.
3277 2009-04-15 Zoltan Varga <vargaz@gmail.com>
3279 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
3280 invoke signatures returning an enum. Fixes #494847.
3282 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3284 * metadata-verify.c: Initial code to verify the typedef table.
3286 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3288 * verify.c (mono_method_verify): Don't fail if an unconditional branch
3289 with non empty stack happens before the beginning of a try block.
3293 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3295 * metadata-verify.c: Verify typename and typenamespace fields of
3298 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
3300 * metadata-verify.c: Initial code to verify the typeref table.
3302 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
3304 * verify.c (verify_delegate_compatibility): Fix error message.
3306 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
3308 * security-core-clr.c: Fix typo
3310 2009-04-14 Zoltan Varga <vargaz@gmail.com>
3312 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
3313 a MonoGHashTable to keep its values alive.
3314 (emit_marshal_boolean): Fix a warning.
3316 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
3318 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
3319 not have any interface configured for IPv4/IPv6.
3321 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
3323 * assembly.c: fix typo in error message.
3325 2009-04-14 Zoltan Varga <vargaz@gmail.com>
3327 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
3328 allocating the location holding the this argument to prevent
3329 'too many root sets' errors.
3331 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
3332 to mark fields as special static.
3333 (mono_field_static_get_value): Handle special static fields.
3334 (mono_field_static_set_value): Ditto.
3336 * class-internals.h (struct _MonoClassField): Document this.
3338 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3340 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
3341 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
3342 case. This will handle when managed code returns null to native code.
3344 Code is contributed under MIT/X11 license.
3346 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3348 * object.c (build_imt_slots): Changing a free to a g_free to match
3349 the g_malloc0 in add_imt_builder_entry that allocated this memory.
3351 Code is contributed under MIT/X11 license.
3353 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3355 * marshal.c (emit_marshal_boolean): Adding code to ensure that
3356 the correct TRUE value is passed through the marshaling layer.
3358 Code is contributed under MIT/X11 license.
3360 2009-04-13 Zoltan Varga <vargaz@gmail.com>
3362 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
3363 correctly. Fixes #492330.
3365 * marshal.c: Fix the embedding of object pointers into JITted code in
3366 the native-to-managed wrappers by allocating some GC tracked memory, and
3367 embedding the address of that.
3369 2009-04-11 Zoltan Varga <vargaz@gmail.com>
3371 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
3372 pointers into the vtable.
3374 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
3376 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
3378 * verify.c (verify_ldftn_delegate): Improve error message.
3380 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
3382 * reflection.c (my_mono_class_from_mono_type): Remove.
3384 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
3386 Prepare to reduce memory usage of owner-less generic parameters (1/n)
3387 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
3388 and constraints fields into ...
3389 (MonoGenericParamInfo): ... this.
3390 (mono_generic_param_info, mono_generic_container_get_param_info):
3392 * class.c, debug-helpers.c, icall.c: Update to changes.
3393 * metadata.c, reflection.c, verify.c: Likewise.
3395 2009-04-09 Zoltan Varga <vargaz@gmail.com>
3397 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
3399 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
3401 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
3402 booleans with sbytes.
3404 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3406 * class.c (can_access_instantiation): Verify accesibility of element types
3407 for arrays and pointers.
3409 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
3411 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
3415 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3417 * verify.c (do_invoke_method): Improve error messages.
3419 2009-04-08 Bill Holmes <billholmes54@gmail.com>
3421 * verify.c: Fixing the MSVC build.
3423 Code is contributed under MIT/X11 license.
3425 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
3427 * security-core-clr.c: Simplify get_reflection_caller not to call
3428 mono_method_get_last_managed (another stack walk) and adjust the
3429 callers to handle a (should not happen) NULL return value.
3431 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3433 Add accessors to some MonoGenericParam fields
3434 * class-internals.h (mono_generic_param_owner): New accessor.
3435 (mono_generic_param_num): Likewise.
3436 (mono_type_get_generic_param_owner): New helper.
3437 (mono_type_get_generic_param_num): New helper.
3438 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
3440 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3442 * class-internals.h (mono_generic_container_get_param): New wrapper.
3443 * class.c, icall.c, metadata.c, verify.c: Use it.
3445 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3448 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
3449 the standard case/loop. In particular, don't complain about
3450 references to generic type definitions.
3452 2009-04-07 Zoltan Varga <vargaz@gmail.com>
3454 * debug-helpers.c (dis_one): Decode string arguments.
3456 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3458 * pedump.c (dump_verify_info): Dump type name correctly.
3460 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3462 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
3463 are larger than code size.
3465 This can happen in valid code if the try/catch block is not followed by any instruction
3466 and do a backward branch on the leave instruction.
3470 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
3472 * security-core-clr.c: Fix typo while comparing second method names
3473 in can_avoid_corlib_reflection_delegate_optimization
3475 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
3477 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
3481 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
3483 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
3484 a MVAR using a class context.
3488 2009-04-06 Zoltan Varga <vargaz@gmail.com>
3490 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
3492 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
3494 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
3495 functions supplied by the JIT for the SGEN GC.
3497 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
3499 2009-04-06 Massimiliano Mantione <massi@ximian.com>
3501 monitor.c (mono_monitor_try_enter_internal):
3502 Added calls to profile monitor contentions.
3503 Also duplicated a small piece of code (the "get the monitor" logic)
3504 from the fast path to the slow path, and changed the relevant goto
3505 statements, so that monitor acquisition events can be emitted from the
3506 slow path (this is by Paolo Molaro).
3508 2009-04-06 Massimiliano Mantione <massi@ximian.com>
3510 * profiler.c, profiler.h, profiler-private.h:
3511 Added support for profiling monitor contentions.
3513 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
3515 * metadata-verify.c: Verify the modules table.
3517 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
3519 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
3520 using the context of the method been verifier and not of the method been called.
3522 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
3523 safely inflate generic types.
3525 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
3527 * security-core-clr.c: Change the strategy for checking the
3528 "reflection using delegates optimization" to avoid unneeded
3529 attributes in multiple class libraries.
3531 2009-04-02 Mark Probst <mark.probst@gmail.com>
3533 * sgen-gc.c: Remove object element in the disappearing link struct
3534 by storing the object pointer in the link.
3536 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3538 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
3540 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3542 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
3544 * verify.c (mono_method_verify): Do proper bounds checking of exception
3547 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3549 * loader.c (mono_field_from_token): Don't crash if the field parent could
3552 2009-03-31 Mark Probst <mark.probst@gmail.com>
3554 * sgen-gc.c: Execute critical finalizers after ordinary
3557 * class-internals.h, domain.c: Add CriticalFinalizerObject to
3560 2009-03-31 Jb Evain <jbevain@novell.com>
3562 * verify.c (do_ldstr): don't check if a string is in the user strings
3563 heap if the current image is dynamic.
3565 2009-03-31 Mark Probst <mark.probst@gmail.com>
3567 * sgen-gc.c: Wait until the last finalizer has executed when
3568 returning from WaitForPendingFinalizers.
3570 2009-03-31 Martin Baulig <martin@ximian.com>
3572 * mono-debug-debugger.h (MonoDebuggerEvent): Add
3573 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
3574 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
3575 (mono_debugger_event_create_appdomain): New function.
3576 (mono_debugger_event_unload_appdomain): New function.
3578 * appdomain.c (mono_domain_create_appdomain_internal): Call
3579 mono_debugger_event_create_appdomain().
3581 2009-03-31 Martin Baulig <martin@ximian.com>
3583 * mono-debug-debugger.c
3584 (mono_debugger_register_class_init_callback): Also register the
3585 class init callback if the class is already initialized to make
3586 things work with shadow copied assemblies.
3588 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
3590 * security-core-clr.c
3591 (mono_security_core_clr_ensure_reflection_access_field): Let
3592 critical code access the field (just like we do for methods). Use
3593 check_field_access helper.
3594 (mono_security_core_clr_ensure_reflection_access_method): Use
3595 check_field_access helper.
3597 2009-03-31 Mark Probst <mark.probst@gmail.com>
3599 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
3600 call the run-finalize function directly.
3602 * gc.c, gc-internal.h: Make run_finalize() non-static.
3604 2009-03-31 Mark Probst <mark.probst@gmail.com>
3606 * sgen-gc.c: Use a separate struct for disappearing links.
3608 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
3610 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
3611 * MaxIOVectorLength enabled, just ignore them.
3614 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
3616 * metadata-verify.c: Fix eglib build.
3618 2009-03-30 Zoltan Varga <vargaz@gmail.com>
3620 * threads-types.h: Fix the win32 build.
3622 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
3624 * class.c: move coreclr inheritance/override checks to
3626 * security-core.clr.c|h: add code from class.c with additional
3627 documentation. Fix override check when the method is not critical.
3629 2009-03-28 Zoltan Varga <vargaz@gmail.com>
3631 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
3632 (match_class): Ditto.
3634 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
3636 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
3638 * metadata-verify.c: Implement table layout row size calculation. Verify
3639 the total size of the tables.
3641 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
3643 * metadata-verify.c: Verify heap sizes and size to decode row counts.
3645 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
3648 * console-io.[ch]: added new mono_console_init() to make sure that
3649 file descriptors 0, 1 and 2 are opened.
3652 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
3654 * appdomain.h: Export a new callback type and a new function to
3655 set this callback. This allow a mono host to provide it's own
3656 definition for "platform code".
3657 * metadata-internals.h: Add a core_clr_platform_code flag on
3658 _MonoImage to (cache and) know if it is representing platform
3660 * image.c (do_mono_image_open): Set core_clr_platform_code flag
3661 on platform code images.
3662 * security-core-clr.c|h
3663 (mono_security_set_core_clr_platform_callback): Allow the host
3664 to provide it's own platform check definition.
3665 (mono_security_core_clr_determine_platform_image): Detect if an
3666 image is platform code (using the specified callback).
3667 (mono_security_core_clr_is_platform_image): Return cached value
3670 2009-03-27 Zoltan Varga <vargaz@gmail.com>
3672 * threads.c (mono_create_thread): New helper function to wrap CreateThread
3673 which has different parameter types for the 'tid' argument in windows and
3676 * appdomain.c attach.c threads.c: Use the new helper.
3678 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
3680 * metadata-verify.c: Verify valid table bits.
3682 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
3684 * metadata-verify.c (verify_metadata_header): Store size in the size field.
3686 * metadata-verify.c: Add initial table schema verification.
3688 2009-03-26 Zoltan Varga <vargaz@gmail.com>
3690 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
3691 obtain the refclass argument needed by mono_param_get_objects (). Fixes
3694 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
3696 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
3698 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
3700 * security-core-clr.c: Add/update documentation
3702 2009-03-26 Zoltan Varga <vargaz@gmail.com>
3704 * marshal.c (emit_marshal_object): Generate code to throw an exception
3705 instead of throwing it. Fixes #488670.
3707 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
3709 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
3710 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
3711 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
3712 and add a call to mono_security_core_clr_ensure_delegate_creation
3713 to do the extra checks required by CoreCLR.
3714 * security-core-clr.c|h: Add function to check delegate creation,
3715 both in the binding and accessibility, under CoreCLR.
3717 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
3719 * reflection.c (mono_reflection_create_dynamic_method): when
3720 coreclr is enabled make sure that every resolved object are
3721 checked (e.g. field and method access).
3722 * security-core-clr.c|h: Add function to check objects resolved
3723 when a dynamic method is created.
3725 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3727 * metadata-verify.c: Cache directory rva translations.
3729 * metadata-verify.c: Add cli-header and streams verification.
3731 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3733 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
3734 the wrong offset (8 instead of 6).
3736 2009-03-23 Zoltan Varga <vargaz@gmail.com>
3738 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
3739 methods, return the native function address itself. Fixes
3742 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
3744 * console-io.c: some of the values for control characters might not be
3747 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
3749 * exception.c|h: Add helpers to create [Field|Method]AccessException
3750 * icall.c: Add required coreclr check calls for field reflection.
3751 Move the existing (method) check logic into security-core-clr.c
3752 * security-core-clr.c: Add functions to check if the access of a
3753 field or method is allowed when reflecting under coreclr. This is
3754 mostly done using a stack walk to find the "real" caller: i.e. the
3755 code that is calling the reflection
3757 2009-03-20 Zoltan Varga <vargaz@gmail.com>
3759 * gc-internal.h: Change location of gc_wrapper.h
3761 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
3763 * class.c: Simplification to coreclr checks for overrides that
3764 makes it easier to set breakpoints.
3766 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
3768 * security-core-clr.c|h: (mono_security_core_clr_class_level,
3769 mono_security_core_clr_method_level): Avoid potential
3770 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
3771 user/application code) and make it easier to set breakpoints
3773 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3775 * metadata-verify.c: Reject cli header tables that mono don't handle.
3777 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3779 * pedump.c: Fix CLI header dumping.
3781 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3783 * metadata-verify.c: More CLI header verification.
3785 2009-03-19 Zoltan Varga <vargaz@gmail.com>
3787 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
3789 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
3791 * metadata-verify.c: Initial verification of the CLI header.
3793 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
3795 * metadata-verify.c (verify_resources_table): Fix verification of zero
3796 sized resource section and id entries count.
3798 2009-03-18 Zoltan Varga <vargaz@gmail.com>
3800 * icall.c: Handle user types in many Type icalls. Fixes #486303.
3802 2009-03-17 Jb Evain <jbevain@novell.com>
3804 * profiler.c: call mono_gc_base_init from mono_profiler_load.
3806 2009-03-17 Zoltan Varga <vargaz@gmail.com>
3808 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
3809 (mono_gc_make_descr_for_array): Ditto.
3811 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
3813 * verify.c (mono_verifier_is_class_full_trust): Add support for
3814 CoreCLR security mode where trusted assemblies are defined as
3817 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3819 * metadata-verify.c: Add minimal PECOFF resource verification.
3821 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3823 * metadata-verify.c: Be less restrictive with some coff fields.
3825 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3827 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
3828 params as boxed values on stack. Fixes #485706.
3830 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3832 * console-io.c: the termios values may vary in different flavors of unix.
3834 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3836 * console-io.[ch]: return the entire set of control characters when
3837 initializing the terminal.
3838 * appdomain.c: bump corlib version.
3840 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
3842 * mono-perfcounters.c: added support for in-process custom
3843 performance counters.
3845 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3847 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
3849 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3851 * metadata-verify.c: Verify the data pointed by the import table.
3853 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3855 * metadata-verify.c (load_data_directories): Store data
3858 * metadata-verify.c: Verify the import table.
3860 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3862 * metadata-verify.c: Verify data directories.
3864 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3866 * metadata-verify.c: Check section header flags.
3868 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3870 * appdomain.c: if the assembly name is a shadow-copied file, return
3871 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
3872 in mono_make_shadow_copy.
3873 * icall.c: if the assembly name is a shadow-copied file, replace it
3874 with the original assembly path.
3876 Bug #484244 fixed. NUnit tests for corlib can be run without
3879 2009-03-12 Zoltan Varga <vargaz@gmail.com>
3881 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
3882 entries when the table is reallocated.
3884 * icall.c: Allocate the memory used by the mono_ptr_array macros using
3885 mono_gc_alloc_fixed () since it contains GC refs.
3887 2009-03-10 Zoltan Varga <vargaz@gmail.com>
3889 * reflection.c (ensure_complete_type): New helper function to call
3890 type resolve handlers for unfinished dynamic types.
3891 (resolve_object): Call it for MonoClassFields. Fixes #483852.
3893 2009-03-09 Zoltan Varga <vargaz@gmail.com>
3895 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
3898 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
3900 * appdomain.c (get_shadow_assembly_location): Fix memleak.
3902 2009-03-08 Zoltan Varga <vargaz@gmail.com>
3904 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
3905 between GCHandles of type WeakTrackResurrection and the objects they
3908 * gc.c: Partly implement the sematics of GCHandles of type
3909 WeakTrackResurrection: these handles should only be cleared after the
3910 finalizer of the object they are pointing to has ran.
3912 2009-03-06 Mark Probst <mark.probst@gmail.com>
3914 * icall.c: Partially revert r126631 because using the jump
3915 trampolines for generic shared methods makes it superfluous.
3917 2009-03-06 Zoltan Varga <vargaz@gmail.com>
3919 * threads.c (handle_store): Create the 'threads' hash table with the proper
3920 MONO_HASH_VALUE_GC type.
3922 2009-03-05 Zoltan Varga <vargaz@gmail.com>
3924 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
3927 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
3928 and LAST_GC_TRACKED as a GC root.
3930 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
3932 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
3933 the static data even if it consists of 1 reference.
3935 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
3936 if there is a GC descriptor.
3938 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
3939 instead of through the GC since they contain no object references.
3941 2009-03-05 Mark Probst <mark.probst@gmail.com>
3943 * generic-sharing.c (instantiate_other_info): Always return a jump
3944 trampoline for method code.
3946 2009-03-05 Marek Habersack <mhabersack@novell.com>
3948 * culture-info-tables.h: generated to include the en-tt culture.
3950 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3952 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
3953 capture the thread context.
3955 * object.c (mono_async_result_new): Cache the invoke wrappers to
3956 ExecutionContext::Capture.
3958 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3960 * marshal.h: Add a prototype for what mono_compile_method returns
3961 for invoke wrappers.
3963 * gc.c: Use the new prototype declaration.
3965 2009-03-04 Geoff Norton <gnorton@novell.com>
3967 * boehm-gc.c: Add some MONO_LOG tracing for the GC
3969 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
3971 2009-03-04 Martin Baulig <martin@ximian.com>
3974 (mono_debugger_runtime_invoke): Removed.
3976 * mono-debug-debugger.c
3977 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
3979 2009-03-02 Martin Baulig <martin@ximian.com>
3982 (mono_debugger_unhandled_exception): Removed.
3983 (mono_debugger_handle_exception): Removed.
3984 (mono_debugger_throw_exception): Removed.
3987 (mono_debug_debugger_version): Bump to 5.
3989 * mono-debug-debugger.c: Moved the exception handling code to
3990 ../mini/debug-mini.c
3992 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3994 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
3995 finalize_objects_hash.
3997 * gc.c: Use the separate lock to access the finalize_objects_hash field.
3999 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
4002 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
4005 * image.c (mono_image_close): Free it.
4007 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
4008 allowing a creation of a wrapper which invokes its method using a CALLVIRT
4009 on the this argument.
4011 * gc.c (run_finalize): Optimize the calling of the finalizers.
4013 2009-03-03 Martin Baulig <martin@ximian.com>
4015 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
4016 of the `MonoGenericInst' changes.
4018 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4020 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
4021 mono_array_class_get_cached to reduce locking contention. Extract
4024 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
4025 intermediary managed arrays. Use caching version of mono_array_new
4026 to allocate the result array.
4028 * icall.c (ves_icall_Type_GetEvents_internal): Same.
4030 * icall.c (ves_icall_Type_GetNestedTypes): Same.
4032 * locales.c (create_names_array_idx): Use mono_array_new_cached
4033 to reduce locking contention.
4035 2009-03-03 Zoltan Varga <vargaz@gmail.com>
4037 * object.c (mono_method_add_generic_virtual_invocation): Put back the
4038 thunk builder code for the non-interface case.
4040 2009-03-02 Zoltan Varga <vargaz@gmail.com>
4042 * object.c (get_generic_virtual_entries): New helper function to collect
4043 the virtual generic method instances which need to be added to an IMT
4045 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
4046 Instead of creating a new IMT thunk, reset the vtable slot to the
4047 trampoline, the thunk will be created the next time the trampoline is called.
4048 (build_imt_slots): Add support for virtual generic methods in interfaces by
4049 adding to the IMT thunk all the methods registered using
4050 mono_method_add_generic_virtual_invocation ().
4052 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
4053 (struct _MonoIMTCheckItem): Ditto.
4055 * object.c (mono_method_add_generic_virtual_invocation): Take a
4056 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
4057 the IMT thunk to include all items.
4059 * object.c (mono_class_create_runtime_vtable): Add a missing
4060 mono_loader_unlock ().
4062 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
4064 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4066 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
4068 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
4070 * object-internals.h: Rename _MonoReflectionEvent to
4071 MonoReflectionMonoEvent so it reflects the right managed type.
4072 Add a MonoReflectionEvent that correctly represents System.EventInfo.
4075 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
4078 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
4080 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
4081 intermediary managed arrays. Use caching version of mono_array_new
4082 to allocate the result array.
4084 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
4086 * reflection.c: Use cached version of mono_array_new alongside
4087 the mono_reflection_get_custom_attrs_by_type call path.
4089 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
4091 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
4092 intermediary managed arrays. Use caching version of mono_array_new
4093 to allocate the result array.
4095 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
4097 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
4099 * icall.c: Add small implementation of a growable stack bound array.
4101 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
4103 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
4104 intermediary managed arrays. Use caching version of mono_array_new
4105 to allocate the result array.
4107 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
4109 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
4110 helps Enum::CompareTo to be implemented without reboxing all enums
4111 to their underlying type.
4112 2009-02-27 Zoltan Varga <vargaz@gmail.com>
4114 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
4115 since it acquires a global lock leading to scalability problems.
4117 * profiler.c: Make the stat profiler work with multiple appdomains, this
4118 currently only works when no appdomains are unloaded.
4120 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
4122 * appdomain.c: make the check to avoid copying when the assembly is
4123 already shadow copied actually work.
4125 2009-02-26 Zoltan Varga <vargaz@gmail.com>
4127 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4129 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
4130 changes to the managed side.
4132 2009-02-25 Zoltan Varga <vargaz@gmail.com>
4134 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
4135 classes + a separate lock for it, as it is used frequently at runtime, not
4136 just during metadata loading/JIT compilation.
4138 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
4141 * object-internals.h (mono_class_from_name_cached): New macro to cache
4142 the results of the lookup locally without having to declare a static
4143 variable to hold it.
4144 (mono_class_get_field_from_name_cached): Ditto.
4145 (mono_array_class_get_cached): Ditto.
4147 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
4150 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
4151 slower search in metadata.
4153 * pedump.c: Fix a warning.
4155 2009-02-23 Zoltan Varga <vargaz@gmail.com>
4157 * reflection.c (encode_locals): Add checks for user types.
4158 (method_encode_clauses): Ditto.
4159 (method_encode_code): Ditto.
4160 (mono_image_create_token): Ditto.
4162 * object-internals.h: Change the type of more fields from MonoReflectionType*
4165 2009-02-22 Zoltan Varga <vargaz@gmail.com>
4167 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
4168 the a thread does not suspend within 100ms.
4170 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
4171 in addition to StopRequested as well.
4173 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
4175 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
4176 search the method_hash before inserting a new entry, to avoid crashes when
4177 the same method is inserted multiple times, causing the old
4178 MonoDebugMethodInfo structure to be freed by the value dtor function.
4180 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
4182 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
4183 SO_EXLUSIVEADDRUSE where available.
4185 2009-02-21 Zoltan Varga <vargaz@gmail.com>
4187 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
4188 runtime invoke wrappers, this time it is string ctor wrappers, which
4189 pass a dummy string as 'this' instead of their obj argument. Fixes
4192 2009-02-21 Jb Evain <jbevain@novell.com>
4194 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
4195 only get create_culture once.
4197 2009-02-20 Zoltan Varga <vargaz@gmail.com>
4199 * reflection.c (mono_reflection_setup_internal_class): Move the user type
4200 check before the locking.
4202 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
4203 (mono_reflection_create_runtime_class): Ditto.
4204 (mono_reflection_sighelper_get_signature_local): Ditto.
4205 (mono_reflection_sighelper_get_signature_field): Ditto.
4207 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
4208 is a System.MonoType object or similar.
4209 (monotype_cast): New helper function to cast a MonoObject to a
4210 MonoReflectionType object.
4212 * object-internals.h: Change MonoReflectionType* members in structures to
4213 MonoObject* members to force the usage of the monotype_cast () function.
4215 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
4216 structures/arrays. This causes us to assert instead of crashing when
4217 instances of user defined subclasses of System.Type are encountered.
4219 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
4223 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
4224 win32 resource loaded from a PE file.
4226 * image.c: fix mono_image_lookup_resource.
4228 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
4232 * threads.c: added internal call for WaitHandle.SignalAndWait.
4234 2009-02-19 Bill Holmes <billholmes54@gmail.com>
4236 * cominterop.c : Adding cominterop_type_from_handle and
4237 registering it as an icall. Replacing all references
4238 to type_from_handle.
4240 Code is contributed under MIT/X11 license.
4242 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
4244 * Makefile.am: Add lock-tracer.h and lock-trace.c.
4246 * appdomain.c: Call the tracer init function.
4248 * domain-internals.h: Enable the tracer for the domain locks.
4250 * image.c: Enable the tracer for image locks.
4252 * loader.c: Enable the trace for the loader lock.
4255 * lock-tracer.c: Initial implementation of the lock trace utility.
4256 The tracer requires a compile time define to be enabled and a env var
4257 to be enabled at runtime.
4259 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
4261 * domain.c (mono_domain_code_foreach): Improve documentation.
4263 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
4266 * generic-sharing.c:
4268 * reflection.c: Adjust locking order to the new semantics where the loader lock
4271 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
4273 * domain.c: Add mono_domain_code_* functions that perform locking
4274 around the domain codeman.
4276 * domain-internals.h: Export those functions.
4278 * object.c: Use new functions instead of acquiring the domain lock.
4280 2009-02-19 Zoltan Varga <vargaz@gmail.com>
4282 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
4283 delegate. Fixes #477396.
4285 2009-02-18 Zoltan Varga <vargaz@gmail.com>
4287 * reflection.c (create_custom_attr): Get rid of alloca.
4289 2009-02-18 Bill Holmes <billholmes54@gmail.com>
4291 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
4292 Adding exception handling for all CCW calls.
4294 Code is contributed under MIT/X11 license.
4296 2009-02-18 Zoltan Varga <vargaz@gmail.com>
4298 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
4300 * marshal.c (emit_marshal_boolean): Add null checks to the new
4301 native->managed marshalling code. Fixes #476247.
4303 2009-02-17 Zoltan Varga <vargaz@gmail.com>
4305 * class.c (mono_class_get_vtable_entry): Move the addition of
4306 static rgctx invoke wrappers for vtable methods here, this simplifies
4307 a lot of code and causes fewer rgctx wrappers to be created.
4309 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
4310 name of the statistics to begin with an uppercase.
4312 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4314 * reflection.c: Revert previous change as it breaks the build.
4316 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4318 * verify.c: Properly handle SZARRAY element type.
4322 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4324 * reflection.c (mono_image_create_method_token): Correctly encode
4325 MethodDef MemberRefParent token.
4329 2009-02-17 Zoltan Varga <vargaz@gmail.com>
4331 * image.c (mono_image_close): Delete the critical section before
4332 freeing the memory holding it.
4334 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4336 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
4339 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4341 * pedump.c (main): Call mono_marshal_init so pedump
4344 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4346 * loader.c (method_from_memberref): Properly fix #474271 and
4347 don't break the runtime bad.
4349 2009-02-16 Zoltan Varga <vargaz@gmail.com>
4351 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
4352 (mono_domain_alloc0): Ditto.
4354 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4356 * loader.c (method_from_memberref): Don't abort if the array
4357 method is not found. A regular loader failure is more informative
4362 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4364 *loader.c: Guard MonoImage::method_cache/methodref_cache
4365 using the image lock instead of the loader lock.
4367 * metadata.h: Add comments about which fields are protected by
4370 2009-02-16 Zoltan Varga <vargaz@gmail.com>
4372 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
4374 * generic-sharing.c (mono_method_construct_object_context): Remove the
4375 wrapper_type == NONE assert, it is not needed.
4377 2009-02-15 Zoltan Varga <vargaz@gmail.com>
4379 * reflection.c (clear_cached_object): New helper function.
4380 (mono_method_clear_object): New function to clear the cached reflection
4381 objects for a dynamic method.
4383 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
4384 Partly fixes # 463323.
4386 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
4390 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
4392 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
4394 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
4395 take the image lock instead of the loader lock.
4397 * metadata-internals.h: Export new functions.
4399 2009-02-12 Miguel de Icaza <miguel@novell.com>
4401 * domain.c (app_config_parse): Remove another use of stat that is
4402 not necessary as g_file_get_contents already does the presence
4405 2009-02-13 Zoltan Varga <vargaz@gmail.com>
4407 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
4409 * marshal.c: Move the bstr handling code to cominterop.c.
4411 * marshal.c: Remove some COM interop code missed previously.
4413 2009-02-12 Miguel de Icaza <miguel@novell.com>
4415 More Paolo patches from the Wii port:
4417 * security.c: Remove ves_icall_System_Environment_get_UserName
4420 * icall.c: And put ves_icall_System_Environment_get_UserName
4423 * appdomain.c (mono_set_private_bin_path_from_config): Remove
4424 redundant call to stat that was only used to test for the file
4425 existence. Patch from Paolo.
4427 * gc.c (run_finalize): If COM is disabled, do not link in
4428 mono_marshal_free_ccw.
4430 * generic-sharing.c: Use alloca.h here as well.
4432 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
4434 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
4436 2009-02-13 Zoltan Varga <vargaz@gmail.com>
4438 * cominterop.c cominterop.h: New files.
4440 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
4441 function/typedefs which are needed by cominterop.c global.
4443 2009-02-12 Mark Probst <mark.probst@gmail.com>
4445 * generic-sharing.c: Don't take the loader lock to guard image
4448 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4450 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
4451 called without the loader lock which is required to guard MonoImage:tokens.
4453 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4459 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
4461 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4463 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
4464 Rework the code to use regular mono_image_alloc/0.
4466 * loader.c: Rework the code to use regular mono_image_alloc/0.
4468 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
4470 2009-02-12 Bill Holmes <billholmes54@gmail.com>
4472 * object-internals.h : Fixing a typo in the
4473 MonoReflectionComVisibleAttribute struct.
4475 * marshal.c (cominterop_com_visible): Check the implemented
4476 interfaces for ComImport.
4478 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
4479 assume that bools should be treated as VARIANTBOOLs.
4481 * marshal.c (emit_marshal_boolean): Adding cases for
4482 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
4484 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
4485 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
4487 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
4488 should be treated as VARIANTBOOLs.
4490 Code is contributed under MIT/X11 license.
4492 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4494 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
4495 allocation with the image lock.
4497 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4499 This patch is the last of a series to remove explicit reference of MonoImage::mempool
4500 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
4502 * object.c: Add mono_string_to_utf8_image.
4504 * object-internals.h: Export mono_string_to_utf8_image.
4506 * reflection.c: Rework all explicit references to the the image mempool to go thought
4507 the mono_image_alloc set of functions.
4509 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4511 This patch is the third of a series to remove explicit reference of MonoImage::mempool
4512 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
4513 and generics-sharing.c.
4515 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
4516 as first argument. Note that this function remains broken as it doesn't perform locking around the
4519 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
4521 * image.c: Add g_slist_append_image.
4523 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
4524 the supplied image for allocation. Move code into mono_metadata_field_info_full.
4526 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
4527 Fix all related code to do the same.
4529 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
4531 * metadata-internals.h: Fix the signatures.
4533 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4535 This patch is the second of a series to remove explicit reference of MonoImage::mempool
4536 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
4537 and similar to work using MonoImage.
4539 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
4542 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
4544 * class.c (mono_metadata_signature_deep_dup): Same.
4546 * class.c (inflate_generic_type): Same.
4548 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
4550 * metadata.c (mono_metadata_signature_dup_full): Same.
4552 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
4553 mono_metadata_signature_dup_full.
4555 * metadata.c (mono_metadata_type_dup): Same.
4557 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
4559 * reflection.c: Same.
4561 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
4563 * metadata-internals.h: Fix the signatures.
4565 * class-internals.h: Same.
4567 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4569 This patch is the first of a series to remove explicit reference of MonoImage::mempool
4570 and use mono_image_alloc set of functions instead.
4572 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
4573 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
4576 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
4578 * class.c (g_list_prepend_mempool): Removed.
4580 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
4582 * image.c: Add g_list_prepend_image.
4584 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
4586 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
4589 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4591 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
4594 * image.c (mono_image_init): Init the lock field.
4596 * image.c (mono_image_init): Cleanup the lock field.
4598 * image.c: Add mono_image_(un)lock functions.
4600 2009-02-11 Mark Probst <mark.probst@gmail.com>
4602 * class.c, class-internals.h: mono_method_get_context_general()
4603 combines the functionality of mono_method_get_context() and
4604 mini_method_get_context().
4606 * generic-sharing.c, domain-internals.h:
4607 mono_method_construct_object_context() and
4608 mono_domain_lookup_shared_generic() moved from mini.
4610 * icall.c (ves_icall_InternalInvoke): Handle the case where the
4611 method doesn't have the correct instantiation because it's shared
4612 generic code. Fixes #473999.
4614 2009-02-11 Zoltan Varga <vargaz@gmail.com>
4616 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
4618 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
4620 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4622 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
4624 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
4626 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
4627 and recheck the cache for dups after it.
4629 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
4631 Fixes one of the deadlocks found in #473150.
4633 2009-02-11 Bill Holmes <billholmes54@gmail.com>
4635 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
4636 For Win32, add additional break conditions for accept.
4638 Code is contributed under MIT/X11 license.
4640 2009-02-10 Zoltan Varga <vargaz@gmail.com>
4642 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
4643 lazily initialize the native wrapper cache.
4644 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
4645 cache, since they are different from the normal wrappers.
4647 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
4649 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
4650 AOT compiled native wrappers.
4652 2009-02-09 Geoff Norton <gnorton@novell.com>
4655 * security-core-clr.c: Allow enabling core-clr from the embedding
4658 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4660 * socket-io.c: when requesting all the local ips, if there are no
4661 interfaces up and running, MS returns 127.0.0.1.
4663 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4665 * mono-perfcounters-def.h: processor time is an inverse time.
4668 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4670 * socket-io.c: an empty host name returns the list of local IPs.
4671 Fixes bug #386637 part 1/2.
4673 2009-02-07 Zoltan Varga <vargaz@gmail.com>
4675 * verify.c (mono_class_interface_implements_interface): Call
4676 mono_class_setup_interfaces ().
4677 (merge_stacks): Ditto.
4679 2009-02-06 Zoltan Varga <vargaz@gmail.com>
4681 * class.c (mono_class_setup_interfaces): New function to lazily initalize
4683 (mono_generic_class_get_class): Don't initalize klass->interfaces.
4684 (mono_generic_class_get_class): Ditto.
4686 2009-02-06 U-QUACK\miguel <miguel@quack>
4688 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
4689 they live in security.c
4691 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
4692 another bit from Paolo's code.
4694 2009-02-06 Zoltan Varga <vargaz@gmail.com>
4696 * object.c (build_imt_slots): Add a small optimization to avoid inflating
4697 methods which will be discarded by add_imt_builder_entry ().
4699 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
4702 * loader.c: Add a statistics for the size of the memberref signature cache.
4704 * loader.c (find_cached_memberref_sig): New helper function.
4705 (cache_memberref_sig): Ditto.
4707 * loader.c: Cache the result of parsing memberref signatures, since otherwise
4708 they will be parsed again for every generic instantiation, leading to unbounded
4711 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4713 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
4714 parameters of generic methods.
4716 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
4717 after the original method is copied to the inflated method.
4718 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
4720 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
4721 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
4723 * class.c metadata.c: Update after the changes above.
4725 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
4727 * metadata-verify.c: Simplified error handling and added
4728 section table validation.
4730 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4732 * class-internals.h (MonoClassExt): New structure containing rarely used
4733 fields of MonoClass.
4734 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
4735 through a new 'ext' field.
4737 * class.c (mono_class_alloc_ext): New helper function to allocate
4740 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
4742 2009-02-05 Mark Probst <mark.probst@gmail.com>
4744 * object.c (mono_object_get_virtual_method): Properly inflate
4745 generic methods. Fixes #472692.
4747 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
4749 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
4750 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
4751 for the parent type, the created type must be ready to be used on a generic
4753 We fill this_arg/byval_arg if the parent is a generic instance to make sure
4754 we won't have duplicated entries in generic_inst_cache.
4758 2009-02-05 Miguel De Icaza <miguel@novell.com>
4760 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
4761 replace with plain BSD per the comments on the bug MONO77637.
4763 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4765 * class.c (mono_class_get_generic_class): New accessor function.
4766 (mono_class_get_generic_container): Ditto.
4768 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
4769 fields, similar to the ones in MonoMethod.
4771 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
4772 (mono_class_create_from_typedef): Set klass->is_generic if needed.
4774 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
4776 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
4777 the same information as element_class->byval_arg.
4779 * class.c reflection.c: Remove references to class->byval_arg.
4781 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
4782 klass->enum_basetype directly.
4784 * verify.c metadata.c object.c icall.c reflection.c: Use
4785 mono_class_enum_basetype () instead of accessing klass->enum_basetype
4788 2009-02-04 Miguel de Icaza <miguel@novell.com>
4790 * icall-def.h: Remove internal calls for sockets when
4791 DISABLE_SOCKET is defined, file system writing features when the
4792 OS only support reading and not writing data and Policy support if
4793 the Policy is disabled.
4795 * image.c (do_mono_image_open): Apply Paolo's patches for using
4796 mono_file_map_ APIs here.
4798 * assembly.c: Add support for platforms to avoid prefix
4801 2009-02-04 Zoltan Varga <vargaz@gmail.com>
4803 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
4806 * class.c (mono_class_inflate_generic_class): New helper function.
4808 * class.c: Use mono_class_inflate_generic_class in a few places. Add
4809 statistics for inflated methods/classes.
4811 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
4813 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
4814 the call is made from Delegate.CreateDelegate () for the invoke method of
4817 * loader.c: Add a statistics for the memory occupied by inflated signatures.
4819 * metadata.c (mono_metadata_signature_size): New helper function.
4821 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
4824 * metadata.c (inflated_method_in_image): Avoid calling
4825 mono_method_signature () if the method does not already have a signature.
4827 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4829 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
4830 valuetype is compatible with target type, check by inheritance as a
4831 VT is not really compatible with System.ValueType, for example.
4833 * verify.c (do_invoke_method): Improve error message.
4835 * verify.c (do_box_value): If boxing a nullable, use the type argument
4838 * verify.c (do_newobj): Improve error message.
4842 2009-02-03 Miguel de Icaza <miguel@novell.com>
4844 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
4846 2009-02-03 Mark Probst <mark.probst@gmail.com>
4848 * generic-sharing.c: Don't hold domain lock when calling
4849 instantiate_other_info(). Fixes #471958.
4851 * domain-internals.h, loader.c: Describe locking policy of domain
4852 lock vs loader lock.
4854 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4856 * verify.c (mono_delegate_signature_equal): Make it possible to check
4857 first-arg-bound delegates to static method.
4859 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
4860 static methods with the first arg bound.
4864 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4866 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
4869 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
4870 under strict mode. Any type, when boxed can be seen as a reference type.
4874 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4876 * object.h: The lower bound of an array is a signed integer value.
4877 Introduce mono_array_lower_bound_t typedef. It should be used instead of
4878 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
4880 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
4881 calculate the upper bound.
4885 2009-02-02 Miguel de Icaza <miguel@novell.com>
4887 From Paolo's work, refactored, cleared up:
4889 * threadpool.c, icall.c: ifdef code that requires a working socket
4892 * metadata.c (mono_metadata_field_info): Do not attempt to return
4893 a value from a function declared as void.
4895 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
4896 from the console stack.
4898 * assembly.c: use strrchr instead of rindex.
4900 * class.c, object.c, marshal.c, icall.c, reflection.c: include
4901 alloca.h on systems that have it.
4903 * environment.c: Avoid code that uses stuff from
4906 * appdomain.c: Include sys/time.h.
4908 * console-io.c: include sys/ioctl.h if it is available.
4910 2009-02-03 Zoltan Varga <vargaz@gmail.com>
4912 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
4914 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
4917 * marshal.c: Set mb->skip_visibility instead of setting it on the method
4918 after it was created and cached, as the later is not thread safe.
4920 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4922 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
4923 called while the debugging module is not initialized. Fixes #471669.
4925 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
4927 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
4931 2009-02-02 Mark Probst <mark.probst@gmail.com>
4933 * generic-sharing.c (lookup_or_register_other_info): Make sure the
4934 loader lock is not taken while the templates lock is held. Fixes
4937 2009-02-02 Mark Probst <mark.probst@gmail.com>
4939 * metadata.c (type_in_image): Added a check to fix a monodis
4942 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4944 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
4947 * object.c (mono_runtime_invoke_array): Ditto.
4949 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
4950 freeing wrappers of dynamic methods.
4952 * loader.c (mono_free_method): Call it. Fixes #463323.
4954 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
4955 methods taking vtype/byref arguments, to fix yet another bug caused by
4956 the sharing of runtime invoke wrappers. Partly fixes #471259.
4958 2009-02-01 Zoltan Varga <vargaz@gmail.com>
4960 * debug-mono-symfile.c (check_line): Return NULL instead of returning
4961 <first file in file table>:1 when the IL offset does not have an associated
4964 2009-01-31 Zoltan Varga <vargaz@gmail.com>
4966 * mono-debug.c (mono_debug_lookup_locals): New function to return local
4967 variable info for a method.
4969 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
4971 2009-01-30 Jb Evain <jbevain@novell.com>
4973 * pedump.c: reuse code from monodis to make sure pedump honors
4974 MONO_PATH, which is needed to verify net_2_1 assemblies.
4976 2009-01-29 Zoltan Varga <vargaz@gmail.com>
4978 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
4979 there is no line number info.
4981 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
4983 Avoid some MonoType allocations
4984 * reflection.c (mono_reflection_initialize_generic_parameter):
4985 Reuse MonoType from param->pklass rather than allocating one.
4986 (mono_dynamic_image_free): Update to changes.
4988 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4990 Rearrange some code to improve consistency
4991 * reflection.c (mono_reflection_setup_generic_class): Move body ...
4992 (mono_reflection_initialize_generic_parameter): ... here.
4994 2009-01-28 Zoltan Varga <vargaz@gmail.com>
4996 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
4997 with type constraints as an experiment.
4999 * boehm-gc.c (on_gc_notification): Update mono_stats.
5001 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
5003 Avoid some allocations
5004 * class-internals.h (_MonoGenericInst::type_argv): Convert from
5005 pointer to tail array to avoid extra allocation.
5006 * metadata.c (free_generic_inst): Update to changes.
5007 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
5010 2009-01-27 Zoltan Varga <vargaz@gmail.com>
5012 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
5013 return TRUE if the two type objects are the same.
5015 2009-01-26 Zoltan Varga <vargaz@gmail.com>
5017 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
5018 (mono_class_native_size): Use klass->marshal_info->min_align instead of
5019 klass->min_align, since klass->min_align contains the managed alignment,
5020 while the native alignment can be different, like for longs on x86.
5023 * class-internals.h (MonoMarshalType): Add a min_align field.
5025 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
5027 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
5030 2009-01-26 Zoltan Varga <vargaz@gmail.com>
5032 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
5033 some comments about the usage of the used_regs field.
5035 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
5038 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
5040 * appdomain.c: return NULL instead of throwing FileNotFoundException
5041 when LoadAssembly() fails.
5043 2009-01-23 Mark Probst <mark.probst@gmail.com>
5045 * metadata.c (mono_metadata_generic_param_equal): Only compare the
5046 image if the owner is NULL. Fixes the AOT failures.
5048 2009-01-23 Zoltan Varga <vargaz@gmail.com>
5050 * metadata.c (mono_metadata_load_generic_params): Initialize the
5051 MonoGenericParam structure using memset so the image field is initialized
5054 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5056 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
5059 2009-01-21 Zoltan Varga <vargaz@gmail.com>
5061 * class.c (mono_class_setup_vtable_general): In the generic instance
5062 optimization, set method->slot for abstract virtual methods. Fixes part of
5065 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5067 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
5068 which signals that the unloading has started but all appdomain services must
5071 * appdomain.c (mono_domain_unload): The initial state for unloading now
5072 is unloading_start and we switch to unloading after the managed call to
5073 AppDomain::DomainUnload has finished.
5075 The new unloading state has to be created because managed code in the
5076 DomainUnload event can depend on things like the threadpool still working.
5077 The domain must remain fully functional while the event executes.
5079 This shown as an issue due to Process::WaitForExit, which waits for
5080 async reads of stdout and stderr to complete. Since those are processed
5081 in the threadpool the code deadlocks because the DomainUnload callback
5082 waits for the async read finished event, which should have been set by a
5083 threadpool job but has been discarded due to the domain been in unload
5086 2009-01-21 Mark Probst <mark.probst@gmail.com>
5088 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
5091 2009-01-21 Mark Probst <mark.probst@gmail.com>
5093 * reflection.c (resolve_object): For fields, inflate the class and
5094 then get the field in the inflated class.
5096 2009-01-20 Mark Probst <mark.probst@gmail.com>
5098 * object-internals.h (struct _MonoException): Added a comment
5099 explaining the new use of trace_ips.
5101 2009-01-20 Mark Probst <mark.probst@gmail.com>
5103 * generic-sharing.c (inflate_other_data): Inflate array methods
5106 * loader.c, class-internals.h: Rename search_in_array_class() to
5107 mono_method_search_in_array_class() and make it non-static.
5109 2009-01-19 Zoltan Varga <vargaz@gmail.com>
5111 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
5112 Hopefully fixes #458168.
5114 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
5116 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
5117 as it is performed elsewhere.
5119 Code is contributed under MIT/X11 license
5121 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
5123 * mono-perfcounters-def.h: Add counters for asp.net requests total and
5125 * object.c (mono_raise_exception): Increment the exceptions total
5126 counter when an exception is thrown.
5127 * class-internals.h: Add a location for storing the total number of
5128 asp.net requests served.
5129 * mono-perfcounters.c: Implement update support for asp.net counters
5130 from the class libraries. Implement read support for asp.net counters
5131 and exceptions total counter.
5133 2009-01-19 Zoltan Varga <vargaz@gmail.com>
5135 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
5136 accessing klass->methods. Fixes #467385.
5138 2009-01-18 Zoltan Varga <vargaz@gmail.com>
5140 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
5141 for byval arguments without an [Out] attribute. Fixes #467212.
5143 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
5144 Fix compilation under android.
5146 * sgen-gc.c: Instead of scanning gray objects after all roots have been
5147 processed, scan them directly after they are copied, to achieve better locality
5150 * socket-io.c: Applied patch from Koushik Dutta
5151 (koush@koushikdutta.com). Disable IPV6 when running under android.
5153 2009-01-18 Zoltan Varga <vargaz@gmail.com>
5155 * icall.c (ves_icall_InternalExecute): Add write barriers.
5157 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
5160 * sgen-gc.c: Implement write barriers in IL code.
5162 2009-01-17 Geoff Norton <gnorton@novell.com>
5164 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
5166 2009-01-17 Geoff Norton <gnorton@novell.com>
5168 * image.c: When unloading the image->references table, there can be gaps
5169 in it. Ensure that we iterate every entry to avoid leaking assembly references
5170 when unloading an appdomain.
5172 2009-01-16 Zoltan Varga <vargaz@gmail.com>
5174 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
5175 speed up ptr-in-nursery checks.
5177 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
5178 threads_lock () to prevent deadlocks.
5180 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
5181 does not need to be scanned during minor collections, since writes to it
5182 must use write barriers.
5184 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
5186 * metadata-verify.c: Add pe nt header verification.
5188 2009-01-15 Zoltan Varga <vargaz@gmail.com>
5190 * gc.c: Fix a few warnings when using SGEN.
5192 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
5194 * metadata-verify.c: Add pe optional header verification.
5196 2009-01-15 Zoltan Varga <vargaz@gmail.com>
5198 * sgen-gc.c: Add support for user defined marker functions, used by
5199 MonoGHashTable to avoid registering a GC root for every hash node.
5201 2009-01-14 Zoltan Varga <vargaz@gmail.com>
5203 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
5204 non-pinned roots into separate hashes to avoid having to traverse them
5205 in functions which are only interested in one kind.
5207 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
5209 * metadata-verify.c: Add pe header machine field verification.
5211 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
5213 * metadata-verify.c: Add pe header size verification.
5215 2009-01-14 Zoltan Varga <vargaz@gmail.com>
5217 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
5218 using the GC, they don't contain references.
5220 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
5222 2009-01-13 Geoff Norton <gnorton@novell.com>
5224 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
5225 AppDomains created on the native side can be cleaned up on the native side.
5227 2009-01-13 Geoff Norton <gnorton@novell.com>
5229 * appdomain.c: Ensure that we call mono_context_init for the embedding api
5230 as well as the managed api.
5232 2009-01-13 Geoff Norton <gnorton@novell.com>
5234 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
5235 with a MonoAppDomain initialized against it.
5237 2009-01-13 Zoltan Varga <vargaz@gmail.com>
5239 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
5241 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
5243 * marshal.c: Avoid setting the exception clauses after a method has been entered
5244 into the wrapper caches. Fixes #465700.
5246 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
5248 (mono_mb_create_method): Set the clauses from the method builder.
5250 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5252 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
5253 Patch from Makoto Kishimoto.
5255 2009-01-13 Zoltan Varga <vargaz@gmail.com>
5257 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
5258 encoding them as ROOT_DESC_COMPLEX.
5259 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
5261 2009-01-12 Zoltan Varga <vargaz@gmail.com>
5263 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
5264 no longer point to the nursery.
5266 * sgen-gc.c: Add a few comments/FIXMEs.
5268 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
5270 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
5271 initialization of the various _method variables thread safe. Fixes
5274 2009-01-12 Mark Probst <mark.probst@gmail.com>
5276 * domain.c, domain-internals.h: Remove the shared_generics_hash
5277 and its lookup functions.
5279 2009-01-12 Bill Holmes <billholmes54@gmail.com>
5281 * socket-io.c: Fixing the MSVC build.
5283 Code is contributed under MIT/X11 license.
5285 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
5287 * metadata-verify.c: Add pe header watermark verification.
5289 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5291 * metadata-verify.c: Add lfanew verification.
5293 2009-01-12 Jb Evain <jbevain@novell.com>
5295 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
5296 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
5298 2009-01-10 Zoltan Varga <vargaz@gmail.com>
5300 * socket-io.c: Fix the build.
5302 * environment.c: Fix an #ifdef.
5304 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5306 * threadpool.c (async_invoke_thread): Handle the wait function returning
5307 WAIT_IO_COMPLETION as well.
5308 (async_invoke_io_thread): Ditto.
5310 2009-01-09 Bill Holmes <billholmes54@gmail.com>
5312 * threads.c: Fixing the Windows build.
5314 Code is contributed under MIT/X11 license.
5316 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5318 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
5320 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
5321 the thread to wait again.
5323 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5325 * metadata-verify.c: Initial skeleton of the metadata verifier.
5327 * pedump.c: Add support for the metadata verifier.
5329 * verify-internal.h: Export the whole assembly metadata verifier function.
5331 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5333 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
5335 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5337 * Makefile.am: Upgrade dtrace-prelink.sh location.
5339 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
5341 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
5342 well. Otherwise the shutdown deadlock that happens on unix will can happen
5344 If the main thread code finishes too fast it's possible that the finalizer
5345 thread won't have executed yet, won't record itself as the finalizer thread
5346 and the shutdown sequence will wait on it forever.
5348 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
5350 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
5353 2009-01-08 Miguel de Icaza <miguel@novell.com>
5355 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
5356 Robert Jordan for pointing this out.
5358 2009-01-08 Christian Prochnow <cproch@seculogix.de>
5361 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
5362 ves_icall_System_IO_DriveInfo_GetDriveType.
5364 2009-01-07 Miguel de Icaza <miguel@novell.com>
5366 * icall.c: Wrap calls to mono_strtod in CriticalSection
5367 invocations when using eglib, to work around #464316.
5369 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
5371 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
5372 return value of GetCurrentDirectory to never access unitialized memory.
5374 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
5376 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
5377 return value of GetCurrentDirectory and expand the buffer if needed.
5381 2009-10-07 Tom Hindle <tom_hindle@sil.org>
5383 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
5384 Adding a call to mono_init_com_types.
5386 Code is contributed under MIT/X11 license.
5388 2009-01-07 Geoff Norton <gnorton@novell.com>
5390 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
5391 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
5392 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
5393 be the value of the ip buffer.
5395 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5397 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
5398 interfaces_packed here.
5400 Fixes part of #463294.
5402 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5404 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
5406 Fixes part of #463294.
5408 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5410 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
5411 is a boxed complex as well.
5413 Fixes part of #463294.
5415 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5417 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
5418 control if a methodspec should be created for the generic method definition from external assemblies.
5419 Caching of methodspec is done using the handleref hash table.
5423 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
5425 * loader.c (find_method): When searching the interfaces of a class
5426 check the transitive closure of implemented interfaces.
5430 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
5432 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
5434 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
5436 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
5437 interfaces calculation to fill_valuetype_array_derived_types.
5439 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
5440 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
5443 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
5444 interfaces for valuetypes if needed.
5446 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
5447 for their basetype as well. Types are array expanded if rank is > 0.
5451 2008-12-30 Bill Holmes <billholmes54@gmail.com>
5453 * socket-io.h : Changing the signature of
5454 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
5457 * icall-def.h : Changing the signature of
5458 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
5460 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
5461 For Windows only. Avoid blocking when calling accept by
5462 querying for a connection via select. The loop also queries
5463 the thread state every 1000 micro seconds for the thread
5464 stop state. This will avoid the process hanging on shutdown
5465 when using a TcpChannel that is never connected to.
5467 Code is contributed under MIT/X11 license.
5469 2008-12-30 Marek Safar <marek.safar@gmail.com>
5471 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
5473 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
5475 * class.c (get_implicit_generic_array_interfaces): Extract common
5476 code to a helper function making it a lot easier on the eyes.
5478 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
5480 * class.c (get_implicit_generic_array_interfaces): If the internal
5481 enumerator is an interface inflate System.Object instead of itself.
5485 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
5487 * object.c (mono_runtime_invoke_array): Don't assert with
5488 byref nullable types.
5490 * marshal.c (mono_marshal_get_runtime_invoke): To handle
5491 byref nullables we unbox the object and store it on the
5493 We can't use the boxed object since it is the T of Nullable<T>
5494 and the boxed representation of a nullable it's underlying type
5496 We could cheat and create a boxed nullable and use the same
5497 machinery of other byref VTs but this feels like a hack and
5498 using the stack has the bonus of reducing heap pressure.
5502 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
5504 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
5509 2008-12-19 Bill Holmes <billholmes54@gmail.com>
5511 * icall-def.h : Adding an internal call definition for
5512 System.Environment.internalBroadcastSettingChange.
5514 * icall.c : Adding a Windows only implementation to broadcast a
5515 WM_SETTINGCHANGE when an environment variable has changed.
5517 Code is contributed under MIT/X11 license.
5519 2008-12-19 Mark Probst <mark.probst@gmail.com>
5521 * class.c, class-internals.h: Made
5522 mono_class_has_parent_and_ignore_generics() non-static.
5524 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
5526 * image.c: deal with the mmap failing when loading an image.
5528 2008-12-17 Geoff Norton <gnorton@novell.com>
5530 * threadpool.c: Ensure that the io_queue_lock is initialized
5531 in all circumstances, as we always attempt to cleanup against it.
5533 2008-12-17 Miguel de Icaza <miguel@novell.com>
5535 * icall.c (ves_icall_System_Environment_get_Platform): For
5536 compatibility reasons for existing client code we will keep
5537 returning 4 for a while.
5539 For how long will depend on the documentation being updated, and
5540 for us to give client code a chance to be updated.
5542 This reverts the original decison on #433108 since we did not
5543 catch roughly 33 instances of the broken code in our own source
5544 code base, we did not catch failures on the buildbots, and QA did
5545 not bring this as a problem.
5547 Only today I found some customer's code breaking due to our own
5548 class libraries not being fully updated and tracked it down to
5549 this change. I am reverting it because if we could not even get
5550 our story straight in our own code base, how can we hope that our
5551 end user code be fixed?
5553 As of this morning, our Wiki page that documents how to detect
5554 Unix had not been fixed.
5556 2008-12-16 Zoltan Varga <vargaz@gmail.com>
5558 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
5560 * class.c (mono_class_get_fields): Handle loading errors.
5562 2008-12-12 Mark Mason <mmason@upwardaccess.com>
5564 * 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.
5566 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
5568 * mono-perfcounters.c: avoid warning.
5570 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5572 * reflection.c (ensure_runtime_vtable): Work on generic instances and
5573 make sure all interfaces have MonoClass::interface_id set.
5575 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
5576 method table is property set.
5578 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5580 * class.c: New function mono_class_setup_interface_id that setup
5581 MonoClass::interface_id if needed.
5583 * class-internals.h: Export new function.
5585 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5587 * class.c: Add code to sanity check the vtable after setup_vtable_general
5590 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
5592 * icall.c: make Assembly.GetExecutingAssembly work properly when
5593 reflection is used to invoke the method.
5596 2008-12-11 Mark Probst <mark.probst@gmail.com>
5598 * metadata/generic-sharing.c: Look for constraints in all type
5599 arguments, not just the first one.
5601 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5603 * appdomain.c: return the correct CodeBase for an Assembly instance
5604 that was loaded from the shadow-copy directories.
5607 2008-12-10 Zoltan Varga <vargaz@gmail.com>
5609 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
5611 * sgen-gc.c (check_object): New debugging helper function.
5613 * object.c: Fix calls to mono_value_copy_array ().
5615 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5617 * class.c (mono_class_setup_fields): If working on an inflated class
5618 first check if the generic definition did init with success.
5622 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5624 pedump.c (main): Fix a warning.
5626 2008-12-10 Bill Holmes <billholmes54@gmail.com>
5628 * object-internals.h : Adding a definition for
5629 MonoReflectionComVisibleAttribute.
5631 * marshal.c (cominterop_com_visible) : Method added to check the
5632 ComVisible attribute of a class.
5634 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
5635 cominterop_raise_hr_exception added to consolidate common code
5636 to raise hr exceptions.
5638 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
5639 if a managed class should support IDispatch.
5642 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
5643 Added additional checks for managed object when getting
5644 an IDispatch interface.
5646 Code is contributed under MIT/X11 license.
5648 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5650 pedump.c (main): Handle mono_get_method () returning NULL.
5652 2008-12-09 Zoltan Varga <vargaz@gmail.com>
5654 * marshal.h: Fix a warning.
5656 2008-12-09 Bill Holmes <billholmes54@gmail.com>
5658 * marshal.c : Adding cominterop_release_all_rcws to release all
5659 runtime callable wrappers held by the runtime.
5661 * marshal.h : Adding declaration for cominterop_release_all_rcws.
5663 Code is contributed under MIT/X11 license.
5665 2008-12-09 Zoltan Varga <vargaz@gmail.com>
5667 * metadata.c (mono_image_alloc_lock): New helper function.
5668 (mono_image_alloc0_lock): Ditto.
5670 * metadata.c: Use the alloc_lock () helper functions for allocating
5671 memory from the image mempool.
5673 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5675 * class.c (mono_class_from_generic_parameter): Document it's
5676 locking behavior. Fix double checked locking here, we stored in
5677 param->pklass a partially initialized MonoClass and no membar was used.
5679 2008-12-05 Marek Habersack <mhabersack@novell.com>
5681 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
5682 (3) functions are present in the C library use them to do the
5683 job. If they are absent, make sure that the sum of int_part and
5684 dec_part is rounded before returning. This is necessary due to the
5685 division of dec_part by the power of 10 before the final addition
5686 is performed - if the result is not rounded in some cases it will
5687 yield invalid results.
5689 2008-12-04 Zoltan Varga <vargaz@gmail.com>
5691 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
5692 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
5693 instruction instead of a pointer constant.
5695 2008-12-03 Zoltan Varga <vargaz@gmail.com>
5697 * loader.c (mono_method_get_header): Do most of the work outside the
5698 loader lock, to avoid assembly load hook deadlocks.
5700 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
5701 (mono_metadata_parse_type_full): Ditto.
5703 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
5705 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
5706 Make the stack depth fixed. Ensure proper argument passing to the backtrace
5707 funtions. Finally, use a lock to produce well ordered output.
5709 The lock looks silly, as all calls to the corlib mempool should be guarded
5710 with the loader lock, but for some reason this fact doesn't help.
5712 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
5714 2008-12-02 Mark Probst <mark.probst@gmail.com>
5716 * socket-io.c: 64 bit big-endian fixes.
5718 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
5720 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
5721 targets that require strict compatibility between the types.
5723 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
5724 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
5725 Kill the strict argument and create a new one valuetype_must_be_boxed.
5727 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
5728 state that all valuetypes must be boxed.
5732 2008-11-29 Kornél Pál <kornelpal@gmail.com>
5734 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
5735 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
5737 Contributed under MIT/X11 license.
5739 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
5741 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
5742 the inflate_generic_type machinery should handle it.
5744 This avoids a crash when the field's flags is zero and it's type is
5746 What happens is that mono_metadata_parse_type_full will see that opt_attrs
5747 is zero and will return one of the cached built-in primitive types. Since
5748 those types live in read-only memory, the code that copies it crashes.
5750 2008-11-28 Mark Probst <mark.probst@gmail.com>
5752 * object.c: Don't put function descriptors into generalized IMT
5755 2008-11-28 Mark Probst <mark.probst@gmail.com>
5757 * class.c: Enable generic code sharing on PPC64.
5759 2008-11-27 Mark Probst <mark.probst@gmail.com>
5761 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
5764 * generic-sharing.c: Allocate the method template slists from the
5765 image mempool so it doesn't leak.
5767 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
5769 * class.c (generic_array_methods): Release the linked list.
5771 2008-11-27 Mark Probst <mark.probst@gmail.com>
5773 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
5774 invocation to g_utf16_to_utf8().
5776 2008-11-26 Mark Probst <mark.probst@gmail.com>
5778 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
5779 arguments on big endian archs.
5781 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5783 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
5784 the type name (test added in corlib).
5786 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5788 * pedump.c: initialize perf. counters. Fixes a segv.
5790 2008-11-25 Martin Baulig <martin@ximian.com>
5792 * mono-debug-debugger.c
5793 (mono_debugger_runtime_invoke): Return the exception object if an
5794 exception was thrown. Visual Studio displays the exception object
5795 in the locals window.
5797 2008-11-24 Mark Probst <mark.probst@gmail.com>
5799 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
5802 2008-11-24 Mark Probst <mark.probst@gmail.com>
5804 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
5805 MONO_TYPE_U are sizeof (gpointer), too.
5807 2008-11-24 Mark Probst <mark.probst@gmail.com>
5809 * marshal.c (mono_type_native_stack_size): Fixed size and
5810 alignment for reference types.
5812 2008-11-23 Mark Probst <mark.probst@gmail.com>
5814 * class.c (mono_class_generic_sharing_enabled): Disable generic
5815 code sharing for PPC64.
5817 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
5819 * icall.c (mono_method_get_equivalent_method): Make sure
5820 method->klass->methods is inited before looping over it.
5822 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
5824 * object.c: when calling ExecuteAssembly in a newly created domain,
5825 the configuration file and application base are already set up.
5826 Bug #446353 take 2 fixed.
5828 2008-11-20 Zoltan Varga <vargaz@gmail.com>
5830 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
5831 Fixes #444715. Fix a warning.
5833 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
5835 * appdomain.c: write the full path of the assembly to the .ini file
5836 created when "shadow-copying"
5839 2008-11-18 Zoltan Varga <vargaz@gmail.com>
5841 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
5842 if signature==FALSE.
5844 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5846 * marshal.h : Fix the cygwin build.
5847 marshal.c:12442: undefined reference to `_IID_IMarshal'
5849 Code is contributed under MIT/X11 license.
5851 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5853 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
5854 free threaded marshaler when QueryInterface is called on a COM callable
5855 wrapper requesting the IMarshal interface.
5857 Code is contributed under MIT/X11 license.
5859 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5861 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
5863 * reflection.c (mono_type_get_object): Special case the very common
5866 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
5869 2008-11-13 Bill Holmes <billholmes54@gmail.com>
5871 * process.h : Adding method declaration for
5872 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5874 * process.c : Adding implementation for
5875 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5877 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
5878 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5880 Code is contributed under MIT/X11 license.
5882 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
5884 * appdomain.c (unload_thread_main): Clean up threadpool by
5885 calling mono_thread_pool_remove_domain_jobs.
5887 * domain-internals.h (struct _MonoDomain): Add new fields to
5888 help coordinate the cleanup of the threadpool.
5890 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
5891 that cleans up the threadpool of all jobs associated with an appdomain.
5892 It does that by cleaning up the queues and making sure all active
5893 threads are accounted.
5895 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
5896 unloaded or in the process of. Take this is such way that there is
5897 no race condition between another thread starting the unload and the
5898 current thread acknowledging it.
5900 * threadpool.c (async_invoke_thread): Same.
5902 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
5903 firing the new thread.
5905 * threadpool.c (start_tpthread): Same.
5907 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
5909 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
5911 2008-11-06 Jonathan Chambers <joncham@gmail.com>
5913 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
5914 Add support for DuplicateHandle.
5916 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5917 Add support for DuplicateHandle.
5919 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5920 Add support for DuplicateHandle.
5922 Code is contributed under MIT/X11 license.
5924 2008-11-06 Mark Probst <mark.probst@gmail.com>
5926 * class-internals.h: Make min_align into a whole byte.
5928 * class.c: Set min_align for SIMD types to 16.
5930 2008-11-05 Geoff Norton <gnorton@novell.com>
5932 * attach.c: Default the attacher to enabled for all cases including
5935 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5937 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
5940 2008-11-04 Mark Probst <mark.probst@gmail.com>
5942 * monitor.c, monitor.h: New function for querying offsets of
5943 members of MonoThreadsSync.
5945 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5947 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
5948 to speed up this function and to avoid the boundless memory growth caused by
5949 the signature_dup () calls.
5951 2008-11-02 Zoltan Varga <vargaz@gmail.com>
5953 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
5956 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
5959 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
5961 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5964 * domain-internals.h: made mono_set_private_bin_path_from_config()
5966 * object.c: call the above function after setting the configuration
5967 file path for the root domain.
5970 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5972 * assembly.c: when the assembly is loaded from an absolute path, end
5973 basedir with a directory separator.
5976 2008-10-30 Mark Probst <mark.probst@gmail.com>
5978 * monitor.c (mono_monitor_get_fast_enter_method): If
5979 CompareExchange is not available, don't create the fastpath
5980 instead of asserting. (The method is missing in the 1.1 profile.)
5982 2008-10-30 Mark Probst <mark.probst@gmail.com>
5984 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
5986 * monitor.c, monitor.h: Code for generating Monitor.Enter and
5987 Monitor.Exit IL fastpaths.
5989 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5991 * class.c (mono_class_create_from_typedef): Added Vector2ul.
5993 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5995 * class.c (mono_class_create_from_typedef): Added Vector2l.
5997 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5999 * class.c (mono_class_create_from_typedef): Added Vector2d.
6001 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
6003 * appdomain.c: translate \ into / for cache_path.
6004 * domain-internals.h: new mono_is_shadow_copy_enabled().
6005 * icall.c: (fill_reflection_assembly_name) do the same path
6006 manipulations that get_code_base does.
6007 (get_code_base) use mono_is_shadow_copy_enabled.
6009 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
6011 * appdomain.c: shadow-copied assemblies go to CachePath +
6012 ApplicationName when both are set. DynamicBase has nothing to do with
6016 2008-10-26 Zoltan Varga <vargaz@gmail.com>
6018 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
6019 STANDALONESIG table.
6021 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
6022 standalone signatures.
6024 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
6025 comparison code: instead of comparing the signatures using a custom
6026 equals function, transform them to a common signature and compare that. This
6027 works better with AOT.
6029 2008-10-25 Zoltan Varga <vargaz@gmail.com>
6031 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
6033 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
6034 call for generic instances.
6035 (mono_class_setup_properties): Call setup_properties () before accessing
6038 * class.c (mono_class_get_virtual_methods): New helper function to iterate
6039 over the virtual methods of a class using metadata if possible, avoiding the
6040 creation of MonoMethod's for non-virtual methods.
6042 * class.c (mono_class_setup_vtable_general): Rewrite this to use
6043 get_virtual_methods () to iterate over the virtual methods of classes.
6045 2008-10-25 Martin Baulig <martin@ximian.com>
6047 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
6049 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6051 * class.c (mono_class_create_from_typedef): Added Vector4i.
6053 2008-10-24 Mark Probst <mark.probst@gmail.com>
6055 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
6056 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
6057 special-casing applies to eliminate the call completely.
6059 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6061 * class.c (mono_class_create_from_typedef): Added Vector8s.
6063 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
6065 * class.c (mono_class_create_from_typedef): Added Vector16sb.
6067 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6069 * icall.c: get rid of annoying warning.
6071 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6073 * threadpool.c: in 1.x, if you change the background status of the
6074 threadpool thread, it's not reset.
6075 Remove unnecessary calls to SetState.
6077 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6079 * threadpool.c: asynchronously create a set of idle threads upon first
6080 use of the threadpool. SetMinThreads will now start the appropriate
6081 number of idle threads if they are not already running. The default is
6082 1 threadpool thread per CPU. Increased the maximum number of threads
6085 2008-10-22 Martin Baulig <martin@ximian.com>
6087 Revert r116521 from Zoltan, it breaks the debugger:
6089 * class.c (mono_class_get_virtual_methods): New helper function to iterate
6090 over the virtual methods of a class using metadata if possible, avoiding the
6091 creation of MonoMethod's for non-virtual methods.
6093 * class.c (mono_class_setup_vtable_general): Rewrite this to use
6094 get_virtual_methods () to iterate over the virtual methods of classes.
6096 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6098 * threads.c: when creating a threadpool thread, set its state to
6100 * threadpool.c: reset the background state of a threadpool thread
6101 after finishing each work item
6104 2008-10-22 Zoltan Varga <vargaz@gmail.com>
6106 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
6108 * class.c (mono_class_setup_vtable_general): Add an optimized version for
6109 generic instances which works by inflating the methods in the container
6112 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
6113 variant which doesn't make a copy if no inflation was done.
6114 (mono_class_setup_fields): Use it.
6116 * metadata.c (mono_metadata_get_shared_type): New helper function to
6117 return a shared instance of a given MonoType.
6119 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
6120 a copy of most non-generic types.
6122 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6124 * threadpool.c: remove one more GetSystemInfo () call.
6126 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
6128 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
6129 use the code in mono-proclib.h to get processor information.
6131 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6133 * appdomain.c: fixed the logic that determines whether assemblies in a
6134 directory are "shadow-copied" or not. Bug #433483 fixed.
6136 2008-10-22 Zoltan Varga <vargaz@gmail.com>
6138 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
6141 2008-10-21 Zoltan Varga <vargaz@gmail.com>
6143 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
6146 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
6147 reflection.c: Use mono_field_get_name () for accessing a field's name.
6149 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
6152 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
6155 * loader.c (find_method_in_class): Reenable the metadata optimization by
6156 not using it for generic instances.
6158 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
6159 data/def_type fields from MonoClassField into a separate structure.
6160 (struct MonoClassField): Remove data/def_type fields.
6161 (struct _MonoClass): Add a 'field_def_values' array to store the default
6162 values/RVA for fields.
6164 * class.c reflection.c: Update after the changes.
6166 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
6167 for accessing field->data.
6169 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
6171 * loader.c (find_method_in_class): Revert the last change for now as
6172 it breaks Mono.C5 unit tests.
6174 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
6175 'field_generic_types' and 'field_objects' which contain the information
6176 previously stored in MonoInflatedField.
6177 (MonoInflatedField): Delete.
6178 (struct _MonoClassField): Delete 'generic_info' field.
6180 * reflection.c: Store the information which was previously in
6181 field->generic_info in MonoDynamicGenericClass instead.
6183 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
6184 MonoClassField changes.
6186 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
6188 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
6189 store the value inside the data array of the MonoMethodWrapper.
6190 This saves memory, is faster and fixes the lifetime issues (methods
6191 were never removed from the hash previously). May also fix bug#436996.
6193 2008-10-21 Zoltan Varga <vargaz@gmail.com>
6195 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
6196 generic instances, compute the type from the generic definition instead of
6197 looking in field->generic_info.
6199 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
6200 for inflated fields, the only user was get_fieldref_token () which no
6203 * class.c (mono_class_init): Revert the last change as it seems to cause
6206 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
6207 bytes on 64 bit platforms.
6209 * object.c (mono_class_create_runtime_vtable): Fix a warning.
6211 * object.c (mono_class_create_runtime_vtable): Don't initalize
6212 field->data/field->def_type here, it is done lazily by
6213 mono_class_get_field_default_value ().
6215 * icall.c (ves_icall_get_enum_info): Call
6216 mono_class_get_field_default_value () instead of directly accessing
6217 field->data and field->def_type.
6219 * object.c (get_default_field_value): Ditto.
6221 * class.c (mono_field_get_data): Ditto.
6223 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
6224 call for generic instances.
6226 * loader.c (find_method_in_class): If klass != from_class, then inflate
6227 the method with the context of from_class, since the caller assumes this.
6229 2008-10-20 Zoltan Varga <vargaz@gmail.com>
6231 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
6232 for accessing method->slot.
6234 2008-10-20 Cedric Vivier <cedricv@neonux.com>
6236 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
6238 2008-10-19 Zoltan Varga <vargaz@gmail.com>
6240 * class.c (mono_method_get_vtable_index): Use
6241 mono_method_get_vtable_slot () for accessing method->slot.
6243 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
6244 accessing klass->methods.
6246 * class.c (mono_method_get_vtable_slot): New helper function.
6247 (mono_class_get_vtable_entry): Ditto.
6248 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
6249 accessing method->slot.
6251 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
6252 method to get_inflated_method ().
6254 * class.c (mono_class_get_inflated_method): New helper method to obtain
6255 a method of an inflated class without calling setup_methods ().
6256 (mono_class_get_cctor): Use get_inflated_method.
6258 * generic-sharing.c (mono_class_get_method_generic): Ditto.
6260 * marshal.c image.c: Lazily create all the marshal caches.
6262 * image.c (mono_image_init): Move initialization of runtime_invoke
6263 caches to marshal.c.
6265 * marshal.c (get_cache): New helper function to lazily initialize a
6267 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
6269 * debug-helpers.c (mono_method_full_name): Include generic arguments.
6271 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
6273 * loader.c: fixed check for interface type.
6275 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6277 * appdomain.c: check for NULL setup before it's referenced.
6280 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6282 * class.c: remove the unused old vtable setup code.
6284 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6286 * class.c: don't depend on interface order in
6287 setup_interface_offsets (bug #435777).
6288 * reflection.c: sort the InterfaceImpl table (patch from
6289 Jb Evain <jbevain@novell.com>).
6291 2008-10-13 Zoltan Varga <vargaz@gmail.com>
6293 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
6294 the low level assemblies lock.
6296 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
6298 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
6299 object.c, reflection.c, socket-io.c, threads.c: introduced
6300 mono_framework_version () to return the major framewrok version,
6301 changed the code that was using more complex patterns to use it.
6302 Return the correct value for PlatformID for OSX.
6304 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
6306 * icall-def.h, process.h, process.c: added an icall to get info about
6307 processes using mono-proclib.
6309 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
6311 * mono-perfcounters.c: use the mono-proclib functions to
6312 access process information.
6314 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6316 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
6317 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
6318 reflection.c: remove rawbuffer usage: mmap support is more sanely
6319 provided by utils/mono-mmap.
6321 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
6323 * gc.c: use posix semaphores when possible so that
6324 mono_gc_finalize_notify() is signal safe.
6326 2008-10-11 Zoltan Varga <vargaz@gmail.com>
6328 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
6329 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
6330 be #ifdef-ed out, the linker will remove the rest.
6332 * marshal.c: Implement DISABLE_COM.
6334 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
6336 2008-10-11 Miguel de Icaza <miguel@novell.com>
6338 * locales.c (string_invariant_compare_char): Optimization: do not
6339 call g_unichar_type unless we actually need the information.
6341 2008-10-10 Mark Probst <mark.probst@gmail.com>
6343 * object.c, class-internals.h: Also create remoting trampolines
6344 for generic methods. Pass the domain to the remoting trampoline
6345 creation function, too.
6347 2008-10-10 Zoltan Varga <vargaz@gmail.com>
6349 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
6351 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6353 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
6356 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
6359 * locales.c: remove the use of g_strdown. Fixes bug #322313.
6361 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
6363 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
6364 for the least possible amount of time (extending the fix in r113458).
6366 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6368 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
6370 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6372 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
6373 as possible simd intrinsic types.
6374 Optimized the test to check for the common prefix first.
6376 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
6378 * class.c: back out part of a broken optimization committed on
6379 May 23th (bug #433908).
6381 2008-10-09 Mark Probst <mark.probst@gmail.com>
6383 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
6384 Win32. Should fix #432388 for most cases until we have the new
6387 2008-10-08 Zoltan Varga <vargaz@gmail.com>
6389 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
6390 instead of using inst->id so the hash is stable for AOT.
6392 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6395 * icall.c: create a .ini file for shadow-copied assemblies that
6396 contains the location of the original assembly. Use this to return the
6397 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
6398 Also fix the number of '/' for windows when returning the CodeBase.
6401 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6403 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
6405 Code is contributed under MIT/X11 license.
6407 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6409 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
6410 if if the class vtable needs initialized.
6412 Code is contributed under MIT/X11 license.
6414 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6416 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
6417 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
6418 STRING->BSTR, and CLASS->INTERFACE.
6420 Code is contributed under MIT/X11 license.
6422 2008-10-07 Marek Habersack <mhabersack@novell.com>
6424 * sysmath.h: changed the declaration of the
6425 ves_icall_System_Math_Round2 icall by adding an extra
6426 away_from_zero parameter.
6428 * sysmath.c (ves_icall_System_Math_Round2): added support for
6429 away from zero rounding. The icall now takes an extra boolean
6430 parameter to signal that away from zero operation is requested.
6432 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6434 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
6435 the delegate klass so it can work with full-aot.
6436 (mono_marshal_get_delegate_end_invoke): Ditto.
6437 (mono_marshal_get_delegate_invoke): Ditto.
6439 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
6441 * gc.c, attach.h, attach.c: remove a bad pattern:
6442 add_finalizer_callback () is not implemented correctly, it can't
6443 without adding more overhead to the finalizer loop and it's not
6444 even needed, since we know exactly what we need to call, so there is
6445 no need to do so through an expensive function pointer.
6447 2008-10-04 Zoltan Varga <vargaz@gmail.com>
6449 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
6451 * attach.c (mono_attach_init): Remove the #ifdef.
6453 2008-10-04 Andreas Färber <andreas.faerber@web.de>
6455 * attach.c (mono_attach_init): Don't use
6456 mono_gc_add_finalizer_thread_callback when compiling without GC.
6459 Code is contributed under MIT/X11 license.
6461 2008-10-03 Zoltan Varga <vargaz@gmail.com>
6463 * class.c (mono_class_create_from_typedef): Remove the
6464 #ifndef DISABLE_SIMD stuff.
6466 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
6468 * class-internals.h (MonoClass): Added simd_type bit field.
6470 * class.c (mono_class_create_from_typedef): Check if type is a simd
6473 2008-10-03 Mark Probst <mark.probst@gmail.com>
6475 * object.c (mono_method_add_generic_virtual_invocation): Only add
6476 instantiations to the thunk whose count is at least as large as
6479 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
6481 * icall.c: changed the Type of the exception thrown when trying to
6482 invoke a constructor on an abstract class. Part of the fix for bug
6485 2008-10-02 Mark Probst <mark.probst@gmail.com>
6487 * class.c, class-internals.h (mono_method_get_vtable_index): New
6488 function which returns the index into the vtable and properly
6489 handles inflated virtual generic methods.
6491 2008-10-01 Mark Probst <mark.probst@gmail.com>
6493 * object.c, domain.c, object-internals.h, domain-internals.h:
6494 Generalize IMT thunk machinery to also handle thunks for virtual
6495 generic method invokes. When a virtual generic method is invoked
6496 more than a number of times we insert it into the thunk so that it
6497 can be called without lookup in unmanaged code.
6499 * generic-sharing.c, class-internals.h: Fetching a
6500 MonoGenericInst* for a method from an (M)RGCTX.
6502 2008-10-01 Zoltan Varga <vargaz@gmail.com>
6504 * marshal.c (emit_marshal_string): Applied a variant of a patch by
6505 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
6506 marshalling. Fixes #431304.
6508 2008-10-01 Bill Holmes <billholmes54@gmail.com>
6510 * marshal.c (emit_marshal_variant) : Change the attribute checks to
6511 handle when ref is specified without In or Out.
6513 Code is contributed under MIT/X11 license.
6515 2008-09-30 Mark Probst <mark.probst@gmail.com>
6517 * loader.c (mono_get_method_constrained): Don't expand method with
6518 the class's context, because it's already a method of that class.
6520 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
6522 * attach.c : should be correct build fix.
6524 2008-09-29 Zoltan Varga <vargaz@gmail.com>
6526 * attach.c: Fix the previous change.
6528 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
6530 * attach.c : quick w32 build fix.
6532 2008-09-27 Miguel de Icaza <miguel@novell.com>
6534 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
6535 crashes MonoDevelop: #430455.
6537 2008-09-27 Zoltan Varga <vargaz@gmail.com>
6539 * domain-internals.h (struct _MonoDomain): Move most fields used only by
6540 the JIT do MonoJitDomainInfo in ../mini/mini.h.
6542 * domain.c: Remove initialization/cleanup of the removed fields.
6544 2008-09-27 Mark Probst <mark.probst@gmail.com>
6546 * class.c (mono_class_generic_sharing_enabled): Enable generic
6547 code sharing for PPC.
6549 2008-09-26 Bill Holmes <billholmes54@gmail.com>
6551 * attach.c : Fixing the Windows builds.
6553 Code is contributed under MIT/X11 license.
6555 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6557 * class.c (mono_class_generic_sharing_enabled): Experimentally change
6558 the default generic sharing mode to 'all'.
6560 2008-09-25 Mark Probst <mark.probst@gmail.com>
6562 * generic-sharing.c, class-internals.h: New function for checking
6563 whether a method needs a static RGCTX invoke wrapper. A few
6564 funtions moved from mini/generic-sharing.c.
6566 * icall.c: New function used.
6568 2008-09-25 Mark Probst <mark.probst@gmail.com>
6570 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
6571 Static RGCTX invoke wrapping applies to value type methods, too.
6573 * class.c (mono_class_setup_vtable_general): In generic-shared
6574 value types, wrap methods with a static RGCTX invoke wrapper.
6576 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6578 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
6581 2008-09-24 Zoltan Varga <vargaz@gmail.com>
6583 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
6584 register a callback which is called when the finalizer thread is woken
6586 (finalizer_thread): Call the callback if it exists.
6588 * attach.h attach.c: New files, implementing the attach mechanism.
6590 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
6592 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
6593 by the previous change.
6595 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
6597 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
6598 loader.c, marshal.c, metadata-internals.h, metadata.c,
6599 method-builder.c, object.c, reflection.c: introduced specific functions
6600 to allocate from the domain and image mempools and cleaned up most of
6601 the code to use them (still missing a few in reflection.c).
6602 Keep the loader bytes counter updated.
6604 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
6606 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
6607 loader-related counters.
6609 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
6611 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
6612 added more MS-compatible counters.
6614 2008-09-22 Zoltan Varga <vargaz@gmail.com>
6616 * class.c (mono_class_setup_fields): Call setup_fields before accessing
6617 class->blittable. Fixes #428217.
6619 2008-09-21 Zoltan Varga <vargaz@gmail.com>
6621 * reflection.c (mono_image_get_field_on_inst_token): Call
6622 field_encode_signature () since that handles custom modifiers too.
6625 2008-09-20 Zoltan Varga <vargaz@gmail.com>
6627 * reflection.c (add_custom_modifiers): New helper function to merge custom
6628 modifiers stored in objects to a MonoType.
6629 (fieldref_encode_signature): Encode custom modifiers.
6630 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
6631 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
6633 2008-09-19 Kornél Pál <kornelpal@gmail.com>
6635 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
6636 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
6637 64-bit IL only images because imports are not resolved for IL only images.
6638 Special thanks to Bill Holmes for finding this bug and testing the patch.
6639 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
6641 Contributed under MIT/X11 license.
6643 2008-09-19 Miguel de Icaza <miguel@novell.com>
6645 * mono-config.c (dllmap_start): Add support for the bits keyword
6646 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
6648 2008-09-19 Mark Probst <mark.probst@gmail.com>
6650 * reflection.c (inflate_mono_method): When the class the method is
6651 to be inflated for is itself not inflated, just return the method.
6653 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
6655 * mono-perfcounters.c: use more user friendly process instance names.
6657 2008-09-18 Bill Holmes <billholmes54@gmail.com>
6659 * marshal.c (emit_marshal_variant) : Change the attribute checks to
6660 handle "[in] ref" and "[in][out] ref" cases.
6662 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
6663 to mono_mb_create_method. This was causing problems calling native to
6664 managed passing Variants by value.
6666 Code is contributed under MIT/X11 license.
6668 2008-09-18 Zoltan Varga <vargaz@gmail.com>
6670 * class.c (can_access_internals): Call mono_assembly_load_friends ()
6671 before accessing the friend_assembly_names field.
6673 * assembly.c (mono_assembly_load_friends): Make this callable multiple
6675 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
6676 called lazily when it is needed.
6678 * metadata-internals.h (struct _MonoAssembly): Add
6679 'friend_assembly_names_inited' flag.
6681 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
6683 * mono-perfcounters-def.h: fix the types of a few counters.
6684 * mono-perfcounters.c: implemented the instance names getter
6687 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
6689 * culture-info-table.h : regenerated.
6691 2008-09-17 Robert Jordan <robertj@gmx.net>
6693 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
6694 context bound objects. Fixes #415577.
6696 Code is contributed under MIT/X11 license.
6698 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
6700 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
6701 implementation (bug #423582).
6703 2008-09-16 Zoltan Varga <vargaz@gmail.com>
6705 * object.c (mono_object_get_virtual_method): Handle the case method->slot
6706 is not set. Fixes #426309.
6708 2008-09-16 Jb Evain <jbevain@novell.com>
6710 * class.c (mono_class_from_name): fix the exported type look up
6711 when the type is defined in a referenced assembly.
6713 2008-09-16 Jb Evain <jbevain@novell.com>
6715 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
6716 increment the next index counter on each iteration to make that work
6717 for more than one type forwarder. Unmanaged part to fix #422929.
6719 2008-09-15 Mark Probst <mark.probst@gmail.com>
6721 * object-internals.h: enum ComInterfaceType in
6722 MonoInterfaceTypeAttribute is guint32, not guint16.
6724 2008-09-12 Mark Probst <mark.probst@gmail.com>
6726 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
6729 2008-09-11 Mark Probst <mark.probst@gmail.com>
6731 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
6734 2008-09-11 Mark Probst <mark.probst@gmail.com>
6736 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
6737 Endianness fixes for MonoSymbolFileOffsetTable.
6739 2008-09-10 Bill Holmes <billholmes54@gmail.com>
6741 * process.c (complete_path) : Removing quotes from the
6742 input path. The glib file routines do not handle file paths
6743 that have quotes around them.
6745 Code is contributed under MIT/X11 license.
6747 2008-09-10 Bill Holmes <billholmes54@gmail.com>
6749 * socket-io.h : Adding a comment to provide locations where
6750 changes to MonoSocketAsyncResult need to be synced.
6752 Code is contributed under MIT/X11 license.
6754 2008-09-10 Zoltan Varga <vargaz@gmail.com>
6756 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
6757 parameters as well. Fixes #425001.
6759 2008-09-08 Miguel de Icaza <miguel@novell.com>
6761 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
6764 2008-09-07 Miguel de Icaza <miguel@novell.com>
6766 * console-io.c: Add support for tracking the window size if it
6769 The setup is very simple: the TtySetup function will now return a
6770 pointer to a location in memory that tracks the current console
6771 size. The managed code checks its current value every time its
6772 queried against the last value set, and updates accordingly.
6774 With this setup we can work with multiple consoles, and we do not
6775 require to poke into managed code from a signal handler.
6777 Additionally, the environment for COLUMNS and LINES is now handled
6780 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
6782 2008-09-07 Mark Probst <mark.probst@gmail.com>
6784 * marshal.c (mono_type_native_stack_size): Treat
6785 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
6787 2008-09-04 Jb Evain <jbevain@novell.com>
6789 * class.c (mono_class_is_assignable_from): fix assignability of nullables
6792 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
6794 * verify.c (verify_type_compatibility_full): Revert change
6795 to allow converting a native int to unmanaged pointer be verifiable
6796 under non-strict mode.
6797 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
6799 * verify.c: Added some TODOs.
6801 2008-09-02 Bill Holmes <billholmes54@gmail.com>
6803 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
6804 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
6805 Changed to use GlobalAlloc for the memory returned on Windows platforms.
6807 Code is contributed under MIT/X11 license.
6809 2008-09-02 Jb Evain <jbevain@novell.com>
6811 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
6813 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
6815 reflection.c (typebuilder_setup_fields): Handle classes with
6818 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
6820 class.c (mono_class_setup_events): Add memory barrier due to
6821 double checked locking.
6823 class.c (mono_class_setup_properties): Same.
6825 2008-08-31 Zoltan Varga <vargaz@gmail.com>
6827 * class.c (mono_class_is_assignable_from): Fix the build.
6829 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
6830 before accessing klass->interface_bitmap. Fixes #421744.
6832 2008-08-28 Zoltan Varga <vargaz@gmail.com>
6834 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
6835 the runtime into no-exec mode, useful when running the AOT compiler.
6837 * appdomain.c gc.c object.c: Avoid executing managed code when running
6840 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
6842 * reflection.c (_mono_reflection_get_type_from_info): Handle the
6843 special case when the mono_assembly_loaded () returns NULL because the
6844 search hook is not installed.
6846 2008-08-25 Zoltan Varga <vargaz@gmail.com>
6848 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
6849 crashes in bstr marshalling on linux.
6851 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6853 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
6854 with more than one parameter.
6856 2008-08-24 Miguel de Icaza <miguel@novell.com>
6858 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
6859 start/stop flow control as well when turning off ICANON (allows
6860 C-s and C-q to be read by Console.ReadKey).
6862 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6864 * class.c (mono_class_init): Move the initialization of nested classes
6865 into mono_class_get_nested_types (). Fixes #418433.
6867 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
6870 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
6871 iterating tough the nested classes of a class.
6873 2008-08-23 Zoltan Varga <vargaz@gmail.com>
6875 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
6878 2008-08-22 Miguel de Icaza <miguel@novell.com>
6880 * console-io.c (sigcont_handler): Support signal chaining for
6883 (console_set_signal_handlers): Use best practices with sigaction,
6884 clear the structure before using it.
6886 2008-08-22 Robert Jordan <robertj@gmx.net>
6888 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
6889 Fix the Windows build.
6891 2008-08-22 Zoltan Varga <vargaz@gmail.com>
6893 * class.c (mono_class_generic_sharing_enabled): Make the default
6894 sharing mode 'corlib'.
6896 2008-08-21 Zoltan Varga <vargaz@gmail.com>
6898 * console-io.c (console_set_signal_handlers): Fix a warning.
6900 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
6901 method normally, the JIT will take care of avoiding recursion.
6903 2008-08-20 Bill Holmes <billholmes54@gmail.com>
6905 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
6907 Code is contributed under MIT/X11 license.
6909 2008-08-20 Miguel de Icaza <miguel@novell.com>
6911 * console-io.c (sigcont_handler): We need to restore the entire
6912 termios state, not only the original settings, as things like echo
6913 can be controlled after this (Booish exposes this issue with its
6914 own ReadLine implementation).
6916 Additionally, we need to set the terminal back into keypad_xmit
6919 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
6920 string as a paramter as well. Otherwise we get different
6923 2008-08-20 Zoltan Varga <vargaz@gmail.com>
6925 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
6926 delegates with byref out parameter passing. Fixes #351520.
6928 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
6930 (mono_type_get_desc): Add the type arguments for GENERICINST.
6931 (mono_method_full_name): Stringify the class name using mono_type_full_name
6932 so it picks up generic arguments.
6934 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
6936 * console-io.c: Removed debug output.
6938 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
6940 reflection.c (mono_reflection_create_runtime_class): Alloc
6941 the nested classes linked list using the dynamic image mempool.
6942 Fixes leak in corlib compilation.
6944 2008-08-19 Miguel de Icaza <miguel@novell.com>
6946 * console-io.c: Fix incredibly annoying behavior on the console
6947 after resuming execution after control-z. This affected every
6948 console application.
6950 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
6952 * mempool-internals.h: Header for mono private mempool functions. The first
6953 two function are for allocating glib linked lists using pools.
6955 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
6957 * Makefile.am: Added mempool-internals.h.
6959 2008-08-16 Zoltan Varga <vargaz@gmail.com>
6961 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
6962 (mono_domain_free): Ditto.
6964 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
6965 be used by the JIT to store its domain-specific information, instead of putting
6966 it directly into MonoDomain.
6968 * domain.c (mono_install_create_domain_hook): New helper function to install
6969 a hook which initializes domain->runtime_info.
6971 * domain.c (mono_install_free_domain_hook): Ditto.
6973 2008-08-15 Zoltan Varga <vargaz@gmail.com>
6975 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
6976 asserting if the ares parameter is null.
6978 * mono-perfcounters.c: Fix warnings.
6980 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
6981 is not needed, don't check for interruptions either.
6982 (mono_marshal_get_delegate_end_invoke): Ditto.
6984 2008-08-15 Marek Habersack <mhabersack@novell.com>
6986 * mono-perfcounters.c (predef_readonly_counter): added support for
6987 reading the ASP.NET Requests Queued counter from another process.
6989 2008-08-12 Zoltan Varga <vargaz@gmail.com>
6991 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
6992 MonoImage to simplify the AOT code.
6994 2008-08-10 Zoltan Varga <vargaz@gmail.com>
6996 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
6997 marshalling. Fixes #416078.
6999 2008-08-08 Zoltan Varga <vargaz@gmail.com>
7001 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
7002 it is set, looking up the icall address is deferred to the JIT, since
7003 in embedded scenarios, the icall might not be registered in the runtime
7004 doing the AOT compilation. Backported from the 2.0 branch.
7006 2008-08-08 Zoltan Varga <vargaz@gmail.com>
7008 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
7011 2008-08-05 Marek Habersack <mhabersack@novell.com>
7013 * Makefile.am: added support for cross-compilation.
7015 2008-08-04 Zoltan Varga <vargaz@gmail.com>
7017 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
7019 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
7021 * mono-perfcounters.c: jitted methods and jitted bytes counters.
7023 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
7025 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
7026 mono-perfcounters.c: performance counters implementation.
7028 2008-07-31 Zoltan Varga <vargaz@gmail.com>
7030 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
7031 to gpointer, letting the AOT code decide what to store in it.
7033 2008-07-31 Bill Holmes <billholmes54@gmail.com>
7035 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
7036 mono_class_setup_methods if the methods are not initialized.
7038 Code is contributed under MIT/X11 license.
7040 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
7042 * verify.c: Remove some debug code I commited by accident.
7044 * verify.c (mono_method_is_valid_in_context): Change the return value
7045 to make possible to distinguish between invalid and unverifiable.
7047 * verify.c (verifier_load_method): Don't return NULL for unverifiable
7050 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
7052 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
7053 constraints. Fixes regression in gtest-253.
7055 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
7057 * verify.c (mono_verifier_verify_class): Don't allow generic types
7058 with explicit layout.
7060 * verify.c (mono_method_verify): Check locals and argument types.
7062 2008-07-29 Zoltan Varga <vargaz@gmail.com>
7064 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
7065 wait if the thread is in StopRequested state.
7067 * class.c (mono_class_from_name): Refactor the module searching code into
7068 a separate function so it can be reused in the AOT case too.
7070 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
7072 * verify.c (mono_type_is_valid_in_context): Improve the error message.
7073 Check both the type and it's generic type definition for loader errors.
7075 * verify.c (mono_method_is_valid_in_context): Don't generate another
7076 error when a type errors occur, this leads to the wrong exception been
7079 2008-07-28 Dick Porter <dick@ximian.com>
7083 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
7084 New internal calls to duplicate and close a process handle.
7086 2008-07-27 Andreas Färber <andreas.faerber@web.de>
7088 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
7090 2008-07-27 Zoltan Varga <vargaz@gmail.com>
7092 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
7094 2008-07-27 Robert Jordan <robertj@gmx.net>
7096 * class.c (mono_class_init): Don't compute class.has_finalize for
7097 valuetypes. Fixes #412477.
7099 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
7101 * verify.c: Implement constraint equivalence checking.
7102 This is required when a generic parameter is used as
7103 argument to a constrained one.
7107 2008-07-24 Zoltan Varga <vargaz@gmail.com>
7109 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7111 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
7113 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
7114 synch with managed object layout.
7116 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
7118 * verify.c (do_branch_op): Handle valuetypes and generic
7121 * verify.c (do_cmp_op): Same.
7125 2008-07-24 Mark Probst <mark.probst@gmail.com>
7127 * generic-sharing.c: Fix memory leaks.
7129 * class.c, class-internals.h: Make
7130 mono_class_inflate_generic_type_with_mempool() non-static.
7132 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
7134 * pedump.c (dump_verify_info): Dump full class name.
7136 2008-07-24 Mark Probst <mark.probst@gmail.com>
7138 * generic-sharing.c: Removed some old code that didn't do anything.
7140 2008-07-24 Massimiliano Mantione <massi@ximian.com>
7141 * profiler.c: Added runtime_initialized_event,
7142 mono_profiler_install_runtime_initialized and
7143 mono_profiler_runtime_initialized. This new hook tells the profiler
7144 when the runtime is sufficiently initialized to be able to call
7145 mono_thread_attach on the root appdomain.
7146 * profiler.h, profiler-private.h: Likewise.
7148 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
7150 * verify.c (do_cast): Do boxing for generic arguments as well.
7152 * class.c (is_nesting_type): Drop generic instantiations before
7153 checking for nesting.
7155 * class.c (can_access_instantiation): Allow access to generic
7158 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
7160 * verify.c (verify_class_for_overlapping_reference_fields):
7161 On some cases, the field size might be zero, guard against that.
7162 Fix the explicit layout check to work as expected.
7164 2008-07-23 Zoltan Varga <vargaz@gmail.com>
7166 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
7167 mono_thread_resume () during shutdown, since the thread we want to abort
7170 2008-07-22 Zoltan Varga <vargaz@gmail.com>
7172 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
7175 * debug-mono-symfile.c: Fix a warning.
7177 * mono-perfcounters.c (get_cpu_times): Fix a warning.
7179 * object.c (mono_class_vtable): Check if exception_type is set, and return
7180 NULL as defined by the function comments.
7182 2008-07-22 Mark Probst <mark.probst@gmail.com>
7184 * mempool.c: Use malloc for every single mempool allocation if the
7185 configure option is set. This makes it easier to track mempool
7186 allocations with tools like Valgrind.
7188 2008-07-22 Jb Evain <jbevain@novell.com>
7190 * reflection.c (create_dynamic_mono_image): emit the same
7191 metadata version that SL2 does when creating a SL2 image.
7193 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
7196 * icall.c: New icall System.Enum:get_hashcode. This function
7197 avoids the overhead of boxing the enum to the underlying type.
7199 2008-07-21 Mark Probst <mark.probst@gmail.com>
7201 * reflection.c (mono_method_get_object): Don't let static RGCTX
7202 invoke wrappers get into MonoReflectionMethods.
7204 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
7206 * object-internals.h:
7207 * object.c: New mono_runtime_class_init_full function
7208 that makes throwing the exception optinal.
7210 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
7211 for the case where the exception object is supplied.
7213 2008-07-16 Kornél Pál <kornelpal@gmail.com>
7215 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
7218 Contributed under MIT/X11 license.
7220 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
7222 * string-icalls.c (ves_icall_System_String_InternalSplit):
7223 Optimize array allocation by caching the MonoClass of the
7226 * icall.c (ves_icall_Type_GetMethodsByName): Same.
7228 * reflection.c (mono_param_get_objects): Same.
7230 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
7233 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
7234 It inflates the given type using the class context.
7236 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
7238 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
7239 the vtable if it already exists.
7241 * object-internals.h: Add mono_class_try_get_vtable as part of the
7244 * reflection.c (mono_type_get_object): Use the MonoObject from the
7245 vtable when possible. Reduces locking contention on reflection heavy
7248 2008-07-15 Zoltan Varga <vargaz@gmail.com>
7250 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
7251 g_bit_nth_msf () since that macro is not implemented in eglib.
7253 2008-07-13 Zoltan Varga <vargaz@gmail.com>
7255 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
7256 on platforms which do not support it.
7258 2008-07-12 Zoltan Varga <vargaz@gmail.com>
7260 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
7262 2008-07-11 Martin Baulig <martin@ximian.com>
7264 * mono-debug-debugger.h
7265 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
7267 * mono-debug-debugger.c
7268 (_mono_debugger_interruption_request): New global volatile variable.
7269 (mono_debugger_check_interruption): New public function.
7272 (mono_thread_current_check_pending_interrupt): Call
7273 mono_debugger_check_interruption().
7274 (mono_thread_interruption_checkpoint_request): Likewise.
7276 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7278 * verify.c: Add more type checks for loaded types. Verify the result
7279 handle from ldtoken.
7281 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7283 * loader.c (field_from_memberref): Don't crash if the field
7286 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7288 * verify.c: Verify if type and method instantiations
7289 don't have invalid VAR or MVAR arguments.
7291 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7293 * verify.c: Fix double free of function pointer list.
7295 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7297 * object.c (mono_string_to_utf8): Comment the new code as it
7300 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
7302 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
7304 2008-07-07 Bill Holmes <billholmes54@gmail.com>
7306 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
7307 is not throw too many times.
7309 Code is contributed under MIT/X11 license.
7311 2008-07-07 Zoltan Varga <vargaz@gmail.com>
7313 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
7314 debugging is turned off.
7316 2008-07-06 Zoltan Varga <vargaz@gmail.com>
7318 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
7320 2008-07-04 Mark Probst <mark.probst@gmail.com>
7322 * class-internals.h, class.c: Added new generic sharing option:
7323 Share only stuff in System.Collections.Generic, which is now the
7326 2008-07-04 Mark Probst <mark.probst@gmail.com>
7328 * generic-sharing.c, class-internals.h: New function for getting a
7329 generic method in a generic class given the corresponding method
7330 for a different instantiation of the class. Partly refactored
7331 from mini-trampolines.c.
7333 * class.c: Make sure generic methods have a class_inst if they are
7334 part of a generic class.
7336 * metadata.c (mono_type_stack_size_internal): Handle type
7339 2008-07-04 Mark Probst <mark.probst@gmail.com>
7341 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
7342 Signifies whether information on the this/vtable/mrgctx variable
7345 2008-07-04 Mark Probst <mark.probst@gmail.com>
7347 * object.c, object-internals.h, icall.c: New function
7348 mono_delegate_ctor_with_method(), which does the same as
7349 mono_delegate_ctor(), but takes an explicit method argument
7350 instead of taking the method from the jit info.
7352 * marshal.c: When creating a delegate with an inflated method take
7353 the "this" argument as the target class for the castclass.
7355 2008-07-03 Mark Probst <mark.probst@gmail.com>
7357 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
7358 mono_jit_info_table_find() to perform very badly in some cases.
7360 2008-07-02 Zoltan Varga <vargaz@gmail.com>
7362 * icall.c (type_from_typename): Handle 'string'.
7364 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
7365 wrappers into the wrapper_hash, since the key is not a MonoMethod.
7367 2008-07-01 Zoltan Varga <vargaz@gmail.com>
7369 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
7371 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
7372 number of available managed allocator types.
7374 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
7375 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
7377 2008-06-30 Zoltan Varga <vargaz@gmail.com>
7379 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
7380 which is a low level lock protecting just the 'jit_code_hash' hash table.
7382 * domain.c: Initialize+cleanup jit_code_hash_lock.
7384 2008-06-30 Kornél Pál <kornelpal@gmail.com>
7386 * coree.c (mono_load_coree): Set coree_module_handle global variable only
7387 after initialization.
7389 * coree.h: Make MonoFixupExe internal.
7391 Contributed under MIT/X11 license.
7393 2008-06-30 Kornél Pál <kornelpal@gmail.com>
7395 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
7396 because that is platform independent. Check NumberOfRvaAndSizes in PE32
7398 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
7399 image being loaded is a CLI image and _CorValidateImage gets called.
7401 * coree.h: Add MonoLoadImage.
7403 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
7404 instead of LoadLibrary.
7406 Contributed under MIT/X11 license.
7408 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
7410 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
7411 for any primitive type.
7413 2008-06-29 Zoltan Varga <vargaz@gmail.com>
7415 * object.c (mono_array_new_specific): Optimize this and the other allocation
7418 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
7419 domains too if mono_dont_free_domains is set.
7421 * domain-internals.h (mono_dont_free_domains): New internal option controlling
7422 whenever to free appdomain data after it has been unloaded.
7424 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
7426 2008-06-28 Zoltan Varga <vargaz@gmail.com>
7428 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
7429 (mono_method_get_equivalent_method): Fix a warning.
7431 * object.c (mono_message_init): Avoid looking up array types for each call.
7433 2008-06-27 Zoltan Varga <vargaz@gmail.com>
7435 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
7438 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
7441 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
7444 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
7447 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
7449 * object.c (mono_value_box): Fix boxing of nullables.
7451 2008-06-26 Kornél Pál <kornelpal@gmail.com>
7453 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
7454 mono_module_handle that is defined by the linker; no initialization required.
7455 * coree.h: Remove mono_module_handle, add __ImageBase, update
7456 mono_image_open_from_module_handle.
7457 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
7458 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
7459 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
7460 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
7461 to 4 GB away from image base address. IA64 version is not tested but was very
7462 easy to implement and should work if we ever need it.
7463 * domain.c (mono_init_internal): Avoid system error message boxes.
7464 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
7465 with has_entry_point. Handle do_mono_image_load fauilre correctly.
7466 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
7467 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
7468 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
7470 Contributed under MIT/X11 license.
7472 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7474 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
7475 as part of the private mono API.
7477 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
7478 Do proper argument checking for methods that belong to generic classes.
7479 Do proper type resolution for GMFH/2.
7482 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7484 * verify.c (do_switch): Fix a memory corruption bug with
7485 the jump index is out of bound.
7487 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7489 * verify.c: Disable debug code.
7491 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7493 * reflection.c (mono_image_get_methodbuilder_token): Use
7494 mono_image_get_methodspec_token_for_generic_method_definition
7495 instead of mono_image_get_memberref_token. We cache more memberef
7498 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7500 * verify.c: Inflate exception clause types.
7503 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7505 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
7508 * reflection.c (mono_image_get_ctorbuilder_token): Same.
7510 * reflection.c (mono_image_create_method_token): Same.
7512 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7514 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
7515 It does the same as mono_image_get_methodref_token but works on
7518 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
7519 and always generate a methodspec. This follows the old behavior and fixes
7520 the regressions in System.Core.
7522 2008-06-24 Zoltan Varga <vargaz@gmail.com>
7524 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
7525 don't event mono_class_get () succeeds. Fixes #402182.
7527 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
7529 * metadata-internals.h: Added MonoDynamicImage::methodspec
7530 hashtable to store methodspec tokens created for MethodBuilders.
7532 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
7533 MethodBuilders as open instantiations if a methodspec was requested.
7535 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
7537 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
7539 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
7543 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
7545 * loader.c (method_from_methodspec): Avoid crashing if the
7546 method lookup fails.
7548 2008-06-20 Dick Porter <dick@ximian.com>
7550 * socket-io.c (get_socket_assembly): Cope with Moonlight network
7551 classes being in a different assembly. Fixes bug 399184.
7553 2008-06-20 Zoltan Varga <vargaz@gmail.com>
7555 * loader.c (mono_loader_init): Make this callable multiple times.
7556 (mono_dllmap_insert): Call mono_loader_init () so this works even before
7557 the runtime is initialized. Fixes #401755.
7559 2008-06-19 Dick Porter <dick@ximian.com>
7561 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
7564 2008-06-19 Dick Porter <dick@ximian.com>
7567 * icall-def.h: Implement Socket generic Send() and Receive()
7568 methods. Fixes bug 395168.
7570 2008-06-19 Kornél Pál <kornelpal@gmail.com>
7572 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
7574 Contributed under MIT/X11 license.
7576 2008-06-18 Martin Baulig <martin@ximian.com>
7578 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
7579 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
7580 set to 80.0. The debugger <-> runtime interface is now frozen as
7584 (mono_debug_debugger_version): Bump to 4.
7586 2008-06-18 Martin Baulig <martin@ximian.com>
7588 * debug-mono-symfile.c
7589 (load_symfile): Don't check the minor version.
7591 * debug-mono-symfile.h: Bump the version number to 50.0.
7593 2008-06-18 Martin Baulig <martin@ximian.com>
7595 * debug-mono-symfile.c
7596 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
7597 minimum required version.
7599 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
7601 * reflection.c (mono_custom_attrs_from_property): Fix support for
7602 retriveving cattrs of dynamic inflated generic types.
7604 * reflection.c (mono_custom_attrs_from_event): Same.
7606 * reflection.c (mono_custom_attrs_from_field): Same;
7608 * reflection.c (typebuilder_setup_events): Same cattrs of events.
7610 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
7611 Moved to metadata.c.
7613 * metadata.c: New functions to retrive the equivalent field, event
7614 of property from the generic type definition.
7616 * metadata-internals.h: Added new functions from metadata.c.
7618 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
7620 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
7621 to cached in a mempool is used.
7623 * metadata.c (free_generic_class): In some situations field generic_info type
7624 is not properly dup'ed and leads to double free'ing.
7628 2008-06-17 Mark Probst <mark.probst@gmail.com>
7630 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
7631 this arguments (will be needed later for generic methods).
7634 2008-06-17 Mark Probst <mark.probst@gmail.com>
7636 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
7637 Create a static RGCTX invoke wrapper for methods which require it.
7639 2008-06-17 Mark Probst <mark.probst@gmail.com>
7641 * object.c, class-internals.h: New function for checking whether
7642 an individual field is special static.
7644 2008-06-15 Zoltan Varga <vargaz@gmail.com>
7646 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
7647 linear search since the table is sorted.
7649 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
7652 2008-06-14 Zoltan Varga <vargaz@gmail.com>
7654 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
7655 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
7657 * gc.c (mono_domain_finalize): Allow an infinite timeout.
7659 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
7661 * threads.c (mono_thread_request_interruption): Get rid of locking, use
7662 InterlockedCompareExchange to query and modify
7663 thread->interruption_requested.
7665 * object-internals.h (struct _MonoThread): Change interruption_requested
7666 to a gint32 so it can be modified by atomic operations. Add
7667 'critical_region_level' from the managed side, change small_id to a guint32,
7668 add new set of 'unused' fields.
7670 * appdomain.c: Bump corlib version.
7672 2008-06-13 Zoltan Varga <vargaz@gmail.com>
7674 * class.c (mono_class_from_name): Search modules as well. Fixes
7677 2008-06-13 Mark Probst <mark.probst@gmail.com>
7679 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
7680 templates. Templates are generalized with an additional type_argc
7681 argument. RGCTX templates have type_argc==0, MRGCTX templates
7684 * domain-internals.h, domain.c: New hash table for looking up
7687 * metadata.c, metadata-internals.h: Rename hash and equal
7688 functions for MonoGenericInst's and make them public.
7690 * class-internals.h: New data structures for the MRGCTX. Macros
7691 for distinguishing slots in the RGCTX and the MRGCTX.
7693 2008-06-13 Mark Probst <mark.probst@gmail.com>
7695 * object.c (mono_method_get_imt_slot): Put the same methods of
7696 different instantiations of the same generic interface in the same
7697 IMT slots, to make generic sharing simpler.
7699 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7701 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
7703 * metadata.c (mono_metadata_field_info_with_mempool): Added.
7704 This function works just like mono_metadata_field_info, but
7705 accept a mempool as argument to be used allocating memory.
7707 * marshal.c (mono_marshal_load_type_info): Use new function
7708 to load marshal data into image mempool.
7710 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7712 * class.c (mono_class_inflate_generic_type_with_mempool):
7713 This function allows to inflate a generic type using
7716 * class.c (inflate_generic_type): Take a mempool as argument
7717 and use it to do type dup'ing.
7719 * class.c (mono_class_setup_fields): Field type for generic
7720 generic classes are allocated from the image mempool.
7722 * metadata.c (free_generic_class): Inflated field type is
7723 now allocated in the image mempool.
7725 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7727 * threads.c (thread_cleanup): Free MonoThread::name.
7729 2008-06-12 Marek Habersack <mhabersack@novell.com>
7731 * appdomain.c (ensure_directory_exists): avoid unnecessary
7732 mkdir(2) calls when the shadow directory already exists.
7733 (mono_make_shadow_copy): copy also satellite assemblies from the
7734 private bin directories.
7736 2008-06-11 Zoltan Varga <vargaz@gmail.com>
7738 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
7740 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
7741 a page boundary. Fixes #396219.
7743 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7745 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
7746 due to double-checked locking.
7748 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7750 * assembly.c (build_assembly_name): Release memory on failure.
7752 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
7754 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7756 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
7759 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7761 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
7764 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7766 * loader.c (field_from_memberref): Check if field signature type is equal
7767 to the non-inflated type of the field. Fixes #398980.
7769 2008-06-11 Zoltan Varga <vargaz@gmail.com>
7771 * assembly.c (mono_assembly_load_from_full): Call
7772 mono_assembly_load_friends () outside the assemblies lock, since it can
7773 acquire the loader lock. Fixes #323696.
7775 * reflection.c (resolve_object): Inflate the inst with the context for
7776 FieldOnTypeBuilderInst. Fixes #399010.
7778 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7780 * reflection.c (mono_image_get_field_on_inst_token): Don't
7781 inflate the field to encode it's signature. If it's a
7782 VAR or MVAR it should stay that way in the signature.
7785 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7787 * reflection.c (resolve_object): Release memory of inflated types.
7789 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7791 * loader.c (mono_method_get_signature_full): Remove assert about
7792 loading a methodspec to a generic method. We have such methods, such as
7793 System.Threading.Interlocked::CompareExchange<T>.
7794 This assert was removed since it crashes the verifier when it checks
7795 methods calling CompareExchange<T>.
7797 2008-06-10 Marek Safar <marek.safar@gmail.com>
7799 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
7800 of Type array and not MonoType.
7802 2008-06-10 Marek Habersack <mhabersack@novell.com>
7804 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
7807 2008-06-10 Martin Baulig <martin@ximian.com>
7809 * debug-mono-symfile.h
7810 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
7811 changes to the file format, but we were generating incorrect
7812 source file indices in the line number table due to a bug, which
7813 made backtraces report an incorrect source file.
7815 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7817 * mono-debug.c: Moved mono_debug_free_method_jit_info from
7818 mini/debug-mini.c to here.
7820 * mono-debug.c (il_offset_from_address): Free memory from find_method.
7822 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
7823 use it to release structs returned by mono_debug_find_method.
7825 2008-06-10 Zoltan Varga <vargaz@gmail.com>
7827 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
7828 since it needs to set method->slot for all interface methods.
7830 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7832 * class-internals.h: Forgot to add.
7834 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7836 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
7838 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
7839 Lookup the custom attributes from property_hash.
7841 * reflection.c (mono_save_custom_attrs): Save the custom attributes
7842 in property_hash. Allocate all data using the image mempool.
7844 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
7845 for dynamic_custom_attrs to checks if the image is dynamic.
7847 2008-06-09 Zoltan Varga <vargaz@gmail.com>
7849 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
7852 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
7853 runtime functions while holding the domain assemblies lock.
7855 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7857 * verify.c: Reapplied the last bit of the reverted changes.
7859 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7861 * verify.c: Reapplied more of the reverted changes.
7863 2008-06-09 Martin Baulig <martin@ximian.com>
7865 * debug-mono-symfile.c (load_symfile): Check the major version
7866 first; if it's wrong, don't print the minor version in the error message.
7868 2008-06-09 Zoltan Varga <vargaz@gmail.com>
7870 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
7871 lock instead of the domain lock to avoid deadlocks, since the thread might
7872 already hold the loader lock.
7874 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
7875 (mono_thread_attach): Ditto.
7877 * monitor.c: Use a TLS variable for holding the current thread id instead
7878 of calling pthread_self ().
7879 (mono_monitor_init_tls): New internal function to initialize the TLS
7881 (mono_monitor_try_enter_internal): Put the owner == id check after the
7884 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
7885 missed optimizations when using gcc-4.3.
7887 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
7889 * reflection.c (mono_dynamic_image_free): Free the memory
7890 used by MonoGenericParam in MonoDynamicImage::gen_param.
7892 * reflection.c (mono_reflection_setup_generic_class): Allocate
7893 container from mempool.
7895 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
7896 container from mempool.
7898 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7900 * threads.c (mono_set_pending_exception): New internal function to set the
7901 pending exception of the current thread.
7902 (mono_thread_get_and_clear_pending_exception): Check for
7903 thread->pending_exception as well.
7905 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
7907 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
7908 it can trigger a collection.
7910 2008-06-06 Martin Baulig <martin@ximian.com>
7912 Merged the `debugger-kahalo' branch.
7915 (MONO_DEBUGGER_VERSION): Bumped to 72.
7917 * debug-mono-symfile.h
7918 (MonoSymbolFileMethodIndexEntry): Removed.
7919 (MonoSymbolFileMethodEntry): New public typedef.
7920 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
7921 (MonoSymbolFileSourceEntry): Remove everything except `index' and
7923 (MonoSymbolFileMethodEntry): Removed.
7924 (MonoSymbolFileLexicalBlockEntry): Removed.
7925 (MonoSymbolFileLineNumberEntry): Removed.
7926 (MonoDebugLexicalBlockEntry): Removed.
7927 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
7928 removed `num_il_offsets' and `il_offsets'.
7929 (MonoSymbolFile): Replace `version' with `major_version' and
7931 (MONO_SYMBOL_FILE_VERSION): Replace with
7932 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
7933 `MONO_SYMBOL_FILE_MINOR_VERSION'.
7935 * debug-mono-symfile.c
7936 (mono_debug_symfile_lookup_location): Add support for the new line
7937 number table format.
7939 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7941 * metadata.c (free_generic_class): Release the inflated
7942 MonoClass of dynamic generic classes if it's not a generic
7945 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7947 * verify.c: Reapplied more of the reverted changes.
7949 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7951 * reflection.c (lookup_custom_attr): Clean the cached flag or
7952 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
7955 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7957 * verify.c: Reapplied a small part of the reverted changes.
7959 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7961 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7963 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
7964 previously in managed code.
7965 (mono_monitor_exit): Ditto.
7966 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
7968 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
7969 the managed definition.
7971 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7973 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
7975 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7977 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
7979 * monitor.c: Add some micro optimizations.
7981 * icall.c (type_from_typename): Handle 'bool'.
7983 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7985 * verify.c: Implement constructor verification per P III 1.8.1.4.
7988 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7990 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
7991 holding the assemblies lock here too.
7993 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7995 * verify.c: Kill stack_top function.
7997 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7999 * verify.c: Kill stack_get function.
8001 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
8003 * verify.c (mono_method_verify): Last change broke the build. Fixed.
8005 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
8007 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
8010 * verify.c (mono_method_verify): Inflate params and locals to avoid
8011 mismatch when checking for compatibility.
8013 2008-06-05 Jonathan Chambers <joncham@gmail.com>
8015 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
8016 Length prefix should be size in bytes. Fix bug #339530.
8018 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
8019 Length prefix should be size in bytes. Fix bug #339530.
8021 Code is contributed under MIT/X11 license.
8023 2008-06-05 Bill Holmes <billholmes54@gmail.com>
8025 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
8027 Contributed under MIT/X11 license.
8029 2008-06-05 Martin Baulig <martin@ximian.com>
8031 * mono-debug-debugger.c
8032 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
8034 2008-06-05 Zoltan Varga <vargaz@gmail.com>
8036 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
8037 while holding the assemblies lock to prevent deadlocks. Handle the case
8038 where the search hook returns NULL but the assembly was still loaded.
8041 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
8042 modify domain state.
8044 2008-06-05 Andreas Färber <andreas.faerber@web.de>
8046 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
8047 * Makefile.am (pedump_LDADD): Post-process object files and
8048 add dtrace-generated object file, if necessary.
8050 Code is contributed under MIT/X11 license.
8052 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
8054 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
8056 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
8058 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
8060 2008-06-04 Mark Probst <mark.probst@gmail.com>
8062 * threads.c: Try to free everything from the delayed free table
8063 when shutting down threads, and set the variable to NULL after the
8064 table is freed so that calling
8065 mono_thread_hazardous_try_free_all() when shutting down the root
8066 domain doesn't crash.
8068 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
8070 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
8071 the caller if resulting type was inflated.
8073 * class.c (mono_class_create_from_typespec): Free the MonoType if it
8076 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
8079 2008-06-04 Zoltan Varga <vargaz@gmail.com>
8081 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
8082 class library tests.
8084 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
8085 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
8088 2008-06-04 Mark Probst <mark.probst@gmail.com>
8090 * domain.c, domain-internals.h: The JIT infos are now freed by the
8091 JIT info table code. They are freed immediately if there only a
8092 single JIT info table in circulation. If there is more, the free
8093 is delayed via a queue.
8095 * threads.c, threads-types.h: New hazard pointer function for
8096 freeing all freeable delayed items in one sitting.
8098 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8100 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
8102 * reflection.c (typebuilder_setup_properties): Same.
8104 * reflection.c (typebuilder_setup_events): Same.
8106 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8108 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
8109 and use it for allocating memory.
8111 * reflection.c (mono_marshal_spec_from_builder): Same.
8113 * reflection.c: Change code to use new signatures.
8115 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
8117 2008-06-03 Zoltan Varga <vargaz@gmail.com>
8119 * decimal.c (rescale128): Put back one line which was accidently commented
8122 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
8125 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8127 * reflection.c (mono_reflection_generic_class_initialize): Name must
8128 be always malloc'ed so we can free it later on. Do this for field, property
8131 * metadata.c (free_generic_class): Free field, property and event names.
8133 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8135 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
8136 instead of g_memdup.
8138 * reflection.c (typebuilder_setup_fields): Same.
8140 2008-06-03 Zoltan Varga <vargaz@gmail.com>
8142 * decimal.c (rescale128): Optimize this function a bit more.
8144 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8146 * metadata.c (free_generic_class): Release some memory from
8147 SRE generic classes.
8149 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8151 * reflection.c (mono_image_get_generic_field_token): No reference
8152 to name is kept, free it.
8154 * reflection.c (mono_reflection_generic_class_initialize): Free
8155 more memory of the inflated field.
8157 2008-06-03 Zoltan Varga <vargaz@gmail.com>
8159 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
8162 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
8164 * reflection.c (mono_dynamic_image_free): Release memory used by
8165 MonoDynamicImage::array_methods elements.
8167 * reflection.c (assembly_add_win32_resources): Release memory after
8170 2008-06-02 Zoltan Varga <vargaz@gmail.com>
8172 * decimal.c (log2_32): Use an optimized version for this function too.
8174 * decimal.c (log2_64): Fix this on 32 bit machines.
8176 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
8178 * class.c (mono_dup_array_type): Implement allocation using a mempool.
8180 * class.c (mono_metadata_signature_deep_dup): Same.
8182 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
8185 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
8187 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
8189 * metadata-internals.h: Added mono_metadata_signature_dup_full.
8191 * class-internals.h: Update signatures to take a MonoMemPool.
8193 2008-06-02 Dick Porter <dick@ximian.com>
8195 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
8197 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
8198 FormatMessage API to get the error text. Fixes bug 321827.
8200 2008-06-02 Zoltan Varga <vargaz@gmail.com>
8202 * decimal.c: Add some micro optimizations to make decimal operations faster.
8204 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
8206 * reflection.c (method_encode_clauses): Take a mempool
8207 as parameter and use it to allocate the clause array.
8209 * reflection.c (mono_image_get_field_on_inst_token): Free
8210 the inflated type after encoding it.
8212 * reflection.c (mono_dynamic_image_free): Free each element
8213 of MonoDynamicImage::gen_params.
8215 * reflection.c (reflection_methodbuilder_to_mono_method):
8216 Allocate the generic param array from the mempool.
8217 Allocate signature params from the mempool.
8219 * reflection.c (mono_reflection_generic_class_initialize):
8220 Free inflated fields after been used.
8222 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
8224 * icall.c: Reapply the memory leak fixes as they no
8225 longer make mono crash.
8227 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
8229 * reflection.c (mono_type_get_object): Don't store the suplied
8230 MonoType with type_hash. A caller which pass a type that
8231 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
8232 might end with a pointer to freed memory.
8233 The solution is to use byval_arg or this_arg from the associated
8234 MonoClass of the supplied type.
8236 2008-05-29 Zoltan Varga <vargaz@gmail.com>
8238 * icall.c: Revert the rest of the last change as it breaks the build too.
8240 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
8242 * icall.c: Revert a leak fix as it's breaking the build.
8244 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
8246 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
8248 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
8250 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
8252 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
8254 * icall.c: Fix some memory leaks.
8256 2008-05-29 Dick Porter <dick@ximian.com>
8258 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
8259 async socket operations from the pending list when a socket
8260 closes. Leaving it until the threadpool services the event
8261 exposes a race condition when a socket descriptor is reused.
8264 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8266 * object.c: Fix negative index check for array alocation.
8268 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8270 * icall.c, marshal.c: Delegate wrappers should skip visibility.
8271 This check is performed by the verifier for IL created delegates
8272 and by Delegate::CreateDelegate for programatically created ones.
8275 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8277 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
8278 Fix code to use mono_array_size_t instead of int.
8280 Based on patch by Luis F. Ortiz.
8281 Contributed under X11 license.
8282 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8284 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8286 * icall.c: Added ves_icall_System_Array_GetLongLength and
8287 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
8290 * icall.h: Export both new functions.
8292 Based on patch by Luis F. Ortiz.
8293 Contributed under X11 license.
8294 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8296 2008-05-28 Martin Baulig <martin@ximian.com>
8298 The debugger now requires exactly r103463.
8300 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
8301 This version is not supported by the debugger, wait for 72.
8303 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8305 * object.h: Changed array related functions to use
8306 mono_array_size_t instead of guint32. Forgot to commit this file.
8308 Patch by Luis F. Ortiz.
8309 Contributed under X11 license.
8310 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8313 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8315 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
8316 don't define it. Use the number literal instead.
8318 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8320 * icall.c: Changed array related functions to use
8321 mono_array_size_t instead of guint32.
8323 * icall.c (ves_icall_System_Array_GetLength): Check for length
8324 overflow under MONO_BIG_ARRAYS.
8326 Based on patch by Luis F. Ortiz.
8327 Contributed under X11 license.
8328 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8330 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8332 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
8334 Based on patch by Luis F. Ortiz.
8335 Contributed under X11 license.
8336 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8338 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8340 * object.c, object.h: Changed array related functions to use
8341 mono_array_size_t instead of guint32.
8343 Patch by Luis F. Ortiz.
8344 Contributed under X11 license.
8345 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8347 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8349 * object.h: Introduced mono_array_size_t typedef. This must be used
8350 in all places an array length is expected. This is 64bits wide if
8351 MONO_BIG_ARRAYS is enabled.
8353 Patch by Luis F. Ortiz.
8354 Contributed under X11 license.
8355 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8357 2008-05-27 Zoltan Varga <vargaz@gmail.com>
8359 * security-manager.c class.c: Set the class exception info by calling
8360 mono_class_set_failure ().
8362 * class.c (mono_class_get_exception_data): New accessor function.
8363 (mono_class_set_failure): Store exception_data in the property hash.
8365 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
8366 the struct as a property.
8368 * loader.c (mono_get_method_full): Store the lookup result for method
8369 tokens in method_cache, the others in methodref_cache to decrease the memory
8370 usage of hash tables.
8372 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
8373 (mono_image_init): method_cache is lazy inited now.
8375 * metadata-internals.h (struct _MonoImage): Change method_cache to
8376 a MonoValueHashTable, add a separate methodref_cache.
8378 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
8380 * number-formatter.h: Fix tables to avoid arithemtic overflow in
8381 Double.ToString as exposed by Bug #383531.
8383 2008-05-26 Zoltan Varga <vargaz@gmail.com>
8385 * number-formatter.h: Make some tables static.
8387 * class.c (mono_method_set_generic_container): New accessor function.
8388 (mono_method_get_generic_container): Ditto.
8390 * class-internals.h (struct _MonoMethod): Remove rarely used
8391 'generic_container' field, store it in the property hash instead. Add
8392 'is_generic' boolean field instead.
8394 * image.c (mono_image_init): Initialize property_hash.
8395 (mono_image_close): Destroy property_hash.
8397 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
8398 hold rarely used fields of runtime structures belonging to this image.
8400 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
8401 to get/set method->generic_container.
8403 * loader.c (mono_get_method_from_token): Avoid loading the method header for
8406 2008-05-25 Zoltan Varga <vargaz@gmail.com>
8408 * class.c (mono_class_inflate_generic_method_full): Don't increase
8409 mono_stats.inflated_method_count for methods found in the cache.
8411 * threads.c (mono_thread_request_interruption): Add a comment about
8414 2008-05-24 Zoltan Varga <vargaz@gmail.com>
8416 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
8417 interface_offsets_packed table.
8419 * class.c (mono_class_init): Remove some dead code.
8421 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
8422 mono_class_setup_vtable () when CAS is active to detect security problems.
8424 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
8426 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
8428 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
8429 parameters as it's irrelevant for delegate checking.
8431 2008-05-23 Zoltan Varga <vargaz@gmail.com>
8433 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
8435 * class.c (mono_class_init): Control the creation of a generic vtable using
8436 a global which is true by default, but set to false by the runtime startup code.
8438 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
8439 Disabled for now since it breaks the embedding API.
8440 Move the setup of class->methods for arrays to mono_class_setup_methods ().
8441 (mono_class_setup_methods): Add a memory barrier.
8443 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
8444 when mono_class_init () doesn't compute the generic vtable.
8446 2008-05-23 Massimiliano Mantione <massi@ximian.com>
8447 * profiler.c: Added mono_profiler_install_statistical_call_chain,
8448 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
8449 to support call chains (backtrace) in the stat profiler.
8450 * profiler.c, profiler-private.h: Likewise.
8452 2008-05-22 Mark Probst <mark.probst@gmail.com>
8454 * generic-sharing.c: Init generic class when a method of it is
8455 requested via a runtime generic context.
8457 2008-05-22 Zoltan Varga <vargaz@gmail.com>
8459 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
8461 * reflection.c (mono_type_get_object): Add a FIXME.
8463 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
8465 * class.c (mono_class_get_method_by_index): New helper function, returning an
8466 entry in the class->methods array.
8468 2008-05-21 Zoltan Varga <vargaz@gmail.com>
8470 * class.c (mono_class_init): Only do the array optimization for szarrays.
8471 Avoid creating a generic vtable for generic instances as well.
8472 (mono_class_get_method_from_name_flags): Don't search in the metadata for
8475 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
8477 * loader.c (mono_get_method_constrained): Inflate the signature
8478 with class context. Fix #325283.
8480 2008-05-21 Zoltan Varga <vargaz@gmail.com>
8482 * object.c (mono_class_create_runtime_vtable): Add a comment.
8484 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
8486 (setup_interface_offsets): Handle the case when this is called twice for arrays.
8487 (mono_class_setup_vtable_general): Add an assert.
8488 (mono_class_init): Avoid creating a generic vtable for arrays.
8490 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
8491 here, let mono_class_init () do that.
8493 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
8494 interfaces in mscorlib.
8496 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
8497 interfaces. Add some comments.
8498 (mono_class_init): Call mono_class_setup_methods () here since it is no
8499 longer called by mono_class_setup_vtable ().
8501 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
8502 not set in class->vtable.
8503 (mono_class_create_runtime_vtable): Reenable the disabled code.
8505 * object.c (mono_class_create_runtime_vtable): Disable the last change for
8506 now as it causes some test failures.
8508 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
8509 if using the vtable trampoline. Also remove some strange code which put the
8510 generic methods themselves into the vtable slots. Remove the AOT init_vtable
8511 stuff as it is no longer needed.
8513 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
8515 * pedump.c: Give make --verify all option check code as well.
8516 Using --verify code won't check for metadata now.
8518 2008-05-19 Martin Baulig <martin@ximian.com>
8520 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
8523 (_mono_debug_using_mono_debugger): New global variable; it's set
8524 directly by the debugger, so mono_debug_using_mono_debugger() also
8525 works after attaching.
8527 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
8529 * object.c (mono_class_create_runtime_vtable): Use memory barriers
8530 as we do double checked locking on MonoClass::runtime_info and
8531 MonoClassRuntimeInfo::domain_vtables.
8533 2008-05-18 Zoltan Varga <vargaz@gmail.com>
8535 * debug-helpers.c (print_field_value): Fix a warning.
8537 2008-05-16 Zoltan Varga <vargaz@gmail.com>
8539 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
8540 set in the AOT case.
8542 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
8544 * class.c (mono_class_setup_vtable_general): Use memory barriers
8545 as we do double checked locking on MonoClass::vtable.
8547 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
8549 * reflection.c (resolve_object): Inflate only if the generic context
8550 is not null. Fixes #389886.
8552 2008-05-15 Jonathan Chambers <joncham@gmail.com>
8554 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
8557 Code is contributed under MIT/X11 license.
8559 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8561 * class.c: Revert unrelated change.
8563 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8565 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
8566 a generic instantiation, use mono_class_from_mono_type instead of playing
8567 with MonoType directly.
8569 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8571 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
8572 checks must ignore generic instantiations, so mono_class_has_parent is not
8573 suitable. Fixes #390128.
8575 2008-05-14 Zoltan Varga <vargaz@gmail.com>
8577 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
8578 it to avoid registering tokens during metadata generation. Fixes #390023.
8580 2008-05-14 Kornél Pál <kornelpal@gmail.com>
8582 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
8585 Contributed under MIT/X11 license.
8587 2008-05-14 Kornél Pál <kornelpal@gmail.com>
8589 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
8590 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
8591 to fixup the EXE image.
8592 (mono_cleanup): Use mono_close_exe_image.
8593 (mono_close_exe_image): New function.
8594 * image.c: Include "marshal.h".
8595 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
8596 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
8597 counting when the image is loaded outside of mono_image_open_full. Set status
8598 based on GetLastError.
8599 * coree.c: Include required headers. Add init_from_coree.
8600 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
8601 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
8602 (_CorExeMain): Set init_from_coree.
8603 (CorExitProcess): Only call ExitProcess for now.
8604 (CorBindToRuntimeEx): New stub implementation.
8605 (CorBindToRuntime): New function.
8606 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
8607 (MonoFixupExe): ILONLY executables require no fixups.
8608 (mono_set_act_ctx): New function to set activation context.
8609 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
8610 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
8611 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
8612 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
8614 * domain-internals.h: Add mono_close_exe_image.
8616 Contributed under MIT/X11 license.
8618 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
8620 * metadata.c (mono_metadata_compute_size): Correctly calculate field
8621 size for generic param and event tables. Fixes #388977.
8623 2008-05-13 Zoltan Varga <vargaz@gmail.com>
8625 * loader.c (mono_method_signature): Use memory barriers because of the double
8626 checked locking pattern.
8628 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
8629 aborting or aborted as well. Fixes #376391.
8631 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
8632 existing runtime state in the Suspend handler during shutdown.
8634 2008-05-12 Zoltan Varga <vargaz@gmail.com>
8636 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
8638 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
8639 which are starting up or shutting down.
8641 * threads.c (mono_threads_set_shutting_down): Don't return a value since
8642 this function never returns if the runtime is already shutting down.
8644 * icall.c (ves_icall_System_Environment_Exit): Update after
8645 mono_threads_set_shutting_down () signature change.
8647 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
8649 * class.c: Added can_access_instantiation to verify if the instantiation
8650 is visible. Fix access check for nested types as they returned TRUE
8651 before doing type and generic instantiation visibility checks.
8653 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
8655 * reflection.c (mono_reflection_create_generic_class): The created type
8656 must have a different container from its TypeBuilder. Otherwise they
8657 will end sharing generic arguments, which is wrong.
8659 Due to the sharing, making a generic instance of the created type using
8660 the TypeBuider generic arguments resulted in the generic type definition
8661 been returned, which is wrong as well.
8663 As a bonus the code was leaking the type_params array. This memory should
8664 be allocated from the image mempool.
8666 This fixes bug #354047.
8668 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
8670 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
8671 to here as they are now used in assembly.c new code.
8672 Added a skipverification flag to MonoAssembly.
8673 New internal function mono_assembly_has_skip_verification.
8675 * assembly.c: New function mono_assembly_has_skip_verification. It checks
8676 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
8679 2008-05-07 Zoltan Varga <vargaz@gmail.com>
8681 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
8682 needed. Fixes #387034.
8684 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
8686 2008-05-06 Miguel de Icaza <miguel@novell.com>
8688 * assembly.c (mono_assembly_load_reference): Prevent crash while
8689 disassembling Silverlight 2.0 executables while we still do not
8690 have GACed libraries.
8692 2008-05-07 Zoltan Varga <vargaz@gmail.com>
8694 * reflection.c: Special case generic type definitions as well. Fixes #383444.
8696 2008-05-06 Zoltan Varga <vargaz@gmail.com>
8698 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
8699 of the dynamic case. Fixes #387404.
8701 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8703 *verify.c (mono_verifier_is_class_full_trust): If under
8704 verify_all and the verifier mode was not set, only
8705 gac and corlib types are fulltrust. This makes --verify-all
8706 usable to detect unverifiable code, which is the expected
8709 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8711 * verify.h: Ops, commited the header with debug
8714 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8716 * verify.c (merge_stack): Use the new value on unverifiable
8719 * verify.c (verify_type_compatibility_full): Comparison
8720 of nullable types can't use mono_class_is_assignable_from.
8722 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
8723 that makes all verification errors be reported.
8725 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
8728 2008-05-05 Robert Jordan <robertj@gmx.net>
8730 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
8731 support for value types. See #386415.
8733 * object.c: comments.
8735 Code is contributed under MIT/X11 license.
8737 2008-05-05 Martin Baulig <martin@ximian.com>
8739 * debug-mono-symfile.h
8740 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
8741 for old pre-terrania symbol files.
8743 2008-05-05 Andreas Färber <andreas.faerber@web.de>
8745 * mono-config.c: Add ppc64 architecture.
8747 Code is contributed under MIT/X11 license.
8749 2008-05-05 Andreas Färber <andreas.faerber@web.de>
8751 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
8752 PPC64 uses function descriptors as well.
8754 Code is contributed under MIT/X11 license.
8756 2008-05-04 Zoltan Varga <vargaz@gmail.com>
8758 * object.c (compute_class_bitmap): Ignore literal static fields.
8760 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
8761 var has an invalid format.
8762 (describe_ptr): Add some sanity checks for the vtable.
8763 (add_nursery_frag): Clear unused nursery fragments.
8764 (major_collection): Clear all remaining nursery fragments.
8766 2008-05-03 Robert Jordan <robertj@gmx.net>
8768 * image.c, metadata-internals.h: add thunk_invoke_cache.
8770 * marshal.c, marshal.h: implement
8771 mono_marshal_get_thunk_invoke_wrapper ().
8773 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
8775 Code is contributed under MIT/X11 license.
8777 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
8779 * verify.c (do_leave): Empty the stack.
8781 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
8783 * class.c (mono_class_is_assignable_from): Variance
8784 doesn't work between reference and value types. For example,
8785 given type C<T+>, C<int32> is not assignable to C<object>.
8786 Break the argument checking loop on first error.
8788 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
8790 * icall.c : base64_to_byte_array() needs some more strict
8791 check for sequence of '=' characters. Patch by Santa
8792 Marta (http://deee.g.hatena.ne.jp/santamarta).
8794 Contributed under MIT/X11 license.
8795 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
8797 2008-05-02 Jonathan Chambers <joncham@gmail.com>
8799 * domain.c: Disable LoadLibrary support to fix Win32 build.
8801 Code is contributed under MIT/X11 license.
8803 2008-05-02 Zoltan Varga <vargaz@gmail.com>
8805 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
8806 to help with cache behaviour.
8808 2008-05-01 Miguel de Icaza <miguel@novell.com>
8810 * appdomain.c (mono_domain_from_appdomain): Add new accessor
8813 2008-05-01 Zoltan Varga <vargaz@gmail.com>
8815 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
8817 2008-05-01 Dick Porter <dick@ximian.com>
8819 * process.c (process_get_fileversion): Only pass 16 bits of
8820 language ID to VerLanguageName. Fixes bug 381204.
8822 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
8824 * verify.c (mono_method_verify): Fix the comparison
8825 operator for code bounds check.
8827 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
8829 * verify.c (mono_method_verify): Check the bounds of
8830 all access of the code array.
8832 2008-04-29 Kornél Pál <kornelpal@gmail.com>
8834 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
8836 2008-04-28 Zoltan Varga <vargaz@gmail.com>
8838 * image.c (mono_image_strong_name_position): Fix return value when the rva is
8841 2008-04-28 Kornél Pál <kornelpal@gmail.com>
8843 * loader.c (mono_get_method_from_token, mono_method_signature): Add
8844 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
8845 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
8846 fixup main EXE images when using mono.exe for mixed-mode assembly support.
8847 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
8849 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
8850 runtime initialization from metadata.
8851 * assembly.c: Remove obsolete ceGetModuleFileNameA.
8852 (mono_set_rootdir): Use mono_get_module_file_name.
8853 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
8855 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
8856 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
8857 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
8858 MonoCLIImageInfo. Add support for module handles.
8859 (load_cli_header): Update mono_cli_rva_image_map signature.
8860 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
8861 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
8862 (mono_image_rva_map): Add support for module handles.
8863 (mono_image_ensure_section_idx): Add support for module handles.
8864 (mono_image_close): Add support for module handles.
8865 (do_load_header): Add support for module handles.
8866 (mono_image_open_from_module_handle): New function for internal use.
8867 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
8868 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
8869 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
8871 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
8872 * image.h: Add mono_image_fixup_vtable.
8873 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
8875 * coree.h: New file.
8876 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
8877 unsupported native code.
8878 (mono_marshal_set_callconv_from_modopt): New function splitted from
8879 mono_marshal_get_managed_wrapper.
8880 (mono_marshal_get_managed_wrapper): Use
8881 mono_marshal_set_callconv_from_modopt.
8882 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
8883 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
8884 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
8885 that results in a deadlock when the runtime is loaded in _CorDllMain.
8886 * Makefile.am: Add coree.c and coree.h.
8888 Contributed under MIT/X11 license.
8890 2008-04-28 Mark Probst <mark.probst@gmail.com>
8892 * generic-sharing.c: Search for type arguments in array element
8895 2008-04-28 Mark Probst <mark.probst@gmail.com>
8897 * class-internals.h, generic-sharing.c: New, small runtime generic context.
8899 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
8901 * object.c: Don't setup the RGCTX when the vtable is created,
8902 because we're setting it up lazily now.
8904 2008-04-26 Zoltan Varga <vargaz@gmail.com>
8906 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
8909 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8911 * verify.c (verify_class_for_overlapping_reference_fields):
8912 If class is under fulltrust allow reference types to overllap
8913 if they have the same RVA.
8915 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8917 * pedump.c: Added new flag valid-only, that makes the verifier
8918 behaves just like --security=validil. It won't fail type load
8919 due to unverifiable restrictions.
8921 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8923 * class-internals.h (struct MonoMethod): Added a verification_success
8924 field to cache verifier executions. Reduced MonoMethod:slot size by
8927 2008-04-23 Zoltan Varga <vargaz@gmail.com>
8929 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
8930 instead of a 'vt' argument to save an indirection and to allow these to be used
8932 (scan_vtype): New helper function to scan an area using a gc descriptor.
8933 (mono_gc_wbarrier_value_copy): Implement this.
8934 (handle_remset): Add support for REMSET_VTYPE.
8935 (find_in_remset_loc): Ditto.
8936 (mono_gc_base_init): Allow some debugging options to be controlled through the
8937 use of the MONO_GC_DEBUG env variable.
8938 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
8939 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
8941 2008-04-23 Martin Baulig <martin@ximian.com>
8943 * domain.c (mono_domain_create): Move the call to
8944 mono_debug_domain_create() down, after allocating the domain id.
8946 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8948 verify.c (verify_class_for_overlapping_reference_fields): Skip
8949 static fields while verifying for overlapping fields as they
8950 don't matter at all.
8952 2008-04-23 Marek Habersack <mhabersack@novell.com>
8954 * domain-internals.h: added a declaration of
8955 mono_make_shadow_copy.
8957 * assembly.c (mono_assembly_open_full): shadow copying of
8958 assemblies moved to here, so that all the assemblies within the
8959 application domain's private binary directories can be
8960 processed. Fixes bug #380546
8962 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
8963 mono_make_shadow_copy and made non-static. The decision whether
8964 to shadow-copy an assembly is made based on its location - it's
8965 copied if it's in one of the private application domain binary
8966 directories and its different to the target file in the shadow
8967 directory. Fixes bug #380546
8969 2008-04-22 Zoltan Varga <vargaz@gmail.com>
8971 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
8973 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
8976 * reflection.c (mono_image_create_token): Handle
8977 Method/ConstructorOnTypeBuilderInst.
8978 (resolve_object): Ditto.
8979 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
8980 so it can be called from resolve_object. Also handle the case when the inflated
8981 class already has its methods setup.
8983 2008-04-21 Martin Baulig <martin@ximian.com>
8985 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
8987 2008-04-20 Geoff Norton <gnorton@novell.com>
8989 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
8990 pointer dereference.
8992 2008-04-15 Marek Habersack <mhabersack@novell.com>
8994 * appdomain.c (try_load_from): if IOMAP is in effect, call the
8995 portability API to look up the assembly file. Fixes behavior in
8996 situations when the application has a bin/ directory, but the
8997 assembly search patch refers to Bin/ (and thus the requested file
8998 name is Bin/SomeLibrary.dll). Fixes bug #379888
9000 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
9002 verify.c (mono_type_is_generic_argument): Extracted this check
9003 from a dozen places to here.
9005 verify.c: Fixed all issues related to boxing generic arguments
9006 and their constraints.
9008 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
9010 verify.c (mono_class_interface_implements_interface): Fix win32 build.
9012 2008-04-14 Zoltan Varga <vargaz@gmail.com>
9014 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
9015 isn't finished yet. Fixes #363447.
9017 2008-04-13 Zoltan Varga <vargaz@gmail.com>
9019 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
9022 2008-04-13 Jb Evain <jbevain@novell.com>
9024 * domain.c: update the 2.1 profile versions.
9025 Merged from the Moonlight 2 branch.
9027 2008-04-12 Zoltan Varga <vargaz@gmail.com>
9029 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
9030 mscorlibs for the non-refonly case as well.
9032 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
9033 in mono_assembly_load_from_full (). Fixes #378924.
9035 2008-04-11 Geoff Norton <gnorton@novell.com>
9037 * icall.c: The global extern environ doesn't exist on Mac. We
9038 need to call NSGetEnviron instead.
9040 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9042 verify.c: Add generic method constraint verification.
9044 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9046 class.c (mono_class_inflate_generic_method_full): Add a long
9047 explanation to the is_mb_open hack. Remove the FIXME.
9049 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9051 * verify.c (mono_method_verify): Mark all unknown opcodes
9052 as invalid. Mark jmp as unverifiable.
9054 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9056 * verify.c: Add code to do type constraint verification on class instances.
9058 * verify.c (mono_verifier_verify_class): Use the type constraint
9061 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9063 * class.c (mono_class_get_field_default_value): Don't pass cindex
9064 as hint to mono_metadata_get_constant_index. The local is not initialized
9065 and should contain garbage most of the time. This could only work
9068 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
9070 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
9072 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
9074 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
9076 * class.c (mono_class_from_generic_parameter): Save the token of the
9077 generic param in MonoClass::sizes.generic_param_token.
9079 * reflection.c (mono_custom_attrs_from_class): If the class type is
9080 VAR or MVAR retrieve the attributes of the generic param.
9082 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
9084 * class.c (mono_class_init): Do class verification if the verifier
9087 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
9089 * verify-internal.h: Added mono_verifier_verify_class.
9091 * verify.c: Added mono_verifier_verify_class. It checks for
9092 classes with explicit layout that have overlapping reference fields.
9094 * pedump.c: Init the verifier state prior to verification. Fixed
9095 command line arguments.
9097 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
9099 * Makefile.am: Added verify-internals.h, hopefully fix the build.
9101 2008-04-08 Zoltan Varga <vargaz@gmail.com>
9103 * verify-internals.h: Fix a warning.
9105 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
9107 * verify-internals.h: New header with the verifier configuration
9108 extracted from mini.c.
9110 * verify.c: Implemented the new functions exported by verify-internals.h.
9112 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
9114 * verify.c: Add proper verification of ckfinite.
9116 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
9118 * verify.c (do_conversion): Improved error message to something
9121 * verify.c (check_is_valid_type_for_field_ops): Fix to work
9122 with primitive types.
9124 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
9126 * verify.c: Added tail prefix checking. Marked icall
9129 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
9131 * verify.c: Fix the detection of branches to the middle
9134 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
9136 * verify.c: Implemented verification of volatile. and
9137 unaligned. prefix. Check if a type is valid after retrieving it.
9139 2008-04-01 Dick Porter <dick@ximian.com>
9141 * process.c (process_get_fileversion): If there's no string block,
9142 set the file language to en_US. Fixes the other new part of bug
9145 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
9147 * class.c: New functions mono_method_can_access_field_full and
9148 mono_method_can_access_method_full. They perform type visibility
9149 and type site check.
9151 * class-internal.h: Added exported functions.
9153 * verify.c: Use new functions to implement proper visibility checks.
9155 2008-03-29 Zoltan Varga <vargaz@gmail.com>
9157 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
9159 2008-03-28 Dick Porter <dick@ximian.com>
9161 * process.c (process_get_fileversion): Use the first language ID
9162 we see, rather than insisting on an invariant language. Fixes bug
9165 2008-03-28 Zoltan Varga <vargaz@gmail.com>
9167 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
9168 the streams to fix reading of invalid memory later.
9170 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
9173 2008-03-26 Zoltan Varga <vargaz@gmail.com>
9175 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
9176 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
9178 2008-03-26 Massimiliano Mantione <massi@ximian.com>
9179 * threads.h: Added MonoThreadManageCallback type and
9180 mono_thread_set_manage_callback prototype
9181 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
9182 (used to store the mono_thread_manage callback).
9183 * threads.c: Added mono_thread_set_manage_callback, and handle
9184 "MonoThread->manage_callback" in build_wait_tids.
9186 2008-03-26 Dick Porter <dick@ximian.com>
9188 * process.c (process_get_fileversion): Set FileVersionInfo strings
9189 to Empty when the resource doesn't have the particular info.
9192 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
9194 * verify.c (mono_method_verify): Proper prefix validation.
9196 2008-03-25 Zoltan Varga <vargaz@gmail.com>
9198 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
9199 itself in a separate argument instead of throwing them. Fixes #373448.
9201 * appdomain.c: Bump corlib version.
9203 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
9205 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
9207 2008-03-20 Kornél Pál <kornelpal@gmail.com>
9209 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
9212 2008-03-20 Mark Probst <mark.probst@gmail.com>
9214 * generic-sharing.c, class-internals.h: Code for putting
9215 reflection types into the runtime generic context.
9217 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
9219 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
9223 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
9225 * verify.c (VerifyContext): Added instruction prefix data to the struct.
9227 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
9229 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
9231 * verify.c (do_cast): Let the result value keep the boxed status.
9233 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
9235 2008-03-17 Jb Evain <jbevain@novell.com>
9237 * reflection.c: when running on a 2.0 runtime, emit
9238 unconditionally the #~ header version as 2.0, and the
9239 CLI header version as 2.5, for symmetry's sake with csc.
9241 2008-03-16 Zoltan Varga <vargaz@gmail.com>
9243 * class.c: Remove the unused cache_interface_offsets stuff.
9245 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
9246 profiler.c: Fix warnings.
9248 2008-03-16 Mark Probst <mark.probst@gmail.com>
9250 * generic-sharing.c, class-internals.h: Support for putting
9251 methods into the runtime generic context.
9253 2008-03-16 Zoltan Varga <vargaz@gmail.com>
9255 * class.c (mono_class_setup_fields): Ignore calls made to this function for
9256 classes which are generic instances of not-yet finished typebuilders. Fixes
9259 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
9261 2008-03-15 Zoltan Varga <vargaz@gmail.com>
9263 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
9265 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
9266 field, replace it with a hash table in MonoDynamicImage.
9268 * reflection.c (inflate_mono_method): Access the generic definition object from
9269 image->generic_def_objects instead of imethod->reflection_info.
9271 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
9273 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
9275 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
9276 function in reflection.c so it is easier to keep in sync with the dynamic image
9279 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
9280 mono_image_close ().
9282 2008-03-15 Mark Probst <mark.probst@gmail.com>
9284 * class.c (mono_class_generic_sharing_enabled): Disable generic
9285 sharing for all architectures except AMD64 and x86 to fix build.
9287 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
9289 * verify.c: Use the generic definition MonoGenericContext when available.
9290 Remove code for checking generics instance compatibility in favor of
9291 mono_class_is_assignable_from.
9293 2008-03-14 Mark Probst <mark.probst@gmail.com>
9295 * marshal.c, marshal.h, metadata-internals.h, image.c,
9296 wrapper-types.h: New wrapper for invoking a shared static method
9297 without having to pass the runtime generic context argument.
9299 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
9301 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
9303 2008-03-14 Zoltan Varga <vargaz@gmail.com>
9305 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
9307 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
9308 create a token from a FieldOnTypeBuilderInst.
9309 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
9310 (resolve_object): Ditto.
9312 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
9313 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
9315 2008-03-14 Martin Baulig <martin@ximian.com>
9317 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
9319 * debug-mono-symfile.h
9320 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
9321 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
9323 2008-03-10 Martin Baulig <martin@ximian.com>
9325 * debug-mono-symfile.h
9326 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
9327 `lexical_block_table_offset'.
9328 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
9330 (MonoSymbolFile): Added `version'.
9333 (MonoDebugLexicalBlockEntry): Removed.
9334 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
9337 * mono-debug.c (mono_debug_add_method): Don't compute lexical
9338 blocks here; the debugger now does this internally.
9340 2008-02-27 Martin Baulig <martin@ximian.com>
9342 * object.c (mono_runtime_exec_main): Call
9343 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
9344 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
9346 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
9348 * verify.c (verify_type_compatibility_full): Allow native int to be converted
9349 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
9351 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
9353 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
9354 ldftn with a virtual method.
9356 2008-03-13 Geoff Norton <gnorton@novell.com>
9358 * decimal.c: Only include memory.h if the platform has it.
9360 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
9362 * assembly.c, class.c, metadata-internals.h: make sure public key
9363 tokesns are compared in a case-insensitive way. Also, all
9364 the lookups in the GAC use a lowercase public key token
9365 (gaacutil already does the lowercasing on install). Fixes
9368 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
9370 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
9373 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
9375 * image.c: when someone loads a mscorlib from a file, return the
9376 currently loaded mscorlib (fixes bug #369253).
9378 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
9380 * class.c: handle types with no parents by forcing them to have
9381 System.Object as a parent and marking them as broken (this currently
9382 allows the first part of bug #369173 to work as well, likely because
9383 we don't check for typeload exceptions everywhere yet).
9385 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
9387 * class.c: more complete check that types belong to corlib
9388 (fixes second part of bug #369173).
9390 2007-03-10 Bill Holmes <billholmes54@gmail.com>
9392 * generic-sharing.c: Including glib.h for the MSVC builds to define
9393 "inline" to "__inline" before including mono-membar.h.
9395 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
9396 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
9399 Contributed under MIT/X11 license.
9401 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
9403 * verify.c (do_invoke_method): Remove return type validation.
9405 * verify.c (do_ret): Do return type validation at return site instead of
9408 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
9410 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
9412 * verify.c: Some todos cleaned and improved a few error messages.
9414 2008-03-08 Zoltan Varga <vargaz@gmail.com>
9416 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
9418 2008-03-07 Zoltan Varga <vargaz@gmail.com>
9420 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
9421 system types correctly.
9423 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
9426 2008-03-06 Zoltan Varga <vargaz@gmail.com>
9428 * assembly.c (build_assembly_name): Fix a warning.
9430 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
9432 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
9433 the called function takes an object type argument. Fixes storing or
9434 valuetypes across remoting as well as reducing memory usage.
9435 * image.c, metadata-internals.h: remove now unused ldfld_remote and
9436 stfld_remote wrapper caches.
9438 2008-03-06 Zoltan Varga <vargaz@gmail.com>
9440 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
9443 * reflection.c (mono_image_register_token): New helper function to save
9444 a token->object mapping.
9446 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
9449 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
9450 one dimension arrays. Fixes #367670.
9451 (mono_reflection_get_type_internal): Ditto.
9453 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9455 * marshal.c: mono_load_remote_field_new() always returns object.
9456 so use the proper signature (fixes bug #366445).
9458 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9460 * class-internals.h (MonoMethod): Remove unused uses_this flag,
9461 add an 'inline_failure' flag instead.
9463 2008-03-04 Mark Probst <mark.probst@gmail.com>
9465 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
9466 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
9467 contains the location of "this", used for exception handling.
9469 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9471 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
9472 their size on all platforms for perf reasons.
9474 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9476 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
9479 * object-internal.h: Same.
9481 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9483 * reflection.h: Fix the build I just broke.
9485 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9487 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
9488 Test if a token is valid, this remove explicit usage of
9489 MonoDynamicImage::tokens from the verifier code.
9491 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
9493 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
9494 instead of direct access to MonoDynamicImage::tokens.
9496 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9498 * verify.c (token_bounds_check): Fix the build I just broke.
9500 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9502 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
9504 * verify.c (verifier_load_method): Fixed the errors message.
9506 * verify.c (mono_method_verify): Fixed a debug message.
9508 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
9510 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
9511 mono-perfcounters.h, class-internals.h: support for predefined
9512 writable counters, query of categories and counters, bugfixes.
9514 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
9516 * verify.c (do_refanytype): Verify the refanytype opcode.
9518 * verify.c (mono_method_verify): Use do_refanytype.
9520 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
9522 * verify.c (do_mkrefany): Verify the mkrefany opcode.
9524 * verify.c (mono_method_verify): Use do_mkrefany.
9526 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
9528 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
9529 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
9532 2008-02-27 Zoltan Varga <vargaz@gmail.com>
9534 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
9535 the type load exception.
9537 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
9539 * verify.c: Added a few FIXME for method signatures
9541 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
9542 of mono_method_get_signature and get vararg call working. Removed unused
9543 checks for return value.
9545 * verify.c (do_refanyval): Verify the refanyval opcode.
9547 * verify.c (mono_method_verify): Implemented verification of arglist and
9550 2008-02-27 Zoltan Varga <vargaz@gmail.com>
9552 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
9553 vtypes to marshal.c.
9555 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
9556 it works for AOT as well.
9558 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
9560 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
9561 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
9562 the system time is adjusted.
9564 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
9566 * icall.c, icall-def.h: use the new time functions (fixes the
9567 non-monotonic behaviour of TickCount).
9569 2008-02-26 Zoltan Varga <vargaz@gmail.com>
9571 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
9572 it breaks the build.
9574 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
9575 cattr is not finished yet.
9577 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
9579 * verify.c: Proper token validation for field, method and type.
9581 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
9583 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
9585 * loader.c (method_from_memberref): Generate type load error instead of method missing
9586 if the type is not found.
9588 2008-02-23 Zoltan Varga <vargaz@gmail.com>
9590 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
9591 some of the conversions caused the generation of a marshal directive exception.
9593 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
9595 verify.c: Report which exception should be thrown by the JIT.
9596 Added a lot of FIXME notes.
9598 2008-02-22 Mark Probst <mark.probst@gmail.com>
9600 * generic-sharing.c: Runtime generic context slots are not
9601 instantiated on init anymore. Instead, provide function to do the
9602 instantiating on demand.
9604 * class-internals.h: Added vtable to runtime generic context.
9605 Macros for encoding direct and indirect slot offsets in one
9608 2008-02-21 Mark Probst <mark.probst@gmail.com>
9610 * object.c, generic-sharing.c: Moved some generic sharing code
9611 from object.c to generic-sharing.c.
9613 * generic-sharing.c: Added support for extensible runtime generic
9616 * metadata-internals.h: Two new hash tables in MonoImage for
9617 extensible runtime generic context support.
9619 * domain.c: Unregister generic vtables upon domain unloading.
9621 * image.c: Destroy new hash tables upon image unloading.
9623 * metadata.c: Unregister generic subclasses upon image unloading.
9625 * class-internals.h: New data structure for runtime generic
9626 context template. New fields in the runtime generic context for
9629 * Makefile.am: Added generic-sharing.c.
9631 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
9633 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
9634 there is a pending loader exception, raise it.
9636 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
9639 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
9644 2008-02-20 Zoltan Varga <vargaz@gmail.com>
9646 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
9648 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
9650 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
9651 ref-only requests for compatibility with MS.
9653 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
9655 * reflection.c (mono_custom_attrs_from_method): Don't silently
9656 return an empty list for generic method instances.
9657 (mono_custom_attrs_from_param): Likewise.
9659 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
9660 Raja R Harinath <harinath@hurrynot.org>
9663 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
9664 * class.c (mono_class_inflate_generic_method_full): Initialize it
9665 when a fully-open method is instantiated.
9666 * metadata.c (inflated_method_equal, inflated_method_hash): Update
9668 * reflection.c (inflate_mono_method): Don't create a temporary context.
9670 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
9672 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
9673 Compute correct value, to prepare for imethod->reflection_info going away.
9675 2008-02-19 Zoltan Varga <vargaz@gmail.com>
9677 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
9679 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
9681 * verify.c: Implement skip visibility flag.
9683 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
9685 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
9686 which contains an extra field to tell the kind of exception that should be thrown.
9688 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
9690 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
9692 * loader.c (mono_method_get_param_names): Initialize 'klass' after
9693 'method' is updated.
9695 2008-02-11 Zoltan Varga <vargaz@gmail.com>
9697 * class.c (mono_class_layout_fields): Set class->min_align for classes using
9698 explicit layout as well. Fixes #360375.
9700 2008-02-11 Geoff Norton <gnorton@novell.com>
9702 * loader.c: Guard and dereference against inflated generic methods
9704 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
9706 * class.c: Include Retargetable spec in assembly name.
9707 * assembly.c: Always include PublicKeyToken spec in assembly name
9708 (with value "null" if assembly is not signed), and include
9710 * icall-def.h: Added icall for Assembly.get_fullname.
9711 * icall.c: Added icall returning the fullname of an assembly.
9713 2008-02-09 Zoltan Varga <vargaz@gmail.com>
9715 * class.c (mono_class_setup_vtable_general): Add a missing call to
9716 mono_class_setup_methods () which is needed in the AOT case.
9718 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
9720 * verify.c (mono_type_get_stack_name): Added. Return the name for the
9721 stack type of the given MonoType.
9723 * verify.c (verify_type_compatibility_full): Handle the void type.
9725 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
9726 way stack merging works.
9728 * verify.c (store_local): Improved verification message.
9730 * verify.c (do_branch_op): If the merging is invalid, the method
9731 is unverifiable and not invalid. Improved error message.
9733 * verify.c (merge_stacks): Properly merge a boxed valuetype and
9734 a reference type diferent than System.Object. Improved error
9737 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
9739 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
9741 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
9742 type of an enum even if the argument is byref.
9744 * verify.c: Replace all explicit uses of enumtype and enum_basetype
9745 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
9747 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
9749 *verify.c (verify_type_compatibility_full): Make enum types
9750 compatible with their base types.
9752 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
9753 types are compatible for the special case of a boxed valuetype and
9756 * verify.c (verify_stack_type_compatibility): The function
9757 is_compatible_boxed_valuetype was extracted from here.
9759 * verify.c (push_arg): Only set ctx->has_this_store if the method
9762 * verify.c (do_ldelem): Fixed a typo in an error message and added
9763 strict check for mixing int32 and native int as the array type
9766 * verify.c (merge_stacks): Consider boxed valuetypes in the
9767 compatibility checks.
9769 2008-02-07 Massimiliano Mantione <massi@ximian.com>
9770 * profiler.h: (MonoGCEvent): Added start-stop the world events.
9772 2008-02-06 Massimiliano Mantione <massi@ximian.com>
9773 *class.c: use_new_interface_vtable_code: renamed the env var to have
9774 a "MONO_" prefix, and fix the logic to enable it by default.
9776 2008-02-06 Massimiliano Mantione <massi@ximian.com>
9778 mono_class_setup_vtable_general: rewrote the way in which interface
9779 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
9780 makes the code more maintainable.
9781 For now the old code is still there, and can be activated setting
9782 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
9784 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
9786 * verify.c: guarded some debug functions around and #ifdef.
9788 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
9790 2008-02-06 Zoltan Varga <vargaz@gmail.com>
9792 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
9793 changes for now since they seem to break too many things.
9795 2008-02-05 Mark Probst <mark.probst@gmail.com>
9797 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
9798 mono_marshal_find_nonzero_bit_offset): Added macro and function
9799 for finding the byte- and bit-offset of a bitfield within a
9802 2008-02-05 Zoltan Varga <vargaz@gmail.com>
9804 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
9805 (mono_marshal_get_struct_to_ptr): Ditto.
9807 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
9810 2008-02-03 Zoltan Varga <vargaz@gmail.com>
9812 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
9813 between methods for non-corlib types.
9815 2008-02-02 Geoff Norton <gnorton@novell.com>
9817 * loader.c (mono_method_get_param_names): Populate the parameter name for
9818 generic parameters as well. (Fixes #342536)
9820 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
9822 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
9824 * verify.c (do_invoke_method): Fix for calling with byref structs.
9826 * verify.c (do_cast): push a boxed value type based on the type token and not
9829 2008-01-31 William Holmes <billholmes54@gmail.com>
9831 * process.c (process_module_string_read): Check the size returned form
9832 VerQueryValue to avoid out of memory exception.
9834 2008-01-30 Zoltan Varga <vargaz@gmail.com>
9836 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9837 Handle properly modules which are not in the moduleref table. Fixes
9840 2008-01-29 Zoltan Varga <vargaz@gmail.com>
9842 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
9843 the dynamic case which is now in managed code.
9844 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
9846 * marshal.c (mono_string_to_bstr): Fix a warning.
9847 (init_com_provider_ms): Ditto.
9849 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
9851 * exception.c (mono_get_exception_out_of_memory): New helper function.
9853 2008-01-28 Jonathan Chambers <joncham@gmail.com>
9855 * marshal.c: Add support for BSTR marshalling
9856 using other COM systems.
9858 Code is contributed under MIT/X11 license.
9860 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9862 * object.c (mono_runtime_invoke_array): reverted previous
9863 commit as it breaks the build.
9865 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9867 * object.c (mono_runtime_invoke_array): Verify arguments for
9868 invalid types. Fixes #348522.
9870 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9872 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
9873 non-final virtual calls using call.
9875 * verify.c (do_invoke): fixed some TODOs.
9877 * verify.c (push_arg): set has_this_store for "ldarga 0".
9879 2008-01-27 Zoltan Varga <vargaz@gmail.com>
9881 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
9882 which belong to an inflated class. Fixes #356531.
9884 2008-01-26 Robert Jordan <robertj@gmx.net>
9886 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
9887 which resort to FindFirstFile when a certain error condition
9888 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
9889 Code is contributed under MIT/X11 license.
9891 2008-01-24 Jonathan Chambers <joncham@gmail.com>
9893 * marshal.c (emit_marshal_string): Fix out string marshalling
9894 to use specified encoding. Fixes #323900.
9896 Code is contributed under MIT/X11 license.
9898 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
9900 * class.c (mono_class_inflate_generic_method_full): Don't modify
9901 iresult->context after cache check.
9903 2008-01-23 Zoltan Varga <vargaz@gmail.com>
9905 * class.c (mono_class_inflate_generic_method_full): Change the
9906 struct assignments to memcpy for better visibility and add some comments.
9908 2008-01-23 Dick Porter <dick@ximian.com>
9910 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
9911 procedure, and make it work on windows.
9913 2008-01-22 Zoltan Varga <vargaz@gmail.com>
9915 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
9916 a MonoReflectionTypeBuilder since it is always of that type.
9918 * reflection.c (mono_type_get_object): Remove an unneccesary check.
9920 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
9922 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
9924 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
9926 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
9928 * reflection.c (mono_reflection_create_runtime_class): Remove already created
9929 instantiations from the type cache.
9931 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9933 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
9935 * verify.c (do_unbox_value): push a controled mutability managed pointer.
9937 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9939 * verify.c (do_ldstr): added, verifies if the #US token is valid.
9941 * verify.c (mono_method_verify): removed old TODO
9943 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9945 * verify.c (do_newobj): add visibility check.
9947 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9949 * verify.c (do_load_function_ptr): add visibility check.
9951 2008-01-21 Massimiliano Mantione <massi@ximian.com>
9953 mono_generic_class_get_class: hook profiler events.
9954 mono_field_get_offset: added to support heap-shot in the new profiler.
9955 *class.h: exported mono_field_get_offset.
9957 mono_reflection_setup_internal_class: hook profiler events.
9959 2008-01-20 Zoltan Varga <vargaz@gmail.com>
9961 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
9962 argument here too and use it to avoid checking for pending exceptions if
9965 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
9967 * assembly.c (build_assembly_name): add arg for passing the assembly
9968 flags. Do not consider a PublicKey with value "null" valid.
9969 (mono_assembly_name_parse_full): added boolean argument that will be
9970 set if the assembly name contains a PublicKeyToken spec. Added support
9971 for the Retargetable spec for which only Yes or No are allowed as valid
9972 value. Consider assembly name invalid if Retargetable spec is set, but
9973 either version, culture or public key (token) are not specified.
9974 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
9975 with implementation in assembly.c.
9976 * icall.c (fill_reflection_assembly_name): also copy assembly flags
9977 from MonoAssemblyName.
9978 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
9979 introduced argument for mono_assembly_name_parse_full to know if the
9980 assembly name has a PublicKeyToken spec, and if it has instruct
9981 fill_reflection_assembly_name to use default value for keyToken (if
9982 PublicKeyToken is null).
9984 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9986 * verify.c (mono_method_verify): fixed ovf ops with
9987 float values. They are unverifiable now.
9989 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9991 * class.c (set_failure_from_loader_error): add BadImageException to the
9992 list of exceptions that can cause a type to fail to load.
9994 * class.c (mono_class_get_exception_for_failure): same.
9996 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
9998 * verify.c (in_any_exception_block): added, check if offset
9999 is part of any exception handling clause.
10001 * verify.c (get_stack_type): added VAR and MVAR types.
10003 * verify.c (do_stobj): better error messages.
10005 * verify.c (do_cpobj): added, check cpobj.
10007 * verify.c (do_initobj): added, check initobj.
10009 * verify.c (do_sizeof): added, check sizeof.
10011 * verify.c (do_localloc): added, check localloc.
10013 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
10015 2008-01-17 Zoltan Varga <vargaz@gmail.com>
10017 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
10018 save_lmf/restore_lmf opcodes.
10020 * threads.c (mono_threads_install_notify_pending_exc): New function to
10021 install a callback notifying the JIT there is a pending exception on a thread.
10022 (mono_thread_request_interruption): Call the new callback.
10023 (mono_thread_get_and_clear_pending_exception): New function to return the
10024 exception pending on a thread.
10026 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
10027 to turn off checking for pending exceptions.
10028 (mono_marshal_get_native_wrapper): Ditto.
10030 2008-01-16 Zoltan Varga <vargaz@gmail.com>
10032 * threads-types.h: Get rid of the unnecessary extern declarations.
10034 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
10036 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
10037 return field from parent class if not private.
10038 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
10039 returns fields from parent class if they are not private.
10040 (method_nonpublic): added function to determine if a given method
10041 should be considered non-public. Returns false for private methods
10042 on parent class, and internal methods from parent on the 1.0 profile.
10043 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
10044 use method_nonpublic function to determine whether method should be
10046 (property_accessor_public): use newly introduced method_nonpublic
10047 function to determine whether accessor is non-public.
10048 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
10049 event from parent class if not private. Only return static event if
10050 Static flag is set, and only return static event from parent class if
10051 FlattenHierarchy flag is set.
10052 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
10053 include non-private events from parent class.
10055 2008-01-16 Zoltan Varga <vargaz@gmail.com>
10057 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
10060 2008-01-16 Wade Berrier <wberrier@novell.com>
10062 * security.c: Add assembly.h header to appease some warnings
10064 2008-01-16 Dick Porter <dick@ximian.com>
10066 * process.c (process_module_string_read): Remove trailing null
10067 when saving string.
10069 2008-01-16 Mark Probst <mark.probst@gmail.com>
10071 * class-internals.h: A new data structure describing the layout of
10072 a runtime generic context (MonoRuntimeGenericContextTemplate).
10074 * metadata-internals.h: Added a hash table to MonoDomain that maps
10075 from open generic classes to their runtime generic context
10078 * object.c: Building of the runtime generic context, including
10079 proper handling of generic type arguments of superclasses.
10080 Building of the runtime generic context according to the template.
10082 2008-01-15 Zoltan Varga <vargaz@gmail.com>
10084 * class.c (mono_class_setup_fields): Set field.count for generic instances.
10087 * image.c (do_mono_image_open): Pass TRUE as last_exists to
10088 mono_portability_find_file (). Fixes #325466.
10089 (mono_image_get_public_key): Fix a warning.
10091 2008-01-14 Zoltan Varga <vargaz@gmail.com>
10093 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
10095 (mono_class_from_name_case): Ditto.
10097 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
10099 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
10100 common storage for the tables used in the System/NumberFormatter class.
10102 2008-01-13 Zoltan Varga <vargaz@gmail.com>
10104 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
10106 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
10108 * verify.c (get_boxable_mono_type): check if the token is valid.
10110 * verify.c (set_stack_value): changed to add an error if an
10111 invalid type is set on stack. Changed all callers due to signature change.
10113 * verify.c (do_stobj): implement stobj validation.
10115 2008-01-11 Zoltan Varga <vargaz@gmail.com>
10117 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
10118 set container->is_method, it was set earlier.
10120 * metadata.c (type_in_image): Handle MVARs which belong to not finished
10123 * reflection.c (mono_reflection_initialize_generic_parameter): Set
10124 is_method of the generic container to TRUE for methods.
10126 2008-01-10 Zoltan Varga <vargaz@gmail.com>
10128 * metadata.c (type_in_image): Handle type parameters properly.
10130 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
10131 memory ownership of this structure.
10133 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
10135 * verify.c (get_boxable_mono_type): make typedref types been just
10136 unverifiable. check for void type.
10138 * verify.c (do_unbox_any): added, verify opcode unbox.any.
10140 * verify.c (do_load_function_ptr): accept method spec tokens.
10142 2008-01-10 Zoltan Varga <vargaz@gmail.com>
10144 * marshal.c (mono_class_native_size): Always set *align even if this is called
10147 2008-01-09 Zoltan Varga <vargaz@gmail.com>
10149 * verify.c (mono_verify_corlib): Remove this as it was not used and was
10152 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
10154 * verify.c: removed some old unused tables. A huge bunch of small fixes
10155 to things found while testing the verifier with mono basic.
10157 * verify.c (dump_stack_value): dump null literal flag to.
10159 * verify.c (verify_type_compatibility_full): fix comparison
10160 for types that have a generic super type.
10162 * verify.c (verify_stack_type_compatibility): fix compatibility
10163 between null literals and reference types. fix compatibility between
10164 boxed valuetypes and object. fix corner case test for enums.
10166 * verify.c (do_cmp_op): proper verification of cgt.un in case
10167 of reference types.
10169 * verify.c (do_invoke_method): fix error message.
10171 * verify.c (do_store_indirect
10173 * verify.c (check_is_valid_type_for_field_ops): proper verification
10174 of managed pointers to valuetypes and boxed valuetypes. proper verification
10177 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
10178 allow token to be a reference type.
10180 * verify.c (do_cast): proper handling of boxes valuetypes.
10182 * verify.c (do_stelem): proper handling of storing a boxed valuetype
10185 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
10186 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
10187 fixed the decoding of unbox_any
10189 2008-01-08 Zoltan Varga <vargaz@gmail.com>
10191 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
10193 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
10195 * verify.c (do_newobj): do delegate verification.
10197 * verify.c (verify_delegate_compatibility): perform delegate
10200 * verify.c (verify_ldftn_delegate): perform tests related to
10203 * verify.c (mono_delegate_signature_equal): perform the
10204 slightly diferent signature comparison required by delegates.
10206 * metadata.c (mono_metadata_type_equal_full): added and exported
10207 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
10208 allows signature only comparison.
10210 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
10213 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
10215 * verify.c: added a bunch of stack_slot_* functions to
10216 make access to stack slot type easier. This is required to
10217 allow optional flags, like null literal, boxed value and
10219 All access paths to IlStackDesc::stype have been changed
10220 to use these new funcions.
10221 Removed a bunch of unused functions and cleared all warnings.
10222 This patch introduces the usage of the this pointer and
10225 2008-01-07 Zoltan Varga <vargaz@gmail.com>
10227 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
10229 2008-01-06 Zoltan Varga <vargaz@gmail.com>
10231 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
10232 match managed version.
10234 * appdomain.c: Bump corlib version.
10236 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
10239 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
10241 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
10242 Set public key token to zero-length byte array if assembly is not
10245 2008-01-05 Zoltan Varga <vargaz@gmail.com>
10247 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
10248 writing a vtype array elem.
10250 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
10252 * assembly.c (build_assembly_name): return FALSE if length of token is
10253 not 16 (if not "null").
10254 (mono_assembly_name_parse_full): return FALSE if value of version,
10255 culture, token or key is 0.
10256 * icall.c (fill_reflection_assembly_name): add boolean arguments to
10257 specify whether public key and public key token must be set to default
10258 value (zero-length byte array) if not available. Set versioncompat to
10259 SameMachine. If public key is available or the default is set, then
10260 set PublicKey flag.
10261 (ves_icall_System_Reflection_Assembly_FillName): if no public key
10262 is available, use empty byte array as default value. On the 2.0
10263 profile, use default value for public key token if not set.
10264 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
10265 profile, use default value for public key if not set. On the 2.0
10266 profile, use default value for public key token if not set.
10267 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
10268 default values for public key and public key token.
10270 2008-01-05 Zoltan Varga <vargaz@gmail.com>
10272 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
10273 field to keep it in synch with the managed object.
10275 * marshal.c (emit_marshal_object): Add support for byref marshalling of
10276 delegates. Fixes #351520.
10278 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
10279 contains defined memory.
10281 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
10283 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
10285 * sgen-gc.c (check_consistency): New helper function to do a consistency check
10286 of the GC data structures.
10288 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
10290 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
10292 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
10294 (mono_array_clone_in_domain): Ditto.
10295 (mono_array_clone_in_domain): Ditto.
10297 * threads.c (start_wrapper): Register the thread start argument as a GC root.
10298 (cache_culture): Use a write barrier.
10300 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
10301 (ves_icall_get_property_info): Ditto.
10303 * object.h (MONO_STRUCT_SETREF): New macro.
10305 * class-internals.h (MonoStats): Add some GC statistics.
10307 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
10309 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
10311 * exception.c (mono_exception_from_name_two_strings):
10312 Break from loop after method is found.
10314 2008-01-04 Dick Porter <dick@ximian.com>
10316 * process.c (process_module_string_read): Rename variable to
10317 reflect correct usage, after fixing bug 345972.
10319 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
10321 * verify.c (mono_type_create_fnptr_from_mono_method):
10322 created a MonoType function pointer instance to be used during
10323 verification. The verifier releases this memory at end.
10325 * verify.c (mono_method_is_constructor): extracted repeated
10326 checks for constructor into a single class.
10328 * verify.c (do_push_field): use new extracted method
10329 for constructor check.
10331 * verify.c (do_newobj): same.
10333 * verify.c (do_ldftn): renamed to do_load_function_ptr
10334 and make it verify ldvirtftn too.
10336 * verify.c (mono_method_verify: proper verification
10337 of ldvirtftn. release created MonoMethod instances.
10339 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
10341 * verify.c (token_bounds_check): added.
10343 * verify.c (do_ldftn): added.
10345 * verify.c (mono_method_verify): proper verificartion of ldftn.
10347 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
10349 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
10350 than the table row count. It's the resposibility of the caller to
10351 make the bounds check and raise the correct error.
10353 * metadata.c (mono_metadata_decode_row_col): Same.
10355 * loader.c (mono_get_method_from_token): perform bounds check
10356 on token for methoddef table.
10358 2007-12-29 Miguel de Icaza <miguel@novell.com>
10361 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
10362 assert into a negative result, the managed code already coped with
10365 Some folks on Windows reported this error.
10367 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
10369 * appdomain.c: Bump corlib version.
10371 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
10372 CultureInfo.CreateCulture to create CultureInfo for name.
10373 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
10374 create CultureInfo for name. Fixes bug #347174.
10376 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
10378 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
10381 * verify.c (is_valid_branch_instruction): allow branching to the
10382 first instruction of the protected block.
10384 * verify.c (is_valid_cmp_branch_instruction): same.
10386 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
10387 avoid double initialization.
10389 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
10390 detect which cases the eval stack should just be copied.
10392 * verify.c (mono_method_verify): check if the eval stack
10393 is empty when entering a protected block.
10395 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
10397 * verify.c: added is_clause_in_range, is_clause_inside_range,
10398 is_clause_nested and verify_clause_relationship. They perform
10399 the verifications stated in P1 12.4.2.7.
10401 * verify.c (mono_method_verify): remove some unused variables,
10402 add the new exception clause checks, add instruction border
10403 checks for protected block start/end, improved some error
10404 messages and fixed a bug in the way invalid instruction access
10407 2007-12-26 Zoltan Varga <vargaz@gmail.com>
10409 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
10410 from GC 7.0 if available.
10412 * object.c: Remove an unused define.
10414 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
10416 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
10418 * null-gc.c (mono_gc_make_descr_for_array): Implement.
10420 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
10422 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
10423 to take the same arguments as the other make_descr functions.
10425 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
10427 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
10430 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
10433 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
10434 call to boehm-gc.c.
10436 * boehm-gc.c (mono_gc_register_root): Fix a warning.
10438 * null-gc.c (mono_gc_register_root): Fix a warning.
10440 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
10442 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
10443 (mono_gc_base_init): Call GC_init ().
10445 * null-gc.c: Define mono_gc_register_root () as a no-op.
10447 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10449 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
10451 * verify.c: add prototype for merge_stacks at top
10453 * verify.c (do_switch): added.
10455 * verify.c (merge_stacks): on some cases the stack merging
10456 was not happening properly. Unequal stack sizes at merge
10457 points should be invalid.
10459 * verify.c (mono_method_verify): added more debug info on stack state.
10460 verify switch properly.
10462 2007-12-24 Zoltan Varga <vargaz@gmail.com>
10464 * method-builder.h: New file, moved the mono_mb_ declarations here from
10467 * boehm-gc.c marshal.c: Include method-builder.h.
10469 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
10471 * marshal.c: Remove some code which is now in method-builder.c.
10473 2007-12-23 Zoltan Varga <vargaz@gmail.com>
10475 * method-builder.c: New file, extraction of the method builder functionality
10478 * marshal.c: Move the mb functions into method-builder.c.
10480 * marshal.h marshal.c: Export some mono_mb_... functions.
10482 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
10484 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
10487 * class.c (mono_class_get_full): Check the token type in the dynamic case.
10489 * loader.c (mono_field_from_token): Ditto.
10491 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
10494 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
10497 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
10498 a helper function for setting it.
10500 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
10503 * assembly.c: Significally simplify code now that referenced assemblies are
10504 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
10506 * threads.h: Don't include the internal threads-types.h header file. Fixes
10509 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
10511 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
10512 instructions that were target of branches or are at protected block boundaries.
10514 * verify.c (in_same_block): handle filter clauses.
10516 * verify.c (is_valid_branch_instruction): added. checks the target of
10517 instructions br or brtrue/false.
10519 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
10520 binary branch instructions such as beq and bge.
10522 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
10523 and made it pin the instruction as been part of the exception block.
10525 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
10528 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
10531 * verify.c (do_ret): ret from a protected block is unverifiable and
10534 * verify.c (do_static_branch): verify br and br.s instructions.
10536 * verify.c (merge_stacks): add extra param to support detection
10537 of branches in the middle of instructions.
10539 * verify.c (mono_method_verify): verify branches and exception blocks
10540 that target the middle of instructions. Proper verification of br and br.s.
10542 2007-12-21 Zoltan Varga <vargaz@gmail.com>
10544 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
10545 skip_visibility field.
10546 (reflection_methodbuilder_from_dynamic_method): Ditto.
10548 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
10549 registrations. Fixes #348193.
10551 * threads.h: Move the internal mono_thread_get_pending_exception () to
10552 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
10554 2007-12-20 Zoltan Varga <vargaz@gmail.com>
10556 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
10557 icall registration. Fixes #348193.
10559 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
10560 for corlib classes into object. Fixes #349621.
10562 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
10564 * icall.c (property_accessor_nonpublic): new function to determine
10565 whether an accessor allows a property to be considered non-public.
10566 Returns false for private accessor(s) from parent class, and internal
10567 accessor(s) from parent on 2.0 profile (and higher).
10568 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
10569 to determine whether property should be included if NonPublic flag
10570 is set. Fixes bug #349078.
10572 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
10574 * verify.c (init_stack_with_value): added.
10576 * verify.c (mono_method_verify): extracted common
10577 code for exception initialization into init_stack_with_value.
10579 * verify.c (mono_method_verify): initialize the exception
10580 for handler clauses as well.
10582 * verify.c (mono_method_verify): fix the exception clause
10583 ordering rules, it should use handler end offset and not
10586 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
10588 * rawbuffer.c: remove useless warning.
10590 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
10592 * threads.h, threads-types.h: move functions to the correct header
10593 (fixes bug#349952).
10595 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10597 * verify.c (mono_method_verify): proper verification
10598 of exception handling clauses ranges and fallthru in
10599 and out of protected blocks.
10601 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10603 * verify.c (mono_method_verify): fixed compilation issue.
10605 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10607 * verify.c (mono_method_verify): a printf slipped in, changed
10608 to use verifier debug macro.
10610 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
10612 * verify.c (is_correct_leave): check for filter clauses.
10614 * verify.c (do_filter): added.
10616 * verify.c (mono_method_verify): property verification of leave.
10619 2007-12-18 Mark Probst <mark.probst@gmail.com>
10621 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
10622 Win32 build, until we figure out how to do the proper thing on
10625 2007-12-17 Zoltan Varga <vargaz@gmail.com>
10627 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
10628 by the previous patch.
10630 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
10631 the assembly resolve handler for refonly assemblies.
10633 2007-12-17 Mark Probst <mark.probst@gmail.com>
10635 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
10636 Make sure only one thread is allowed to commence shutdown, and
10637 don't allow new threads to be started once shutdown is in
10640 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
10642 * verify.c (is_correct_endfilter): added.
10644 * verify.c (is_unverifiable_endfilter): added.
10646 * verify.c (do_endfilter): added.
10648 * verify.c (mono_method_verify): property verification of endfilter
10649 and fixed a corner case or endfinally.
10651 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
10653 * verify.h: new flags to support fail fast of unverifiable code and
10654 do non-strict verification. Non-strict verification is required to
10655 have MS runtime compatibility. There are a huge amount of unverifiable
10656 code that it accepts as verifiable. The strict mode verifies the code
10658 Non-strict mode will be required in cases where code needs to be
10659 accepted as verifiable but fails under strict mode.
10661 * pedump.c: added support to fail fast and non-strict verification.
10663 * verify.c: added support for both fail fast and non-strict verification.
10665 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
10667 * verify.c (is_correct_endfinally): added.
10669 * verify.c (mono_method_verify): property verification of endfinally.
10671 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10673 * verify.c (in_any_block): check for filter clauses.
10675 * verify.c (is_correct_rethrow): added.
10677 * verify.c (mono_method_verify): property verification of rethrow.
10679 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
10681 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10683 * verify.c (do_throw): added.
10685 * verify.c (mono_method_verify): property verification of throw
10687 2007-12-11 Zoltan Varga <vargaz@gmail.com>
10689 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
10690 assemblies. Fixes #346425.
10692 2007-12-10 Zoltan Varga <vargaz@gmail.com>
10694 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
10697 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
10699 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
10700 prevent asserts when this is called with a token which might not be valid.
10702 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
10703 lookup_dynamic_token_class with valid_token == FALSE.
10705 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
10707 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
10709 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
10711 2007-12-10 Mark Probst <mark.probst@gmail.com>
10713 * gc.c: Don't delay threadpool thread finalization unless Mono is
10716 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10718 * threads.c: turn an assert into a non-fatal warning.
10720 2007-12-09 Robert Jordan <robertj@gmx.net>
10722 * icall.c (GetVirtualMethod): Add missing argument validation.
10724 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10726 * verify.c (do_cast): added.
10728 * verify.c (mono_method_verify): property verification of castclass and isinst.
10731 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10733 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
10735 * verify.c (do_stelem): added.
10737 * verify.c (mono_method_verify): property verification of stelem.X.
10739 2007-12-07 Mark Probst <mark.probst@gmail.com>
10741 * class.c, class-internals.h: Introduce an environment variable
10742 (MONO_GENERIC_SHARING) through which the extent of generic code
10743 sharing can be controlled (share all classes, share only corlib
10744 classes, or share nothing).
10746 * object.c: Only create runtime generic context for classes for
10747 which sharing is enabled.
10749 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10751 * verify.c (do_ldelem): refactor it to work with ldelem.any.
10753 * verify.c (mono_method_verify): property verification of ldelem.any.
10755 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10757 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
10758 added ldelem.X opcodes.
10760 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
10762 * verify.c: proper verification of ldelem.X
10764 2007-12-06 Zoltan Varga <vargaz@gmail.com>
10766 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
10768 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
10770 * verify.c (mono_method_verify): null literal requires special handling,
10771 the value pushed on stack need to be flagged as so.
10773 * verify.c (do_ldelema): Verify ldelema properly.
10775 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
10777 * verify.c: Verify ldlen properly.
10779 2007-12-05 Zoltan Varga <vargaz@gmail.com>
10781 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
10782 to the target object's type. Fixes #346160.
10784 2007-12-05 Dick Porter <dick@ximian.com>
10786 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
10787 Solaris needs the same workaround as BSD-derived systems. Fixes
10788 bug 323524, patch by Burkhard Linke
10789 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
10791 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
10793 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
10794 handle to use when error dialog is shown; otherwise, update mask
10795 to show no error dialog when an error occurs.
10797 2007-12-03 Zoltan Varga <vargaz@gmail.com>
10799 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
10801 * class.c (mono_class_get_field_default_value): New helper function to initialize
10802 field->def_type and field->data.
10804 2007-11-30 Zoltan Varga <vargaz@gmail.com>
10806 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
10809 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
10811 * marshal.c: Avoid depending on delegate->method_info being set.
10813 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
10815 * object.c (mono_delegate_ctor): Set delegate->method.
10817 * object-internals.h (struct _MonoDelegate): Add 'method' field.
10819 * appdomain.c: Bump corlib version.
10821 2007-11-27 Raja R Harinath <harinath@gmail.com>
10823 * metadata.c (mono_generic_inst_equal_full): Short-circuit
10824 equality check if we're comparing canonicalized MonoGenericInsts.
10826 2007-11-23 Zoltan Varga <vargaz@gmail.com>
10828 * class.c (generic_array_methods): Call mono_class_setup_methods () before
10829 accessing class->methods.
10831 2007-11-22 Dick Porter <dick@ximian.com>
10833 * threads.c: Ensure that the synch_cs is set before trying to use
10836 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
10838 * profiler.c: r89126 broke the statistial profiler, unbreak.
10840 2007-11-22 Martin Baulig <martin@ximian.com>
10842 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
10845 (mono_debug_debugger_version): Bump to 3.
10846 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
10847 -> mono_debugger_class_initialized().
10849 * mono-debug-debugger.c
10850 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
10853 (mono_debugger_start_class_init_func): Removed.
10854 (mono_debugger_class_loaded_methods_func): Added.
10855 (mono_class_setup_methods): Call it here.
10857 2007-11-22 Martin Baulig <martin@ximian.com>
10860 (mono_debug_add_delegate_trampoline): New public method.
10861 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
10864 (MonoSymbolTable): Added `global_data_table'.
10865 (MonoDebuggerTypeKind): Removed.
10867 2007-11-21 Zoltan Varga <vargaz@gmail.com>
10869 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
10872 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10874 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
10876 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
10878 2007-11-20 Martin Baulig <martin@ximian.com>
10880 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
10882 * mono-debug-debugger.c
10883 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
10884 (mono_debugger_remove_breakpoint): Likewise.
10885 (mono_debugger_check_breakpoints): Likewise.
10886 (mono_debugger_register_class_init_callback): New public method.
10887 (mono_debugger_remove_class_init_callback): Likewise.
10888 (mono_debugger_add_type): Likewise.
10890 * mono-debug-debugger.h
10891 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
10893 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
10895 * class.c: more interface implementations needed for the
10896 array enumerator (fixes bug #341112).
10898 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
10900 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
10901 fix ParamName of ArgumentNullExceptions.
10903 2007-11-17 Miguel de Icaza <miguel@novell.com>
10905 * reflection.c (mono_reflection_encode_sighelper): Generate the
10906 modopts and modreqs. I have a useless test that crashes monodis,
10907 but that shows the code working.
10909 2007-11-17 Zoltan Varga <vargaz@gmail.com>
10911 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
10912 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
10914 2007-11-15 Dick Porter <dick@ximian.com>
10916 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
10917 When joining a thread, it's the thread that's calling Join that
10918 gets WaitSleepJoin state not the target. Fixes the standalone
10919 test case in bug 334740, and hopefully the whole bug too.
10921 2007-11-15 Dick Porter <dick@ximian.com>
10923 * process.c: Read file version info from the files pointed at by
10924 process modules, not the current process. Fixes bug 315969.
10926 Use windows typedef names in some places to fix warnings on the
10929 2007-11-15 Mark Probst <mark.probst@gmail.com>
10931 * image.c, metadata-internals.h: Added a generic_class_cache hash
10932 to MonoImage for looking up generic classes when sharing generics.
10934 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10936 * sgen-gc.c: warning cleanups.
10938 2007-11-15 Zoltan Varga <vargaz@gmail.com>
10940 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
10941 inherited properties.
10943 2007-11-14 Mark Probst <mark.probst@gmail.com>
10945 * object.c, class-internals.h: Added more information to the
10946 runtime generic context.
10948 2007-11-13 Zoltan Varga <vargaz@gmail.com>
10950 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
10951 instead of just the target method. Generalize the abstract method handling to
10952 handle any non-static method.
10954 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10955 mono_marshal_get_delegate_invoke () signature change.
10957 2007-11-13 Mark Probst <mark.probst@gmail.com>
10959 * class.c, class-internals.h: Made
10960 mono_type_get_basic_type_from_generic () public. Fixed member
10961 access check for shared generics.
10963 * loader.c: Don't insert field into field cache if it's part of a
10964 non-inflated generic class.
10966 * domain.c, domain-internals.h: The generic sharing context is now
10967 part of the jit info data structure. Added two accessor
10970 2007-11-12 Zoltan Varga <vargaz@gmail.com>
10972 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
10973 the array Get/Set/Address methods, since the JIT inlines them.
10975 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
10977 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
10978 (mono_image_init): Initialize runtime_invoke_direct_cache.
10980 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10981 mono_marshal_get_delegate_invoke signature change.
10983 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
10984 an additional argument. Add support for invoking abstract methods.
10986 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
10988 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
10990 2007-11-09 Mark Probst <mark.probst@gmail.com>
10992 * class.c: Do field layout for open generic classes as well.
10994 2007-11-09 Mark Probst <mark.probst@gmail.com>
10996 * gc.c, gc-internal.h: Don't finalize threadpool threads with
10997 other objects, because the threadpool is still around. Put them
10998 in a list instead and after finalizing all other objects in the
10999 root domain shut down the thread pool and then finalize the
11000 threads. Fixes bug #337383.
11002 * threads.c, thread-types.h: New mono_thread_create_internal()
11003 function for marking a thread with the threadpool flag before it
11004 started. Set synch_cs to NULL after freeing it.
11006 * threadpool.c: Mark threadpool threads before they start.
11008 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
11010 * reflection.h, reflection.c: don't export random functions
11011 and lazy load dbnull and missing objects.
11013 2007-11-07 Jonathan Chambers <joncham@gmail.com>
11015 * class.c: Initialize COM types if COM interfaces
11016 are present (not just COM classes).
11018 Code is contributed under MIT/X11 license.
11020 2007-11-07 Massimiliano Mantione <massi@ximian.com>
11022 create_dynamic_mono_image: hook module profiler events (dynamic case).
11023 mono_image_basic_init: hook assembly profiler events (dynamic case).
11025 2007-11-07 Massimiliano Mantione <massi@ximian.com>
11027 simple_appdomain_unload: completely terminate the profiler
11028 instead of only processing the statistical samples.
11029 simple_shutdown: make sure this is really called exactly once,
11030 even in multithreaded applications, and always listen to
11032 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
11033 here, the "[un]load" functions will do it.
11034 Fixes bugs #333791 and #325261.
11036 2007-11-07 Geoff Norton <gnorton@novell.com>
11038 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
11039 rather than depend on __APPLE__.
11041 2007-11-07 Mark Probst <mark.probst@gmail.com>
11043 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
11045 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
11047 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
11048 UTF16 MonoString. Fix the crash from bug #335488
11050 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
11052 * marshal.c: Correct (for non-Win32 OS) length != size in
11053 mono_string_from_bstr. Fix #339530.
11055 2007-11-06 Geoff Norton <gnorton@novell.com>
11057 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
11060 2007-11-05 Kornél Pál <kornelpal@gmail.com>
11062 * process.c: Added run-time GetProcessId API detection for Windows.
11064 2007-11-04 Miguel de Icaza <miguel@novell.com>
11066 * reflection.c (mono_param_get_objects): If a parameter has the
11067 attribute [System.Runtime.InteropServices.Optional] we should
11068 set the DefaultValue of the ParameterInfo to be
11069 System.Reflection.Missing instead of DBNull.
11073 (mono_get_reflection_missing_object): New method,
11074 returns the System.Reflection.Missing.Value singleton instance.
11076 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
11078 * culture-info-table.h : regenerated.
11080 2007-11-02 Jonathan Chambers <joncham@gmail.com>
11082 * icall.c: Use GetEnvironmentStrings on windows
11083 so we are using the same environment block as
11084 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
11087 Code is contributed under MIT/X11 license.
11089 2007-10-31 Martin Baulig <martin@ximian.com>
11091 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
11093 * mono-debug-debugger.h
11094 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
11096 2007-10-30 Zoltan Varga <vargaz@gmail.com>
11098 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
11101 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
11103 * culture-info-table.h : regenerated.
11105 2007-10-30 Robert Jordan <robertj@gmx.net>
11107 * icall-def.h, icall.c:
11108 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
11110 Code is contributed under MIT/X11 license.
11112 2007-10-29 Zoltan Varga <vargaz@gmail.com>
11114 * class.c (mono_class_setup_vtable): Find the inflated methods in the
11115 inflated class instead of inflating them again.
11117 * class.c (mono_class_setup_vtable): Inflate the override methods in the
11120 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
11121 Call setup_supertypes () after klass->parent is set.
11122 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
11124 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
11125 for inflated instances of not yet created dynamic generic classes.
11126 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
11127 times from inflated_method.
11128 (methodbuilder_to_mono_method): Ditto.
11130 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
11132 * gc.c: code cleanup and removed old untested option of not creating the
11135 2007-10-29 Zoltan Varga <vargaz@gmail.com>
11137 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
11138 creating a jump trampoline for dynamic methods.
11140 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
11142 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
11143 generic TypeBuilders when called from another method of the same type (bug #335131).
11146 2007-10-27 Zoltan Varga <vargaz@gmail.com>
11148 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
11149 doesn't seem to work perfectly.
11151 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
11152 called multiple times.
11153 (methodbuilder_to_mono_method): Ditto.
11154 (resolve_object): Inflate FieldBuilder's.
11156 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11158 * string-icalls.c, string-icalls.h, appdomain.c: patch from
11159 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
11160 RemoveEmptyEntries in the string.Split implementation (bug #322375).
11162 2007-10-26 Dick Porter <dick@ximian.com>
11164 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
11165 Thread initialisation changes
11167 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
11169 * verify.c: fix compatibility check between arrays and System.Array
11171 2007-10-26 Zoltan Varga <vargaz@gmail.com>
11173 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
11174 too. Fixes #336999.
11176 2007-10-25 Zoltan Varga <vargaz@gmail.com>
11178 * object.c (mono_value_box): Use typed allocation here.
11180 2007-10-23 Zoltan Varga <vargaz@gmail.com>
11182 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
11183 trampoline instead of compiling the method right away.
11185 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
11187 2007-10-21 Zoltan Varga <vargaz@gmail.com>
11189 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
11190 related fields for dynamic classes. Fixes #334493.
11192 2007-10-20 Zoltan Varga <vargaz@gmail.com>
11194 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
11196 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
11198 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
11199 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
11201 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
11203 * reflection.c (create_generic_typespec): Initialize klass->generic_container
11205 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
11207 2007-10-18 Jonathan Chambers <joncham@gmail.com>
11209 * marshal.c: Use correct key when removing item
11212 Code is contributed under MIT/X11 license.
11214 2007-10-17 William Holmes <billholmes54@gmail.com>
11216 *marshal.c: Adding a case to marshal booleans to U1
11218 Code is contributed under MIT/X11 license.
11220 2007-10-18 Zoltan Varga <vargaz@gmail.com>
11222 * class.c (mono_class_from_name): Search the modules compromising dynamic
11223 assemblies. Fixes #331601.
11225 2007-10-16 Zoltan Varga <vargaz@gmail.com>
11227 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
11228 exception if the type name contains an assembly component. Fixes #334203.
11230 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
11231 modules inside dynamic assemblies. Fixes #334200.
11233 * reflection.c: Set image->public_key and image->public_key_length;
11235 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
11238 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
11240 2007-10-16 Mark Probst <mark.probst@gmail.com>
11242 * metadata.c: Implemented correct comparing of generic classes.
11243 An inflated generic class can be equal to a non-inflated one if it
11244 is inflated with generic type variables as type arguments. Fixes
11247 2007-10-15 Dick Porter <dick@ximian.com>
11249 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
11250 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
11253 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
11254 instead of a monitor lock. This means that monitor_try_enter and
11255 co can set the thread state safely.
11256 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
11257 thread_interrupt_requested, so interrupt actually works.
11259 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
11260 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
11261 state accessor function
11263 2007-10-15 Martin Baulig <martin@ximian.com>
11266 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
11267 the debugger with the current runtime.
11269 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11271 * object.c, object-internals.h: added the ability to set a single
11272 trampoline for all the slots in a vtable.
11274 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11276 * marshal.c: deal with a possible race condition during multicast
11277 delegate invocation.
11279 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11281 * class.c: ensure value type methods don't have the synchronized
11284 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11286 * string-icalls.c, string-icalls.h: reverted unapproved patch that
11289 2007-10-11 Joel Reed <joelwreed@comcast.com>
11291 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
11292 to take an options parameter so that empty entries can be removed during
11293 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
11295 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11297 * marshal.c: make sure we don't store the signature from a dynamic
11298 method into the runtime invoke cache (bug #327189).
11300 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11302 * marshal.c: make sure the wrapper methods are properly initialized.
11304 2007-10-11 Mark Probst <mark.probst@gmail.com>
11306 * metadata.c, metadata-internals.h: Generalized
11307 mono_type_stack_size() to mono_type_stack_size_internal() which
11308 takes an additional argument specifying whether it allows open
11311 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
11313 * verify.c (do_invoke_method): handle typedbyref params
11314 correctly and check for unverifiable return values.
11316 * verify.c (do_newobj): fix a warning.
11318 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
11320 * verify.c: don't tread typedbyref as allways unverifable,
11321 so uses, like (ld/st)loc.0 are valid. verify for the cases
11322 that it matters, like boxing related operations.
11324 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
11326 * verify.c: add verification of the newobj opcode. verification
11327 of delegate instantation still missing due ldftn and virldftn not
11328 pushing the function type on stack
11330 2007-10-08 Mark Probst <mark.probst@gmail.com>
11332 * class-internals.h: Runtime generic context data structure
11335 * object.c: Initialization of runtime generic context at runtime
11336 vtable creation time.
11338 2007-10-08 Massimiliano Mantione <massi@ximian.com>
11339 * class.c (mono_class_create_from_typedef,
11340 mono_class_from_generic_parameter, mono_ptr_class_get,
11341 mono_fnptr_class_get, mono_bounded_array_class_get)
11342 * domain.c (mono_domain_create, mono_domain_free)
11343 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
11344 * image.c (do_mono_image_load, mono_image_close):
11345 Hooked up load-unload profiler events.
11347 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11349 * domain.c: track statistics about the actual amount of native code
11352 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11354 * class.c: the valuetype enumerators don't have the additional
11355 supertypes interfaces.
11357 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11359 * class.c: need more interfaces setup for the IEnumerator<T>
11360 object created for arrays (tests/ienumerator-interfaces.2.cs).
11362 2007-10-05 Zoltan Varga <vargaz@gmail.com>
11364 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
11366 2007-10-05 Alp Toker <alp@atoker.com>
11368 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
11369 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
11372 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
11374 * verify.c (verify_type_compatibility_full): verification of
11375 compatibility improved, validates correctly non-strict checks between
11376 native int and I4 types different than (unsigned)int32.
11378 * verify.c (do_store_indirect): added, do all verification of
11381 * verify.c (get_load_indirect_mono_type): renamed to
11382 get_indirect_op_mono_type, as it now returns the MonoType for
11383 ldind.X and stind.X opcodes.
11385 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
11387 * reflection.c: Fix the encoding of generic type definition for
11390 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
11391 mono_image_typedef_or_ref but allows to specify if typespec lookups should
11392 be made. Typespec check is done prior to typeref cache lookup.
11394 * reflection.c (mono_image_typedef_or_ref): now just delegate to
11395 mono_image_typedef_or_ref_full.
11397 * reflection.c (encode_generic_class): encode the generic class
11398 directly instead of calling encode_type.
11400 * reflection.c (encode_type): encode the generic type definition
11401 MonoClass as a generic instantiation.
11403 * reflection.c (create_typespec): cache typespec tokens in
11404 the assembly->typespec cache. Don't create typespec for a generic
11405 instance MonoClass. Create typespec for the generic type defintion.
11407 * reflection.c (create_generic_typespec): encode the generic
11408 class directly instead of calling encode_type.
11410 * reflection.c (mono_image_create_token): encode the generic
11411 type definition not using a typespec for MonoType instances.
11414 2007-10-04 Raja R Harinath <rharinath@novell.com>
11417 * class.c (mono_image_init_name_cache): Don't return nested
11418 'protected internal' classes.
11419 (mono_class_from_name_case): Likewise.
11421 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
11423 * icall-def.h, icall.c : get_bundled_machine_config() is now the
11424 common function used by both DefaultConfig in System.dll and
11425 InternalConfigurationHost in System.Configuration.dll.
11427 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11429 * class.c: automatically add to vectors only a few essential explicit
11430 generic interfaces. The rest of the interfaces that arrays should
11431 provide are currently implicitly added (but still not lazily, see the
11432 design in the discussion of bug#325495 for the details of what is
11433 needed for that). Additionally, implicit interfaces are assigned the
11434 same vtable slot as the explicit interfaces (as they are compatible):
11435 this enables huge memory savings since we don't need to instantiate
11436 as many memthods and as large vtables anymore. Also, Since
11437 GetEnumerator<T> returns an instance of a type that is required to
11438 support a similarly large set of interfaces as arrays, we add
11439 implicit interfaces and interface offset sharing support to those
11440 types, too. This change adds all the required interfaces so that
11441 the anonarray.cs test case in the bug report works (we don't add
11442 all the interfaces to arrays of arrays 3-level deep and more because
11443 of the memory requirements explained in the bug and since they are much
11444 less common: the lazy-loading support will enabled them to work, too).
11446 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
11448 * verify.c (merge_stacks): major clean up, all type compatibility
11449 checks are done by verify_type_compatibility. This fix my earlier lack
11450 of understanding of the CLR type system and merge_stacks no longer looks
11453 * verify.c: fixed some bad spelling.
11455 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
11457 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
11458 a given stack slock.
11460 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
11461 verify_type_compatibility_full. This removed a near indentical function and fixed
11462 handling of Int32 and IntPtr across all opcodes.
11464 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11466 * class.c: only vectors have the additional generic interfaces.
11468 2007-10-01 Jonathan Chambers <joncham@gmail.com>
11470 * mono-config.c: Use g_strcasecmp instead of
11471 strcasecmp like everywhere else to fix
11472 compilation with MSVC.
11474 Code is contributed under MIT/X11 license.
11476 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11478 * object.c, object-internals.h: refactored the IMT code to enable
11479 building a single slot at a time and lazily creating the IMT trampolines
11482 2007-09-29 Zoltan Varga <vargaz@gmail.com>
11484 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
11486 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
11489 2007-09-29 Raja R Harinath <harinath@gmail.com>
11491 * loader.c (method_from_methodspec): Rearrange to avoid
11492 un-necessary exposition. Don't assert out if the method's
11493 declaring type is a generic type definition.
11495 2007-09-28 Martin Baulig <martin@ximian.com>
11497 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
11499 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11501 * class-internals.h: optimize field layout of MonoClass to
11502 requires less cachelines at runtime and save a few bytes on 64 bit
11505 2007-09-28 Jb Evain <jbevain@novell.com>
11507 * reflection.c: when encoding type names in custom attributes,
11508 if the type is a closed generic type, its generic arguments
11509 have to be serialized as AssemblyQualifiedName, so that when
11510 they are deserialized, it's possible to re-create them properly.
11514 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11516 * object.c, class-internals.h: added delegate-creation counter.
11518 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11520 * class.c: cleanup of the code that synthetizes interfaces for
11521 arrays in 2.0: saves quit a bit of corlib mempool memory.
11522 Code to fix bug #325495 ifdeffed out for now until the issues
11523 with memory usage and O(n^2) behaviour are fixed.
11525 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11527 * marshal.c: when possible, do not duplicate the name of the methods
11528 in the method builder and in the generated MonoMethod.
11530 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
11531 * verify.c: added support for type checking ldind_* opcodes.
11533 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
11535 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
11536 which is used to distinguish the fully open instantiation of a TypeBuilder
11537 with the rest. This temporary hack is required to restore the property that
11538 the fully open instantiation is the same type of the generic type definition.
11540 * class-internals.h (mono_generic_class_is_generic_type_definition):
11541 new function as part of the internal API.
11543 * class.c (inflate_generic_type): return NULL when the generic inst is
11544 fully open. The fully open generic type is now the same as the generic type
11545 definition for non TypeBuilder types.
11547 * class.c (mono_generic_class_get_class): removed assert since it is
11548 no longer valid, gklass->cached_class can point to the generic type definition.
11550 * class.c (mono_generic_class_is_generic_type_definition): new.
11552 * metadata.c (mono_generic_class_hash): added is_tb_open field
11553 to the hash calculation.
11555 * metadata.c (free_generic_class): if the generic class is associated
11556 with the generic type definition, its field will come from the mempool and
11559 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
11560 new, this function identifies the corner case of a TypeBuilder fully open
11563 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
11564 for lookup. Set gclass->cached_class to be the container class in case of
11565 the fully open instantiation of non TypeBuilder types.
11567 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
11568 to compare generic classes.
11570 * reflection.c (method_encode_methodspec): remove assert that
11571 no longer is valid.
11573 * reflection.c (mono_reflection_generic_class_initialize): add
11574 an aditional assert to ensure the proper type is used.
11576 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
11578 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
11581 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
11583 * verify.c (push_arg): Fixed support for ldarga
11584 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
11585 MonoType used as first arg in case of instance calls.
11587 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
11589 * verify.c: Support for verifying VAR and MVAR types,
11591 2007-09-25 Zoltan Varga <vargaz@gmail.com>
11593 * icall.c (ves_icall_get_property_info): Set the reflected type of the
11594 accessors correctly.
11596 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11598 * threads.c: support OSX and other systems in
11599 mono_thread_get_stack_bounds (bug #328026).
11601 2007-09-25 Martin Baulig <martin@ximian.com>
11604 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
11606 2007-09-24 Martin Baulig <martin@ximian.com>
11609 (MonoDebugClassEntry): Moved the definition of this struct into
11610 mono-debug.c to make it private.
11613 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
11614 type table per symbol file, we don't need to store the symfile id
11617 2007-09-24 Martin Baulig <martin@ximian.com>
11619 Create one type table per symbol file, since a `MonoClass *' gets
11620 invalid when its image is unloaded.
11622 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
11623 (MonoDebugHandle): Added `type_table'.
11625 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11627 * mempool.c, mempool.h: added mono_mempool_new_size () API
11628 to be able to specify a smaller initial size for the pool.
11629 Adjusted the code to slowly increase pool size before using
11630 the previous default size.
11631 * image.c: use a small initial size for image mempools.
11633 2007-09-23 Zoltan Varga <vargaz@gmail.com>
11635 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
11638 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
11639 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
11641 2007-09-22 Zoltan Varga <vargaz@gmail.com>
11643 * metadata.c (mono_type_create_from_typespec): Remove an invalid
11644 free. Fixes #327438.
11646 2007-09-21 Raja R Harinath <harinath@gmail.com>
11648 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
11649 generic instantiations, etc.
11650 <MONO_TYPE_ARRAY>: Likewise.
11652 2007-09-21 Martin Baulig <martin@ximian.com>
11654 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
11655 these structs were never defined.
11656 (MonoDebugHandle): Removed the `_priv' field, it was never used.
11658 2007-09-21 Martin Baulig <martin@ximian.com>
11660 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
11662 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
11664 * image.c: removed the guid hash tables: we can get the same info
11665 without the additional memory usage hit (partially fixes also bug #327052).
11667 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11669 * profiler.h, profiler-private.h, profiler.c: add a new profiler
11670 event to handle unloading methods. After the event is called, the
11671 corresponding MonoMethod* must be considered invalid.
11672 * loader.c (mono_free_method): call the new mono_profiler_method_free
11675 2007-09-20 Mark Probst <mark.probst@gmail.com>
11677 * domain-internals.h: New flag in MonoJitInfo which marks shared
11678 generic methods. New hash table (shared_generics_hash) in
11679 MonoDomain to keep track of shared generic methods. Prototypes
11680 for functions to register and lookup shared generic methods.
11682 * domain.c: Support for registering and looking up shared generic
11683 methods via a hash table (shared_generics_hash) in MonoDomain.
11685 * class-internals.h: New exception to signal failure of shared
11686 compilation of a generic method. New counters for generics
11687 sharing in MonoStats.
11689 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11691 * image.c, metadata-internals.h: don't keep a file descriptor open
11692 for loaded assemblies (bug#325988).
11694 2007-09-19 Raja R Harinath <rharinath@novell.com>
11696 * metadata.c (signature_in_image): New. Carve out of type_in_image.
11697 (ginst_in_image, gclass_in_image): Simplify. Change signature to
11698 use the corresponding datatypes.
11699 (type_in_image): Update to changes.
11700 (CleanForImageUserData): Simplify.
11701 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
11702 Avoid quadratic behaviour in handling the "stolen" list by
11703 separating the filter predicate out, and by prepending the stolen
11704 items rather than appending them.
11705 (steal_ginst_in_image): Likewise.
11706 (mono_metadata_clean_for_image): Update to changes.
11708 2007-09-19 Martin Baulig <martin@ximian.com>
11710 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
11712 2007-09-19 Martin Baulig <martin@ximian.com>
11714 * mono-debug.c (mono_debug_cleanup): Don't call
11715 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
11717 2007-09-19 Raja R Harinath <harinath@gmail.com>
11719 Fix crash on 'make run-test' in mcs/errors
11720 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
11721 Avoid more potential allocations in mono_class_from_mono_type.
11722 (ginst_in_image): Update to changes.
11723 (gclass_in_image): Rearrange slightly.
11725 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11727 * class.c (mono_class_init): Move the code that sets up class->methods to
11728 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
11730 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
11731 canonical instance of an inflated generic signature.
11732 (mono_type_create_from_typespec): Remove an invalid free.
11734 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
11736 2007-09-18 Marek Habersack <mhabersack@novell.com>
11738 * domain-internals.h: added a declaration of the
11739 mono_assembly_load_full_nosearch internal function.
11741 * assembly.c (mono_assembly_load_with_partial_name): use
11742 mono_try_assembly_resolve return value properly.
11743 (mono_assembly_load_full_nosearch): copied the function body from
11744 mono_assembly_load_full, without the code to invoke assembly
11746 (mono_assembly_load_full): calls the above new function and if the
11747 assembly is not resolved, invokes the search hooks.
11749 * appdomain.c (mono_runtime_init): restore the global postload
11750 assembly search handlers.
11752 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11754 * class.c (mono_class_init): Make sure class->methods and class->properties
11755 are never NULL in the generics case.
11757 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
11759 2007-09-17 Zoltan Varga <vargaz@gmail.com>
11761 * metadata.c (free_generic_class): Disable some code to fix the build.
11763 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
11765 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
11766 from the image mempool.
11768 * metadata.c (free_generic_class): Free more data from the inflated class.
11770 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
11772 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
11774 (mono_type_create_from_typespec): Ditto.
11776 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
11777 MonoImage to the caller.
11778 (mono_init_internal): Save the opened image in a global variable.
11779 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
11781 * reflection.c (resolve_object): Fix a leak.
11783 * metadata.c: Fix the freeing of data in the generics caches.
11785 * metadata.c (free_generic_inst): Comment this out to fix the build.
11786 (free_generic_class): Ditto.
11788 * metadata.c: Free cached generic methods, instantinations and classes when
11789 they are removed from the caches.
11790 (mono_metadata_free_type): Free the type itself.
11792 * class.c: Free the result of mono_class_inflate_generic_type () in a few
11795 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11797 * boehm-gc.c: restrict managed allocs to __thread supporting
11800 2007-09-16 Zoltan Varga <vargaz@gmail.com>
11802 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
11803 (mono_generic_class_get_class): Fix a leak.
11805 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
11806 mono_metadata_free_type ().
11807 (mono_metadata_inflate_generic_inst): Fix a leak.
11809 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11811 * mono-debug.c (free_header_data): Fix a leak missed earlier.
11813 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
11816 * mono-debug.c (mono_debug_close_image): Fix call to
11817 g_hash_table_remove ().
11819 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11821 * icall-def.h: redirect all the string ctor to the managed
11822 CreateString () methods.
11823 * string-icalls.c, string-icalls.h: removed dead code for string
11826 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11828 * mono-debug.c: Fix memory leaks.
11830 2007-09-14 Jonathan Chambers <joncham@gmail.com>
11832 * threads-types.h: Implement mono_hazard_pointer_set and
11833 mono_hazard_pointer_clear macros using do/while(0) to fix
11834 compilation with MSVC.
11836 Code is contributed under MIT/X11 license.
11838 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11840 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
11841 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
11843 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11845 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
11848 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11850 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
11851 managed-code allocated as well.
11853 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11855 * class.c (mono_class_is_assignable_from): Add support for generic variance.
11857 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
11859 * boehm-gc.c: fixed the build after the AOT changes.
11861 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11863 * wrapper-types.h: Add an ALLOC wrapper type.
11865 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
11866 reference managed allocator methods.
11868 2007-09-12 Marek Safar <marek.safar@gmail.com>
11870 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
11871 of Type array and not MonoType, a fix suggested by Hari.
11873 2007-09-12 Jonathan Chambers <joncham@gmail.com>
11875 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
11876 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
11878 Code is contributed under MIT/X11 license.
11880 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11882 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
11884 2007-09-12 Marek Habersack <mhabersack@novell.com>
11886 * image.c (do_mono_image_open): if assembly file fails to open and
11887 MONO_IOMAP is in effect, try to find the path in a
11888 case-insensitive way.
11890 * appdomain.c (mono_runtime_init): do not install postload hooks -
11891 tests show that MS.NET doesn't use anything of that sort to
11892 trigger the AppDomain.AssemblyResolve event.
11893 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
11895 (mono_runtime_init): init portability helpers here.
11897 * assembly.c (mono_assembly_load_with_partial_name): if other
11898 attempts fail, trigger the AppDomain.AssemblyResolve event handler
11899 to resolve the assembly.
11901 * domain-internals.h: added mono_try_assembly_resolve and marked
11904 2007-09-11 Jb Evain <jbevain@novell.com>
11906 * object-internals.h (MonoReflectionDynamicMethod): add
11907 a `MonoReflectionType *owner` field. The owner is used
11909 (mono_reflection_create_dynamic_method): use the owner of the dynamic
11910 method as the class declaring the dynamic method.
11911 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
11912 dynamic method to the declaring type of the methodbuilder.
11914 2007-09-11 Mark Probst <mark.probst@gmail.com>
11916 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
11917 rules for calling methods via reflection.
11919 2007-09-11 Zoltan Varga <vargaz@gmail.com>
11921 * reflection.c (resolve_object): Add support for MonoGenericClass.
11922 Inflate MonoType's.
11924 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11926 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
11927 provide a managed method that does fast allocations without needing
11928 a managed->unmanaged transition. Boehm GC implementation currently
11929 enabled for ptrfree objects on sane architectures.
11931 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11933 * marshal.c, marshal.h: exported a couple of useful functions and
11934 added mono_mb_get_label () to easily handle backward branches.
11936 2007-09-10 Zoltan Varga <vargaz@gmail.com>
11938 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
11940 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11942 * loader.c (find_method): Fixed the regression introduced while
11945 2007-09-09 Zoltan Varga <vargaz@gmail.com>
11947 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
11950 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
11951 icall.c reflection.c: Pass a MonoGenericContext argument to
11952 mono_lookup_dynamic_token ().
11954 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
11957 2007-09-09 Robert Jordan <robertj@gmx.net>
11959 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
11960 for generic methods.
11962 * object.c (mono_object_get_virtual_method): Handle generic methods.
11965 Code is contributed under MIT/X11 license.
11967 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11969 * image.c: fix locking in mono_image_load_file_for_image ().
11971 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
11973 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
11974 used only as a cache: added an icall to fill it.
11976 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
11978 * reflection.h: exposed mono_reflection_free_type_info
11979 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
11980 since mono_reflection_bind_generic_parameters makes a copy of it.
11981 * reflection.c (free_type_info): subinfos should be freed.
11982 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
11984 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
11985 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
11986 this fixes #82695 and #81726.
11989 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
11991 * process.h, process.c: added support for user profile/info in
11992 ProcessStartInfo. For now only Windows works.
11994 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11996 * metadata.c: consider the generic arguments when comparing
11997 signatures (bug #82614).
11999 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12001 * cil-coff.h, image.c: updated assembly loader to cope with the
12002 PE32+ 64 bit file format.
12004 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12006 * assembly.c, class.c, domain.c, loader.c: remove useless
12007 inclusion of cil-coff.h.
12009 2007-08-29 Jonathan Chambers <joncham@gmail.com>
12011 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
12012 if interface is marked with CoClassAttribute.
12014 Code is contributed under MIT/X11 license.
12016 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12018 * sgen-gc.c: ensure no object from the to space is copied again or finalized
12019 if it's seen twice in major collections.
12021 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12023 * sgen-gc.c: big objects are not copied to the gray area, but they
12024 need to be considered for scanning, too, if they are brought alive
12025 by an object ready for finalizations or a survived one.
12027 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
12029 * sgen-gc.c: properly account the number of disappearing links when
12030 they are nullified.
12032 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
12034 * sgen-gc.c: share the code to scan the registered roots between the
12035 different types of collections.
12037 2007-08-28 Zoltan Varga <vargaz@gmail.com>
12039 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
12041 2007-08-28 Zoltan Varga <vargaz@gmail.com>
12043 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
12044 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
12046 2007-08-28 Mark Probst <mark.probst@gmail.com>
12048 * security-manager.c (mono_security_manager_get_methods):
12049 LinkDemandSecurityException now has 2 arguments instead of 3.
12051 2007-08-27 Zoltan Varga <vargaz@gmail.com>
12053 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
12054 platforms which need it.
12056 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12058 * sgen-gc.c: unregister thread data structures with a pthread_key_t
12061 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
12063 * threads.c: free the thread static data on thread exit.
12065 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
12067 * class.c: walk the hierarchy to find the generic definition for
12068 a class (fixes runtime part of bug #82498).
12070 2007-08-24 Zoltan Varga <vargaz@gmail.com>
12072 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
12075 * image.c (mono_image_close): Here. Hopefully fixes #82510.
12077 2007-08-24 Mark Probst <mark.probst@gmail.com>
12079 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
12081 2007-08-24 Robert Jordan <robertj@gmx.net>
12083 * appdomain.c: don't perform the ':'->';' substitution on Win32.
12085 2007-08-24 Jb Evain <jbevain@novell.com>
12087 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
12090 2007-08-24 Mark Probst <mark.probst@gmail.com>
12092 * threads.c: Make sure a thread gets cleaned up only once. Fixes
12095 2007-08-24 Zoltan Varga <vargaz@gmail.com>
12097 * assembly.c: Fix a warning.
12099 2007-08-23 Marek Habersack <mhabersack@novell.com>
12101 * appdomain.c: parse the <runtime> section looking for the probing
12102 element with the 'privatePath' attribute, which sets additional
12103 directories in which the runtime should look for assemblies.
12105 2007-08-23 Robert Jordan <robertj@gmx.net>
12107 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
12110 2007-08-23 Martin Baulig <martin@ximian.com>
12112 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
12113 _mono_debug_init_corlib() and remove it from the header file.
12115 2007-08-23 Martin Baulig <martin@ximian.com>
12117 * mono-debug-debugger.c
12118 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
12119 don't notify the debugger about it.
12121 * mono-debug-debugger.h
12122 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
12124 2007-08-23 Robert Jordan <robertj@gmx.net>
12126 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
12127 Code is contributed under MIT/X11 license.
12129 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12131 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
12133 2007-08-22 Martin Baulig <martin@ximian.com>
12135 * mono-debug.c: Store debugging info on a per-domain basis and
12136 free it on domain unload. Add support for unloading symbol files.
12139 (MonoDebugList): New typedef.
12141 - add `data_tables and `type_table'.
12142 - replace 'symbol_files' and `num_symbol_files' with a
12144 (mono_debug_data_table): Removed.
12145 (mono_debug_list_add): New public function.
12146 (mono_debug_list_remove): New public function.
12147 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
12148 (mono_debug_init_2_memory): Renamed into
12149 mono_debug_open_image_from_memory().
12150 (mono_debug_close_image): New public function.
12151 (mono_debug_domain_create): Likewise.
12152 (mono_debug_domain_unload): Likewise.
12153 (MONO_DEBUGGER_VERSION): Bump to 60.
12155 * mono-debug-debugger.h
12156 (MonoDebuggerEvent):
12157 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
12158 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
12159 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
12160 - rename `THREAD_CREATED' and `THREAD_EXITED' into
12161 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
12162 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
12164 (mono_debugger_add_symbol_file): Removed.
12165 (mono_debugger_add_type): Removed.
12166 (mono_debugger_lookup_type): Removed.
12167 (mono_debugger_lookup_assembly): Removed.
12170 (mono_domain_create): Call mono_debug_domain_create().
12171 (mono_init_internal): Call mono_debug_init_corlib().
12174 (mono_assembly_close): Call mono_debug_close_image().
12176 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
12178 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
12181 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
12183 * sgen-gc.c: ensure section->pin_queue_end is initialized
12184 correctly when non pinning objects in the section have been found.
12186 2007-08-22 Marek Habersack <mhabersack@novell.com>
12188 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
12189 containing a list of directories separated by ':'. MSDN docs say
12190 the directories should be separated with ';'. Part of a bugfix for
12193 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
12195 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
12196 it should MonoType and not MonoClass.
12198 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
12200 * culture-info-table.h : regenerated.
12202 2007-08-20 William Holmes <billholmes54@gmail.com>
12204 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
12205 to call ReplaceFile Kernel32 on windows or in io-layer.
12206 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
12207 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
12208 as an internal call.
12210 Code is contributed under MIT/X11 license.
12212 2007-08-20 Jb Evain <jbevain@novell.com>
12214 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
12215 and MONO_EXCEPTION_FIELD_ACCESS.
12217 * debug-helpers.[c|h]: new mono_field_full_name function.
12219 2007-08-20 Mark Probst <mark.probst@gmail.com>
12221 * class.c: Removed class_security_level() and moved it to
12222 security-core-clr.c.
12224 * security-core-clr.c, security-core-clr.h: class_security_level()
12225 is now public and renamed to mono_security_core_clr_class_level().
12226 It also looks for security attributes in the classes a class is
12229 2007-08-20 Mark Probst <mark.probst@gmail.com>
12231 * security-core-clr.c, security-core-clr.h: CoreCLR security
12234 * Makefile.am: Added security-core-clr.[ch].
12236 * security-manager.c, security-manager.h: Functions and enum for
12237 setting and getting the security mode.
12239 * class.c: CoreCLR security checks.
12241 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
12243 * icall-def.h, process.c, process.h: implemented icall to get
12244 user/system processor times.
12246 2007-08-17 Mark Probst <mark.probst@gmail.com>
12248 * domain.c, threads.c, class-internals.h, domain-internals.h: New
12249 reader-lock-free jit_info_table.
12251 2007-08-17 Zoltan Varga <vargaz@gmail.com>
12253 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
12255 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
12257 * object-internals.h (MonoException): Add missing _data member.
12259 2007-08-08 Massimiliano Mantione <massi@ximian.com>
12261 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
12262 checking that only methods with matching qname or fqname are picked
12263 from implemented interfaces.
12265 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
12267 * verify.c (do_newarr):added, do type verification of
12268 newarr ops, push the right value on the eval stack.
12269 * verify.c (mono_method_verify): use do_newarr
12272 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
12274 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
12275 factored the common code into get_boxable_mono_type, which
12276 is now using mono_type_get_full, this fixed byref related tests.
12278 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
12280 * class.c: added mono_type_get_full, this function has the same
12281 behavior of mono_class_get_full but the returned MonoType has
12282 all metadata of the associated token in case of a typespec token.
12283 * class.c: added mono_type_retrieve_from_typespec, used by
12284 mono_type_get_full to retrieve the token type.
12285 * class.c (mono_class_create_from_typespec): changed to use
12286 mono_type_retrieve_from_typespec.
12287 * class.c (mono_ldtoken): changed to use mono_type_get_full
12288 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
12289 * class-internals.h: exported mono_type_get_full for internal use.
12291 2007-08-16 Jb Evain <jbevain@novell.com>
12293 * domain.c (supported_runtimes): add entry for
12294 the 'moonlight' runtime version.
12296 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12298 * verify.c (mono_method_verify): small typo sliped in.
12300 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12302 * verify.c (do_unbox_value): added, do type verification of
12304 * verify.c (mono_method_verify): use do_unbox_value
12307 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12309 * verify.c (dump_stack_value): fixed typo, was printing string
12310 instead of object on stack.
12311 * verify.c (do_box_value): moved the byref check up as it leads
12312 to invalid code and should be done earlier.
12313 * verify.c: improved error messages for and ldobj
12315 2007-08-15 William Holmes <billholmes54@gmail.com>
12317 * marshal.c (emit_marshal_custom): Omit the call to
12318 marshal_native_to_managed when calling native to managed
12319 and the argument is specified as an out argument.
12321 Code is contributed under MIT/X11 license.
12323 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12325 * verify.c: fixed the type checks for generics, function pointers and vectors.
12326 Added type verification for ldobj and ldtoken. The verifier
12327 would segfault if header or signature of a method contained references
12328 to non-existant types.
12330 2007-08-15 Jonathan Chambers <joncham@gmail.com>
12332 * marshal.c (cominterop_get_ccw): Patch from
12333 Bill Holmes to no walk up interface hierarchy.
12334 All parent methods should be present in the interface for COM.
12336 Code is contributed under MIT/X11 license.
12338 2007-08-15 Jonathan Chambers <joncham@gmail.com>
12340 * marshal.c (emit_marshal_com_interface): Patch from
12341 Bill Holmes to handle COM Interfaces as return values
12342 for native->managed calls.
12344 Code is contributed under MIT/X11 license.
12346 2007-08-14 Jonathan Chambers <joncham@gmail.com>
12348 * marshal.c (cominterop_get_idispatch_for_object): Implement
12349 for runtime callable wrappers.
12351 Code is contributed under MIT/X11 license.
12353 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
12355 * pedump.c (main): changed from mono_init to mono_init_from_assembly
12356 so 2.0 types are accessible
12359 2007-08-13 Miguel de Icaza <miguel@novell.com>
12361 * domain.c (mono_init_internal): Call mono_assembly_load_friends
12362 once we load mscorlib. Due to the order in which we initialize,
12363 the mono_assembly_load_full routine that loads mscorlib did not
12364 load friends. We now load it once we load the
12365 mono_defaults.internals_visible_class class.
12367 * assembly.c: Expose the mono_load_friend_assemblies method.
12369 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
12371 * verify.c: improved the handling of boxing, better
12372 type checking for unary ops and conversion. Fix bug
12373 regarding managed pointer compatibility checking
12375 2007-08-11 Zoltan Varga <vargaz@gmail.com>
12377 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
12379 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
12381 2007-08-09 Raja R Harinath <rharinath@novell.com>
12383 * reflection.c (dup_type): Remove.
12384 * class.c (dup_type): Remove.
12385 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
12386 instead of the dodgy 'dup_type'.
12387 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
12388 handle the case where 'dup_type' needed the second argument.
12390 2007-08-08 Zoltan Varga <vargaz@gmail.com>
12392 * domain.c: Fix a warning.
12394 2007-08-08 Massimiliano Mantione <massi@ximian.com>
12396 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
12397 checking that methods with the same fqname are not overridden
12398 with a method from an ancestor.
12400 2007-08-07 Zoltan Varga <vargaz@gmail.com>
12402 * threads.c (free_thread_static_data_helper): Avoid a crash if
12403 thread->static_data is not yet set.
12405 2007-08-07 Jonathan Chambers <joncham@gmail.com>
12407 * marshal.c: Use correct image when emitting
12408 native wrapper for COM calls.
12410 Code is contributed under MIT/X11 license.
12412 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
12414 * icall-def.h, security.c, security.h :
12415 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
12417 2007-08-07 Martin Baulig <martin@ximian.com>
12419 * mono-debug-debugger.h
12420 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
12422 * domain.c (mono_domain_free): Call
12423 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
12425 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
12427 * verify.c (check_underflow, check_overflow): error message now returns IL offset
12428 * verify.c (in_same_block): code should test if either offset is inside the clauses
12429 * verify.c (mono_method_verify): push the exception into the eval stack of exception
12432 2007-08-03 Zoltan Varga <vargaz@gmail.com>
12434 * image.c (mono_image_close): Fix a leak.
12436 * object.c (mono_runtime_invoke_array): Avoid using alloca.
12438 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
12440 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12442 * domain.c, threads.c, threads-types.h: fix memory retention issue
12443 with thread static variables not being cleared on domain unload.
12444 Reuse thread static slots after domain unload.
12446 2007-08-03 Zoltan Varga <vargaz@gmail.com>
12448 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
12451 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
12452 now done in mono_runtime_invoke_array.
12454 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
12455 receiver is a nullable type.
12457 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
12460 2007-08-03 Jonathan Chambers <joncham@gmail.com>
12462 * marshal.c: Implement COM Objects as return type for
12463 managed->unmanaged calls. Added Release calls for COM Object
12464 out/return values in managed->unmanaged calls.
12466 Code is contributed under MIT/X11 license.
12468 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
12470 * threads.h, threads-type.h: move the hazard pointer declarations
12471 to the private header.
12473 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12475 * file-io.c, appdomain.c: memory leak fixes.
12477 2007-08-02 Dick Porter <dick@ximian.com>
12480 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
12481 SO_REUSEADDR setting into io-layer/sockets.c.
12483 2007-08-01 Zoltan Varga <vargaz@gmail.com>
12485 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
12486 from Object when called on a generic parameter. Fixes #82211.
12488 2007-08-01 Dick Porter <dick@ximian.com>
12490 * file-io.c (convert_share): Test FileShare values bit-by-bit.
12491 Fixes bug 79250 yet again.
12493 2007-07-30 Martin Baulig <martin@ximian.com>
12495 Merged the `debugger-dublin' branch.
12498 (MonoDebugDataTable): New typedef.
12499 (MonoDebugMethodAddressList): New typedef.
12500 (MonoDebugWrapperData): Removed.
12501 (MonoDebugSymbolTable): Removed `current_data_table',
12502 `current_data_table_size', `current_data_table_offset'.
12503 (MonoDebugDataItemType): Moved into mono-debug.c.
12504 (MonoDebugMethodJitInfo): Remove `address'.
12505 (mono_debug_data_table): New global variable.
12506 (mono_debug_lookup_method_addresses): New public function.
12507 (mono_debug_find_method): Take a `MonoMethod *', not a
12508 `MonoDebugMethodInfo *'.
12510 * mono-debug.c: Drop support for the old symbol tables.
12512 2007-06-28 Martin Baulig <martin@ximian.com>
12514 * mono-debug.c (mono_debug_debugger_version): New public variable.
12516 2007-07-31 William Holmes <billholmes54@gmail.com>
12518 * metadata.c Changed mono_type_create_from_typespec to not insert
12519 the type into the hash map until after
12520 do_mono_metadata_parse_type has completed.
12522 Code is contributed under MIT/X11 license.
12524 2007-07-31 Zoltan Varga <vargaz@gmail.com>
12526 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
12527 generic parameter. Fixes #82211.
12529 2007-07-27 Jb Evain <jbevain@novell.com>
12531 * pedump.c (dump_metadata, dump_metadata_header): dump
12532 versions contained in the metadata header.
12534 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
12536 * threads.c: register small_id_table with the GC.
12538 2007-07-27 Mark Probst <mark.probst@gmail.com>
12540 * threads.c, threads.h, class-internals.h, object-internals.h:
12541 Hazard pointers, to be used by lock-free parallel algorithms.
12543 2007-07-26 Dick Porter <dick@ximian.com>
12545 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
12546 routine on non-windows platforms, as I've not managed to think of
12547 a non-kludgy way of doing this. Finishes off bug 78739.
12549 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
12551 * object.c: properly setup interface_bitmap in proxy vtables.
12553 2007-07-25 Marek Habersack <mhabersack@novell.com>
12555 * appdomain.c (get_shadow_assembly_location): do not use TickCount
12556 to create unique shadow copy target directories, use the domain's
12557 serial number instead. Each domain gets a unique target directory
12560 * domain.c (mono_domain_create): added code to increment domain
12561 shadow copy serial number and cache the value in the current
12564 * domain-internals.h (struct _MonoDomain): added a new field -
12565 shadow_serial to hold the serial number used in generation of
12566 shadow-copy directories. This is to make sure that the directory
12567 name is unique for each and every domain created. We avoid a race
12568 condition with overriding assemblies already in use by other app
12571 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
12573 * class.c (mono_bounded_array_class_get): fixed memory leak when
12574 binding generic parameters.
12576 2007-07-24 Raja R Harinath <rharinath@novell.com>
12578 * metadata.c (do_mono_metadata_parse_generic_class): Use
12579 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
12582 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12584 * loader.c, class-internals.h, reflection.c: removed the per-method
12585 generics hashtable: we use the global one through the call of
12586 mono_class_inflate_generic_method ().
12588 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12590 * class.c, metadata.c, class-internals.h: introduce yet another
12591 generics global cache for inflated methods (fixes 98% of the perf
12592 issue in bug #81806).
12594 2007-07-23 Raja R Harinath <rharinath@novell.com>
12596 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
12597 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
12598 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
12599 return a MonoGenericInst containing (a copy) of those types.
12600 (mono_metadata_inflate_generic_inst): Update to changes.
12601 (mono_metadata_parse_generic_inst): Likewise.
12602 (mono_get_shared_generic_inst): Likewise.
12603 * reflection.c (mono_class_bind_generic_parameters): Likewise.
12604 (mono_reflection_bind_generic_method_parameters): Likewise.
12605 * metadata-internals.h: Likewise.
12606 * icall.c (free_generic_context): Kill.
12607 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
12609 * reflection.c (reflection_methodbuilder_to_mono_method): Use
12610 mono_metadata_type_dup.
12611 * marshal.c (mono_mb_create_method): Likewise.
12613 * metadata.c (mono_metadata_type_dup): Rename from
12614 mono_metadata_type_dup_mp. Take an optional mempool instead of a
12615 MonoImage. Handle a few more cases, esp. when no mempool is given.
12616 * marshal.c, metadata-internals.h: Update to changes.
12618 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
12620 * class.c: fixed a small leak for array classes and removed warning.
12622 2007-07-22 Zoltan Varga <vargaz@gmail.com>
12624 * loader.c (mono_method_get_param_token): Make this work on generic methods.
12625 Return 0x8000000 for return parameters. Fixes #82161.
12627 2007-07-21 Marek Habersack <grendello@gmail.com>
12629 * appdomain.c (get_shadow_assembly_location): append the current
12630 ticks value to the path. Avoids overwriting the same assemblies by
12631 several threads at the same time.
12633 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
12634 and Raja R Harinath <rharinath@novell.com>
12636 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12638 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
12639 property for testing if a method is a generic method definition.
12641 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
12643 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
12645 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12647 * verify.c: used function from private branch, reverted to the one in class.h
12649 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12651 * verify.c: a typo slipped in and the code wont compile
12653 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12655 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
12656 disabled box instruction as it is doing the wrong thing
12657 improved stack dump messages, now it is easier to debug type related issues
12660 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
12662 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
12664 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12666 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
12667 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
12668 grouped with class and valuetype. This change will simply
12669 the code as it should be handled just like unmanaged pointers.
12671 2007-07-19 Mark Probst <mark.probst@gmail.com>
12673 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
12675 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12677 * verify.c: several stack merge issues fixed, reference comparisons now
12678 check the type size. strict type check now works correctly.
12679 added more uses of IS_MANAGED_POINTER macro.
12680 fixed issues pointed by running the test suite against .net.
12683 2007-07-19 Mark Probst <mark.probst@gmail.com>
12685 * class.c, loader.c, class-internals.h: Removed the
12686 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
12689 * icall.c: Better error checking in some internal reflection
12692 2007-07-18 William Holmes <billholmes54@gmail.com>
12694 * filewatcher.c : removed unused variable 'filename' in
12695 ves_icall_System_IO_FSW_SupportsFSW
12697 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12699 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
12702 2007-07-15 Zoltan Varga <vargaz@gmail.com>
12704 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
12706 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
12708 2007-07-14 Zoltan Varga <vargaz@gmail.com>
12710 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
12711 Implement generics support.
12712 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12714 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
12715 type_args and method_args arguments.
12716 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
12717 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12718 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
12720 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
12722 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
12723 It adds a rootimage parameter to mono_reflection_get_type_internal,
12724 adds new function mono_reflection_get_type_with_rootimage and use
12725 the rootimage to resolve the types instead of the current image
12727 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
12729 * culture-info-table.h: Forgot to update after r78304.
12731 2007-07-13 Raja R Harinath <rharinath@novell.com>
12733 * class.c (mono_class_is_open_constructed_type)
12734 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
12736 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
12738 * class.c (mono_bounded_array_class_get): method fails if used with
12739 an incomplete TypeBuilder enum (no basetype field), fixed it by
12740 avoiding calculating the size for such array as it cannot be instantiated.
12743 2007-07-12 Raja R Harinath <rharinath@novell.com>
12745 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
12747 * metadata.c, reflection.c: Update to changes.
12749 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
12751 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
12752 mono_class_is_valid_enum, they are used to valide a enum when loading.
12753 * reflection.c: used new functions to throw TypeLoadException when and
12754 invalid enum is build with TypeBuilder. Fixes #82018
12756 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12758 * object.c: forgot commit of mono_class_setup_methods () to access
12760 * object-internals.h: added a few more handy fields to
12763 2007-07-11 Zoltan Varga <vargaz@gmail.com>
12765 * object.c (build_imt): Call mono_class_setup_methods () before accessing
12768 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
12770 * class-internals.h, object-internals.h, object.c: IMT-based
12771 interface invocation core from Massimiliano Mantione
12772 (massi@ximian.com) with a reworked arch-specific interface,
12773 bsearch implementation and a few bugfixes and memory savings by me.
12775 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
12777 * class.c (mono_class_create_from_typedef): mono would segfault if
12778 an enum did not have a __value field. It now throws a TypeLoadException
12779 for such cases. Fix bug #82022
12781 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12783 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
12785 2007-07-09 Mark Probst <mark.probst@gmail.com>
12787 * class.c (mono_class_init): If a class is already inited but has
12788 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
12790 2007-07-09 Mark Probst <mark.probst@gmail.com>
12792 * class.c: Properly handle the case of an unimplemented interface
12793 method. Fixes: 81673.
12795 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12797 * class-internals.h, object.c: cleanup patch from massi: use
12798 MonoVTable->interface_bitmap since the vtable interfaces offset array
12801 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12803 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
12804 GetMDStreamVersion icall instead.
12806 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
12808 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
12809 not use mono_dl_build_path() with a full library name: makes
12810 fallbacks to libgaim and libfam work.
12812 2007-07-06 William Holmes <billholmes54@gmail.com>
12814 * assembly.c: Added a continue statement in probe_for_partial_name when
12815 parse_assembly_directory_name fails. Fixes : 82002
12817 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
12819 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
12820 and added a verification for TYPEDBYREF.
12821 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
12822 make native int interchangeable with int32 and some small cleanup and formating.
12823 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
12824 handle byref of byref.
12825 * verify.c (push_local): handle byref of byref.
12826 * verify.c (do_binop): invalid mix of values is unverifiable
12827 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
12828 added visibility checks
12829 * verify.c (field related method): added visibility checks
12830 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
12832 2007-07-06 Zoltan Varga <vargaz@gmail.com>
12834 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
12837 2007-07-05 Zoltan Varga <vargaz@gmail.com>
12839 * profiler.c (mono_profiler_load): Fix an off-by-one error.
12841 * marshal.c (emit_marshal_string): When returning a string from managed code,
12842 allways make a copy even for unicode strings. Fixes #81990.
12844 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
12846 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
12847 of byref generic inst types (bug #81997).
12849 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
12851 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
12852 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
12854 2007-07-02 Zoltan Varga <vargaz@gmail.com>
12856 * marshal.c (emit_marshal_string): Add support for unicode strings in
12857 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
12859 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
12861 * verify.c: field load/store are now verified, missing only access checks now
12863 2007-06-28 Martin Baulig <martin@ximian.com>
12865 * mono-debug.c (mono_debug_debugger_version): New public variable.
12867 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
12869 * locales.c: When constructing DateTimeFormat or NumberFormat for
12870 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
12871 MonoCultureInfo contructed from the current locale is always
12872 read-only and has UseUserOverride set to true. All MonoCultureInfo
12873 instances returned for GetCultures have both IsReadOnly and
12874 UseUserOverride set to true. Fixes part of bug #81930.
12876 2007-06-22 Jonathan Chambers <joncham@gmail.com>
12878 * icall-def.h: Update System.__ComObject icalls
12879 * marshal.c: Avoid managed transition (and object creation)
12880 when looking up COM interface in RCW.
12881 * marshal.h: Ditto.
12883 Code is contributed under MIT/X11 license.
12885 2007-06-22 Zoltan Varga <vargaz@gmail.com>
12887 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
12888 to avoid crashes during assembly unloading.
12890 2007-06-22 Raja R Harinath <rharinath@novell.com>
12892 Fix MethodInfo.IsGenericMethodDefinition
12893 * reflection.c (mono_reflection_bind_generic_method_parameters):
12894 Rearrange code to ensure we always uses a generic method definition.
12895 * class.c (mono_class_inflate_generic_method_full): Set
12896 'generic_container' field only for generic method definitions.
12897 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12898 Use presense of 'generic_container' field as indication of being a
12899 generic method definition.
12901 2007-06-21 Zoltan Varga <vargaz@gmail.com>
12903 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12905 * object-internals.h: Reflect changes in the layout of the managed Delegate
12908 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
12909 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
12910 runtime memory used by the dynamic method. Fixes #77146.
12912 2007-06-21 Dick Porter <dick@ximian.com>
12915 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
12916 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
12919 2007-06-21 Raja R Harinath <rharinath@novell.com>
12921 * reflection.c (method_encode_methodspec): Add a tripwire.
12922 * class.c (inflate_generic_type): The fully open generic type is
12923 not the same as the generic type definition.
12925 2007-06-21 Martin Baulig <martin@ximian.com>
12927 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
12929 * mono-debug-debugger.h
12930 (MonoDebuggerBreakpointInfo): Removed.
12931 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
12932 (mono_debugger_remove_breakpoint): Likewise.
12933 (mono_debugger_breakpoint_callback): Likewise.
12934 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
12936 2007-06-21 Raja R Harinath <rharinath@novell.com>
12938 * metadata.c (mono_metadata_lookup_generic_class): The fully open
12939 generic type is not the same as the generic type definition.
12940 * class.c (mono_generic_class_get_class): Likewise.
12942 2007-06-20 Geoff Norton <gnorton@customerdna.com>
12944 * icall.c: The second argument to
12945 System.Reflection.MethodBase.GetMethodFromHandleInternalType
12946 is a MonoType not a MonoClass.
12948 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12950 * verify.c: support for function pointers in the verifier
12952 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12954 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
12956 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12958 * assembly.c: removed Mono.Data.SqliteClient from the list of
12959 forward-compatible assemblies as it breaks the ABI (bug #81899).
12961 2007-06-19 Raja R Harinath <rharinath@novell.com>
12963 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
12964 lookup/update with the loader lock.
12965 * reflection.c (mono_class_bind_generic_parameters): No need to
12966 protect mono_metadata_lookup_* with the loader lock.
12967 * class.c (inflate_generic_type): Likewise.
12969 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
12970 on a generic instantiated type.
12972 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
12974 *verify.c: produce meanfull error messages on verification error
12975 *verify.c: fixed some cases of verification errors reported as validation errors
12976 *pedump.c: fixed the error name array, now it shows validation errors properly
12977 *verify.h: fixed the contant that should be used for verification errors
12979 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12981 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
12982 for bug #77596, 81858 and 80743 (generics data structures on domain
12985 2007-06-15 Raja R Harinath <rharinath@novell.com>
12987 Avoid allocating 'MonoGenericContext' on the heap.
12988 * class-internals (_MonoMethodInflated::context): Make field
12989 inline, not a pointer.
12990 * loader.c (method_from_methodspec): Allocate 'new_context' on the
12991 stack. Use the context embedded within the inflated method as the
12992 hash key, rather than 'new_context'.
12993 * class.c (inflate_generic_context): Simplify. Return a struct
12994 rather than allocating on the heap.
12995 (mono_class_inflate_generic_method_full): Update to changes. Now,
12996 doesn't salt away a copy of the context -- simplifying the
12997 lifetime rules of a 'MonoGenericContext *'.
12998 (mono_method_get_context): Return pointer to embedded context.
12999 (setup_generic_array_ifaces): Allocate temporary context on stack.
13000 * reflection.c (inflate_mono_method): Likewise.
13001 (mono_reflection_bind_generic_method_parameters): Likewise.
13002 Use the context embedded within the inflated method as the hash key.
13004 Avoid a source of allocation of 'MonoGenericContext'.
13005 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
13006 and 'cached_context' fields into embedded 'MonoGenericContext' field.
13007 * class.c: Update to changes.
13008 (mono_generic_class_get_context): Simplify drastically. Now just
13009 returns a pointer to the field.
13010 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
13011 argument as a const pointer.
13012 (mono_metadata_generic_context_equal): Likewise.
13013 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
13016 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
13018 * verify.c improved the handling of brtrue/brfalse, factored out common code
13020 2007-06-14 Raja R Harinath <rharinath@novell.com>
13022 Kill MonoGenericMethod.
13023 * class-internals.h (MonoGenericContext::method_inst): Rename from
13024 'gmethod' and convert to a MonoGenericInst.
13025 (MonoGenericMethod): Remove.
13026 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
13027 * loader.c (method_from_methodspec): Update to changes. Use a
13028 MonoGenericContext as the key to the hashtable.
13029 * metadata.c (mono_metadata_generic_context_equal): Rename from
13030 'mono_metadata_generic_method_equal' and take MonoGenericContext.
13031 (mono_metadata_generic_context_hash): Likewise from
13032 'mono_metadata_generic_method_hash'. Change hash function.
13033 (mono_metadata_load_generic_params): Update to changes.
13034 (mono_get_shared_generic_method): Remove.
13035 * metadata-internals.h (mono_get_shared_generic_method): Remove.
13036 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
13037 (inflate_generic_context): Likewise.
13038 (mono_class_inflate_generic_method_full): Likewise.
13039 (setup_generic_array_ifaces): Likewise.
13040 (mono_class_create_from_typespec): Likewise.
13041 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
13042 (method_encode_methodspec): Update callsite.
13043 (reflection_methodbuilder_to_mono_method): Update to changes.
13044 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
13045 MonoGenericContext as the key to the hashtable.
13046 (inflate_mono_method): Update to changes.
13048 * class-internals.h (MonoGenericMethod::container): Remove.
13049 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
13051 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
13053 * profiler-private.h, profiler.c, profiler.h: added API to profile
13056 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
13058 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
13060 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
13062 * verify.c: method invocation is now validated, now we verify parameter types on stack.
13063 Fixed overflow and underflow not aborting the verification process.
13065 2007-06-13 Mark Probst <mark.probst@gmail.com>
13067 * class-internals.h (MonoStats): Added stats entries for dynamic
13070 2007-06-12 Zoltan Varga <vargaz@gmail.com>
13072 * loader.c (mono_free_method): Free header->locals and header->clauses.
13074 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
13077 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
13079 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
13081 2007-06-12 Raja R Harinath <rharinath@novell.com>
13083 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
13086 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
13088 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
13090 2007-06-11 Raja R Harinath <harinath@gmail.com>
13092 MonoGenericMethod on a diet
13093 * class-internals.h (_MonoMethodInflated::reflection_info): Move
13095 (_MonoGenericMethod::reflection_info): ... from here.
13096 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
13098 * reflection.c (inflate_mono_method): Likewise.
13099 (mono_reflection_bind_generic_method_parameters): Likewise.
13101 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
13103 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
13104 *verify.c: factored long ldarg forms to share code with short forms
13106 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
13108 *verify.c: fixed code formating factored some duplicate code
13109 into a new function
13111 *verify.h: fixed binary incompatibility introduced earlier
13113 *pedump.c: fixed formating
13115 2007-06-11 Raja R Harinath <harinath@gmail.com>
13117 Fix assertion when disassembling Mono.C5.dll
13118 * loader.c (method_from_methodspec): Avoid inflating a method
13119 twice with the same context. If the methodref is inflated, use
13120 the declaring method instead.
13122 * class.c (mono_class_from_generic_parameter): Fix case similar to
13123 bug #81830 handled below, but for method containers.
13125 2007-06-10 Raja R Harinath <harinath@gmail.com>
13127 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
13128 get_shared_generic_class. Directly inflate the instance.
13129 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
13130 (inflate_generic_class): Delete.
13131 (get_shared_generic_class): Delete. Move setting of
13132 'cached_class' and 'cached_context' ...
13133 * metadata.c (mono_metadata_lookup_generic_class): ... here.
13135 * metadata.c (mono_metadata_lookup_generic_class): Change
13136 signature to take the components of a MonoGenericClass rather than
13137 an allocated MonoGenericClass. Change semantics to be intern-like.
13138 * reflection.c (mono_class_bind_generic_parameters): Update to
13139 changes. Make locking region tighter.
13140 * class.c (inflate_generic_class): Update to changes.
13141 (get_shared_generic_class): Likewise.
13142 * metadata-internals.h: Likewise.
13144 * reflection.c (mono_class_bind_generic_parameters): Take and
13145 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
13146 (mono_reflection_bind_generic_parameters): Use
13147 'mono_class_bind_generic_parameters' rather than duplicate the code.
13148 * class.c (mono_bounded_array_class_get): Update to changes.
13149 * object-internals.h: Likewise.
13151 * reflection.c (mono_class_bind_generic_parameters): Only support
13152 parameterizing generic type definitions. Remove support for other
13155 2007-06-08 Zoltan Varga <vargaz@gmail.com>
13157 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
13159 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
13160 in the dynamic case.
13162 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
13164 * threads.c: When cleaning up thread, reset the Background bit.
13167 2007-06-08 Jonathan Chambers <joncham@gmail.com>
13169 * metadata.c: Move variable declarations to top of scope.
13170 * verify.c: Move variable declarations to top of scope.
13172 Code is contributed under MIT/X11 license.
13174 2007-06-08 Raja R Harinath <rharinath@novell.com>
13176 * reflection.c (mono_class_bind_generic_parameters): Replace
13177 open-coded loop with mono_metadata_inflate_generic_inst.
13179 * class.c (get_shared_generic_class): Don't call
13180 mono_get_shared_generic_inst. Use the container's own
13183 * metadata.c (mono_metadata_load_generic_params): Move
13184 initialization of 'context' field here from ...
13185 * class.c (mono_class_create_from_typedef): ... here, and ...
13186 * loader.c (mono_get_method_from_token): ... here.
13188 * class.c (get_shared_generic_class): Rename from
13189 mono_get_shared_generic_class and make static.
13190 (mono_get_shared_generic_inst): Move to metadata.c.
13191 * loader.c (mono_get_shared_generic_method): Likewise.
13192 * class-internals.h, metadata-internals.h: Update to changes.
13195 * class.c (mono_class_from_generic_parameter): Don't assume a
13196 generic container owner exists. Generic containers from monodis
13199 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
13201 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
13202 * verify.h: new typedefs to returns the non-verifiable status
13203 * verify.c: initial implementation of generics, stack merging and object compatibility check
13205 2007-06-06 Mark Probst <mark.probst@gmail.com>
13207 * class.c, image.c, class-internals.h (MonoImage): class_cache is
13208 a MonoInternalHashTable again (fixed bug in internal hash table
13211 2007-06-06 Mark Probst <mark.probst@gmail.com>
13213 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
13214 MonoInternalHashTable again (fixed bug in internal hash table
13217 2007-06-06 Mark Probst <mark.probst@gmail.com>
13219 * class.c, image.c, class-internals.h, domain.c,
13220 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
13221 changes. Have to figure out what makes them break the SWF
13224 2007-06-04 Mark Probst <mark.probst@gmail.com>
13226 * class.c, image.c, class-internals.h (MonoImage): class_cache is
13227 a MonoInternalHashTable now.
13229 2007-06-04 Mark Probst <mark.probst@gmail.com>
13231 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
13232 MonoInternalHashTable now.
13234 2007-05-31 Zoltan Varga <vargaz@gmail.com>
13236 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
13239 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
13241 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
13242 dependent trampoline.
13244 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13246 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
13248 2007-05-29 Robert Jordan <robertj@gmx.net>
13250 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
13252 2007-05-28 Zoltan Varga <vargaz@gmail.com>
13254 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
13256 2007-05-25 Jonathan Chambers <joncham@gmail.com>
13258 * marshal.c: Fix interface lookup loops for
13259 cominterop_get_com_slot_for_method and
13260 cominterop_get_method_interface. Only need to lookup
13261 if type is a class, else use interface type method is on.
13263 Code is contributed under MIT/X11 license.
13265 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
13267 * reflection.c: HasSecurity can be present even if no specially
13268 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
13269 SecurityAttribute). Fix CAS regression tests on buildbot.
13271 2007-05-24 Jonathan Chambers <joncham@gmail.com>
13273 * appdomain.c: Add configure checks for header files.
13274 * image.c: Add configure checks for header files.
13275 * file-io.c: Add configure checks for header files.
13276 * debug-mono-symfile.c: Add configure checks for header files.
13277 * threadpool.c: Add configure checks for header files.
13278 * console-io.c: Add configure checks for header files.
13279 * profiler.c: Add configure checks for header files.
13280 * rawbuffer.c: Add configure checks for header files.
13281 * icall.c: Add configure checks for header files.
13282 * rand.c: Add configure checks for header files.
13283 * socket-io.c: Add configure checks for header files.
13285 Code is contributed under MIT/X11 license.
13287 2007-05-24 Zoltan Varga <vargaz@gmail.com>
13289 * reflection.c (mono_custom_attrs_from_builders): Remove the
13290 assertion as it breaks the build.
13292 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
13294 * reflection.c (lookup_custom_attr): Make a copy here too.
13296 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
13299 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
13302 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
13305 2007-05-22 Zoltan Varga <vargaz@gmail.com>
13307 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
13308 (load_cattr_value): Ditto.
13310 2007-05-20 Zoltan Varga <vargaz@gmail.com>
13312 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
13314 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
13316 * threads.c: In "start_wrapper", set apartment_state to MTA if
13317 apartment_state is Unknown and we're running on 2.0 profile or
13319 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
13320 to main method, then set apartment_state to Unknown on 1.0 profile,
13321 and MTA on 2.0 profile.
13323 2007-05-16 Jb Evain <jb@nurv.fr>
13325 * class-internals.h (MonoDefaults): Add an attribute_class and
13326 customattribute_data_class.
13327 * domain.c (mono_init_internal): Populate them.
13328 * reflection.c: Use them to remove duplicates. Make a vew
13329 MonoClass variables `static'.
13331 2007-05-15 Massimiliano Mantione <massi@ximian.com>
13333 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
13334 step in implementing IMT, so that all isinst checks now can go
13335 through the bitmap.
13336 This was needed because vtables for TransparentProxy need to look
13337 like the vtable of the "target" class, so they need to point to
13338 its interface bitmap directly.
13340 * object.c: inside "mono_class_create_runtime_vtable" and
13341 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
13343 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
13345 * object-internals.h
13346 culture-info.h : added territory field in MonoCulture and
13347 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
13348 * locales.c : fill territory field above too.
13349 * culture-info-table.h : regenerated.
13351 2007-05-12 Zoltan Varga <vargaz@gmail.com>
13353 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
13356 2007-05-11 Jonathan Chambers <joncham@gmail.com>
13358 * object.c: Always initialize apartment, even if
13359 there is no custom attributes on entry point.
13361 Code is contributed under MIT/X11 license.
13363 2007-05-10 Jonathan Chambers <joncham@gmail.com>
13365 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
13366 * metadata.c: If no encoding is set, check for unicode
13369 Code is contributed under MIT/X11 license.
13371 2007-05-09 Jonathan Chambers <joncham@gmail.com>
13373 * threads.c: Handle if mono_thread_current returns NULL
13375 Code is contributed under MIT/X11 license.
13377 2007-05-09 Jonathan Chambers <joncham@gmail.com>
13379 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
13380 in start_wrapper. Added mono_thread_init_apartment_state and
13381 mono_thread_cleanup_apartment_state.
13382 * object.c: Initialize thread apartment state on main thread
13383 by checking for STAThreadAttribute on entry point.
13384 * object-internals.h: Add apartment_state field to MonoThread.
13385 * threads-types.h: Add unmanaged definition of
13386 System.Threading.ApartmentState, MonoThreadApartmentState.
13388 Code is contributed under MIT/X11 license.
13390 2007-05-08 Jonathan Chambers <joncham@gmail.com>
13392 * class.c: Fix windows build.
13393 * class-internals.h: Fix windows build.
13395 Code is contributed under MIT/X11 license.
13397 2007-05-08 Robert Jordan <robertj@gmx.net>
13399 * process.c (CreateProcess_internal):
13400 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
13401 .CreateNoWindow was specified. Fixes #81496.
13403 2007-05-08 Massimiliano Mantione <massi@ximian.com>
13405 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
13406 step in implementing IMT, replaced it with two compact arrays
13407 (interfaces_packed and interface_offsets_packed) and a bitmap that
13408 is used for isinst checks (interface_bitmap).
13410 * class.c: (compare_interface_ids): compare function to pass to
13411 bsearch when looking for an interface with a given id.
13412 (mono_class_interface_offset): reimplemented using bsearch on
13413 interfaces_packed, getting the offset from interface_offsets_packed.
13414 (print_implemented_interfaces): utility debugging function.
13415 (setup_interface_offsets): reworked to initialize interfaces_packed,
13416 interface_offsets_packed and interface_bitmap.
13418 * object.c: replaced all accesses to "MonoClass.interface_offsets"
13419 with uses of interfaces_packed and interface_offsets_packed.
13421 2007-05-08 Massimiliano Mantione <massi@ximian.com>
13423 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
13424 mono_class_interface_offset prototype to wrap all accesses to
13425 "MonoClass.interface_offsets".
13427 * class.c: Implemented mono_class_interface_offset, and wrapped all
13428 accesses to "MonoClass.interface_offsets".
13430 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
13431 "MonoClass.interface_offsets".
13433 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
13435 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
13436 GetMethodFromHandle overloads (bug #78637).
13438 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
13440 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
13441 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
13443 2007-05-01 Zoltan Varga <vargaz@gmail.com>
13445 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
13448 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
13450 (mono_custom_attrs_from_index): Ditto.
13452 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
13455 2007-04-30 Zoltan Varga <vargaz@gmail.com>
13457 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
13458 is now allocated from a mempool.
13460 2007-04-28 Zoltan Varga <vargaz@gmail.com>
13462 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
13463 caller holds threads_lock, leading to deadlocks. Fixes #81476.
13465 2007-04-26 Zoltan Varga <vargaz@gmail.com>
13467 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
13468 mono_loader_clear_error () too late. Fixes #81463.
13470 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
13472 * culture-info-table.h : regenerated.
13474 2007-04-25 Zoltan Varga <vargaz@gmail.com>
13476 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
13479 2007-04-25 Dick Porter <dick@ximian.com>
13481 * Makefile.am: Put the mingw enforced-optimisation back into the
13482 PLATFORM_WIN32 section.
13484 2007-04-24 Zoltan Varga <vargaz@gmail.com>
13486 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
13489 * image.c (mono_image_load_module): New API function to load a module reference.
13491 * image.c (load_modules): Load modules lazily. Fixes #80812.
13493 * class.c (mono_class_from_typeref): Use mono_image_load_module.
13495 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
13497 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
13498 to mono_image_load_module_dynamic.
13500 2007-04-23 Jonathan Chambers <joncham@gmail.com>
13502 * marshal.c: Fix calling convention for CCW on non-windows
13503 platforms. STDCALL on windows, CDECL everywhere else to work
13504 with XPCOM and MainWin COM.
13506 Code is contributed under MIT/X11 license.
13508 2007-04-23 Martin Baulig <martin@ximian.com>
13513 (method_from_memberref): Added `gboolean *used_context' argument.
13514 (mono_get_method_from_token): Likewise.
13515 (mono_get_method_full): Don't insert the method in the cache when
13516 `used_context' is true.
13518 2007-04-23 Raja R Harinath <rharinath@novell.com>
13520 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
13522 * reflection.c (mono_reflection_bind_generic_parameters): Don't
13523 create new MonoTypes for returned types.
13524 * class.c (mono_generic_class_get_class): Export mono-internal.
13525 * class-internals.h: Update to changes.
13527 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
13529 * threadpool.c, threadpool.h, icall-def.h: patch from
13530 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
13532 2007-04-18 Zoltan Varga <vargaz@gmail.com>
13534 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
13536 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
13538 * threads.c (mono_thread_get_stack_bounds): New helper function.
13540 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
13541 Correctly compute stack bounds when attaching. Fixes #81394.
13543 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
13545 * reflection.c: fix handling of doubles in custom attributes
13546 for the arm-fpa format (bug #81368).
13548 2007-04-18 Raja R Harinath <rharinath@novell.com>
13550 * reflection.c (assembly_add_win32_resources): Mildly relax an
13551 bounds check to let the end pointer point just past the end of the
13552 allocated buffer. (may fix #81384)
13554 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
13556 * culture-info-table.h : regenerated.
13558 2007-04-07 Zoltan Varga <vargaz@gmail.com>
13560 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
13561 the thread is aborted early.
13563 2007-04-05 Dick Porter <dick@ximian.com>
13565 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
13566 FindFirstFile()/FindNextFile() to find entries. This lets the
13567 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
13570 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
13572 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
13574 2007-04-04 Martin Baulig <martin@ximian.com>
13577 (mono_method_desc_full_match): Add support for nested classes.
13579 2007-04-02 Zoltan Varga <vargaz@gmail.com>
13581 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
13583 2007-04-01 Zoltan Varga <vargaz@gmail.com>
13585 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
13586 waiting for too many threads.
13588 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
13590 * environment.c: Fix return value check on uname so we can get the
13591 executing version on Solaris operating systems.
13593 2007-03-28 Jb Evain <jbevain@gmail.com>
13595 * class.c (mono_type_get_name_recurse): Complete the
13596 fix for the creation of assembly qualified names for
13597 pointer types. Fixes #81208.
13599 2007-03-27 Dick Porter <dick@ximian.com>
13601 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
13602 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
13606 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
13607 the value of ReleaseMutex().
13609 2007-03-27 Dick Porter <dick@ximian.com>
13611 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
13612 in little-endian order, not network endian, so must be converted
13613 to host endian here. Fixes bug 80593.
13615 2007-03-22 Jb Evain <jbevain@gmail.com>
13617 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
13618 qualified names for pointer types. Fixes #81208.
13620 2007-03-21 Jonathan Chambers <joncham@gmail.com>
13622 * marshal.c: Add support for PreserveSigAttribute.
13624 Code is contributed under MIT/X11 license.
13626 2007-03-14 Zoltan Varga <vargaz@gmail.com>
13628 * process.c: Fix endianness issues. Fixes #81126.
13630 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
13631 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
13633 * image.c (mono_image_lookup_resource): Make this work on big-endian
13634 machines.Change API contract so the caller needs to free the return value.
13636 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
13639 2007-03-14 Martin Baulig <martin@ximian.com>
13641 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
13642 mono_type_get_desc() as well.
13644 2007-03-13 Jonathan Chambers <joncham@gmail.com>
13646 * icall.c: Fix environ access in VS.
13648 2007-03-13 Alp Toker <alp@atoker.com>
13650 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13651 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13654 2007-03-12 Zoltan Varga <vargaz@gmail.com>
13656 * reflection.c (mono_reflection_create_dynamic_method): Add support for
13657 circular references among dynamic methods. Fixes #81091.
13659 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
13661 2007-03-09 Martin Baulig <martin@ximian.com>
13663 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
13665 2007-03-09 Jonathan Chambers <joncham@gmail.com>
13667 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
13668 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
13670 Code is contributed under MIT/X11 license.
13672 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
13674 * loader.c: Reapply patch for bug #79424.
13676 2007-03-06 Zoltan Varga <vargaz@gmail.com>
13678 * metadata.c (mono_type_to_unmanaged): Only convert object to
13679 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
13681 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
13683 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
13684 (and incorrectly set) is_reference field from MonoGenericInst.
13686 2007-03-06 Zoltan Varga <vargaz@gmail.com>
13688 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
13691 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
13693 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
13695 2007-03-05 Miguel de Icaza <miguel@novell.com>
13697 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
13698 FileOptions.1 value to mean "temporary", map that to
13699 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
13703 2007-03-03 Marek Habersack <mhabersack@novell.com>
13705 * appdomain.c: implement MS .Net style shadow copying. Copies of
13706 the assemblies are made in a subdirectory of the dynamic base
13707 directory, the assembly names are preserved.
13708 Copy .mdb and .config files along with the assemblies being shadowed.
13710 2007-02-28 Zoltan Varga <vargaz@gmail.com>
13712 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
13713 (emit_marshal_handleref): Ditto.
13715 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
13716 on Visual C++. Fixes #80671.
13718 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13720 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
13721 for clone operations.
13723 2007-02-28 Zoltan Varga <vargaz@gmail.com>
13725 * marshal.c: Fix warnings.
13727 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
13729 * loader.c: allow case-insensitive matching of the dll name
13730 in dllmap handling when prefixed with "i:".
13732 2007-02-20 Jonathan Chambers <joncham@gmail.com>
13734 * threads.c: Fix #ifdef for dummy_apc function for VS.
13736 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
13738 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
13740 2007-02-19 Massimiliano Mantione <massi@ximian.com>
13741 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
13742 giving precedence to the methods with a fully qualified name
13743 (InterfaceName.MethodName) when building the interface sections
13746 2007-02-16 Dick Porter <dick@ximian.com>
13748 * threadpool.c (append_job): Fix fast-path array handling, so it's
13749 less likely the array will grow exponentially when the load is
13752 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13754 * metadata-internals.h, loader.c: fix dllmap lookup order
13755 for non-function maps, too, and prepare for fallback code.
13757 2007-02-12 Robert Jordan <robertj@gmx.net>
13759 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
13760 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
13761 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
13762 GlobalFree. Fixes a part of bug #77075.
13764 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
13766 * loader.c: implemented typedef parent in field memberref.
13768 2007-02-11 Jonathan Chambers <joncham@gmail.com>
13770 * marshal.c: Fix warnings and remember to call Release on
13773 Code is contributed under MIT/X11 license.
13775 2007-02-10 Miguel de Icaza <miguel@novell.com>
13777 * class-internals.h: Add MonoHandleRef definition, and
13778 handleref_class to mono_defaults.
13780 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
13781 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
13783 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
13784 (do nothing on this stage)
13785 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
13786 (emit_marshal_handleref): New method, used for argument handling
13789 2007-02-08 Jonathan Chambers <joncham@gmail.com>
13791 * class.c (mono_class_setup_parent): Lazily init com types.
13792 * domain.c (mono_init_internal, mono_init_com_types): Lazily
13794 * object.c (mono_remote_class_vtable): Lazily init com types.
13795 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
13796 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
13797 * domain-internals.h: Expose mono_init_com_types.
13798 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
13799 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
13800 Add support for COM Callable Wrapper marshalling.
13801 * marshal.h: Add icall definitions.
13802 * gc.c: Handle freeing of CCWs in finalizer code.
13804 Code is contributed under MIT/X11 license.
13806 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
13808 * reflection.c: changed all the signature encoding code to use
13809 a variable-sized buffer.
13811 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13813 * marshal.c: locking fixes: never take the loader lock
13814 or other runtime locks when holding the marshal lock
13817 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
13819 * marshal.c: make the delegate function pointer mapping
13820 work for the moving GC.
13822 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
13824 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
13827 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13829 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
13832 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13834 * threadpool.c: made the code moving-GC safe.
13836 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13838 * assembly.c, boehm-gc.c, class-internals.h, class.c,
13839 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
13840 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
13842 * reflection.c: warning cleanup, some threading and moving GC fixes.
13844 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
13846 * class.c, loader.c: create the needed Set/Get/Address array methods
13847 as well as the .ctors in mono_class_init (), fixes bug #80567.
13849 2007-01-24 Zoltan Varga <vargaz@gmail.com>
13851 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
13852 we doesn't decrease its alignment. Should fix the sparc build.
13854 2007-01-24 Dick Porter <dick@ximian.com>
13857 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13858 Create the returned object if we need to ignore an unsupported
13859 socket option. Fixes a segfault reported by Atsushi.
13861 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13863 * class.c, object.c: restrict GC-tracked fields to
13864 UIntPtr fields used inside corlib, so we provide better
13865 type info to the GC and also allow broken packing as in
13868 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
13870 * sgen-gc.c: removed duplicated function.
13872 2007-01-19 Miguel de Icaza <miguel@novell.com>
13874 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
13875 value that means that the value is not supported, but that we
13876 should not return a failure, but instead report this as a
13877 successful operation.
13879 2007-01-19 Raja R Harinath <rharinath@novell.com>
13881 Fix tests/bug79956.2.il
13882 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
13883 (mono_generic_class_get_class): If the generic definition in an
13884 enum, copy over other fields related to it.
13886 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13888 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
13889 genericinst enums (bug #79215).
13891 2007-01-17 Massimiliano Mantione <massi@ximian.com>
13892 * class.c: Fix bug 80307.
13894 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
13896 * image.c: if the file table is not present, try to load
13897 all the modules, since we don't have info about them
13898 having or not metadata (bug #80517).
13899 * assembly.c: allow mono_assembly_load_references () to
13900 work for netmodules.
13902 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13904 * image.c, metadata-internals.h, object.c: execute module
13905 cctors when running on the 2 runtime if present (bug #80487).
13907 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13909 * icall.c: optimized InitializeArray() on bigendian.
13911 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
13913 * icall.c: fix for the broken ARM FPA double format.
13915 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13917 * icall.c: handle endian issues for r4 and r8 types, too, in
13918 the InitializeArray() icall.
13920 2007-01-15 Miguel de Icaza <miguel@novell.com>
13922 * loader.c (mono_loader_error_prepare_exception): Clear the error
13923 once we have extracted the information from it, do this before we
13924 call into the JIT's class loading mechanisms.
13926 * object.c (mono_class_create_runtime_vtable): Do not clear the
13927 loader error before calling mono_class_get_exception_for_failure
13928 as the loader error is needed inside
13929 mono_class_get_exception_for_failure to throw the error (thinko).
13933 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13935 * reflection.c: align fields rva data so it's faster to load at
13938 2007-01-12 Raja R Harinath <rharinath@novell.com>
13940 Prepare to simplify GenericMethod handling.
13941 * class-internals.h (mono_method_get_context): New accessor function.
13942 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
13943 rather than directly accessing '->context' field.
13945 * class-internals.h (_MonoGenericParam.method): Move ...
13946 (_MonoGenericContainer): ... here. Add into union with klass field.
13947 * class.c, icall.c, loader.c, metadata.c, reflection.c:
13950 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
13952 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
13953 the wrapper type enum and reduce relocations.
13955 2007-01-12 Raja R Harinath <rharinath@novell.com>
13957 * reflection.c (inflate_mono_method): Reuse method instantiation
13958 from the generic method, if available.
13960 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13962 * marshal.c (emit_marshal_variant): Fix conv_arg
13963 type in last commit, based on whether parameter is byref.
13965 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13967 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
13969 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
13970 MONO_TYPE_OBJECT back for VARIANT support.
13972 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13974 * marshal.c, marshal.h, icall-def.h: Implement
13975 Marshal.ReAllocCoTaskMem.
13977 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
13979 * marshal.c: memory retention fixes: use the proper
13980 image cache for runtime_invoke method lookups.
13982 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13984 * mempool.c: added code to help debug mempool allocations.
13986 2007-01-11 Dick Porter <dick@ximian.com>
13988 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
13989 support (experimenting with faking it with IP_MTU_DISCOVER for
13990 systems that don't have IP_DONTFRAGMENT.)
13991 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
13994 * icall-def.h: new System.Net.Sockets.Disconnect icall.
13996 * socket-io.h: Add new fields to MonoSocketAsyncResult
13997 corresponding to the new ones in Socket.cs.
13999 2007-01-11 Raja R Harinath <rharinath@novell.com>
14001 Fix IronPython regression mentioned in #80249
14002 * metadata.c (do_mono_metadata_parse_generic_class): Clear
14003 'cached_context' field, since it may have been initialized as a
14004 side-effect of metadata parsing.
14006 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
14007 (_MonoGenericClass.cached_class): Move here and rename from lone
14008 remaining field of ...
14009 (_MonoInflatedGenericClass): ... this. Remove.
14010 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
14013 Fix mcs/tests/test-128.cs regression.
14014 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
14015 2007-01-10 change below.
14016 [MONO_TYPE_OBJECT]: Recurse into array case.
14018 2007-01-11 Raja R Harinath <harinath@gmail.com>
14020 * class-internals.h (mono_get_inflated_generic_class): Remove.
14021 * class.c (mono_get_inflated_generic_class): Remove.
14022 (mono_generic_class_get_class): Rename from
14023 mono_class_create_generic.
14024 (mono_class_from_mono_type) [GENERICINST]: Use it.
14025 * reflection.c, metadata.c: Update to changes. Use
14026 'mono_class_from_mono_type'.
14028 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
14030 * reflection.c: use passed type when encoding an array element
14031 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
14033 2007-01-09 Robert Jordan <robertj@gmx.net>
14035 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
14036 result arguments (someDelegate.EndInvoke (unrelatedAres)).
14039 2007-01-09 Raja R Harinath <rharinath@novell.com>
14041 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
14043 * object.c (set_value): Avoid aliasing between type->data.klass
14044 and type->data.generic_class.
14046 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
14048 2007-01-08 Raja R Harinath <rharinath@novell.com>
14050 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
14051 between type->data.klass and type->data.generic_class.
14053 2007-01-08 Lluis Sanchez <lluis@ximian.com>
14055 * marshal.c: In MS.NET, StringBuilder objects are not copied by
14056 value in out parameters.
14058 2007-01-08 Raja R Harinath <rharinath@novell.com>
14060 Simplify invariant for MonoGenericClass::klass field.
14061 * class.c (mono_class_create_generic): Verify 'klass' is null.
14062 * metadata.c (do_mono_metadata_parse_generic_class): Don't
14063 initialize 'klass' field.
14065 2007-01-05 Raja R Harinath <rharinath@novell.com>
14067 Ongoing work to avoid redundant data and simplify invariants.
14068 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
14069 'generic_class', and change type to a GenericInst.
14070 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
14071 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
14073 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
14075 * class.c : skip io-layer under PLATFORM_WIN32.
14077 2007-01-03 Tor Lillqvist <tml@novell.com>
14079 Fix #80305: In a bundled executable, look in the bundled exe
14080 assembly to determine the runtime version. Add the possibility to
14081 bundle also the machine.config file.
14083 * assembly.c (mono_assembly_open_from_bundle): Make
14084 non-static. Allow being called even if we have no bundled
14085 assemblies, and return NULL right away in that case.
14087 * domain-internals.h: Declare mono_assembly_open_from_bundle()
14090 * domain.c (app_config_parse): Take an assembly exe file name as
14091 parameter instead of a config file name. Check for a bundled
14092 config file for that assembly by calling
14093 mono_config_string_for_assembly_file() (see below) before looking
14094 for one in the file system.
14095 (get_runtimes_from_exe): Corrsponding change to call of
14096 app_config_parse().
14097 (get_runtimes_from_exe): Check for bundled assembly exe file first
14098 by calling mono_assembly_open_from_bundle(). If no bundled
14099 assembly exe file is found, call mono_image_open() as before to
14100 look it up in the file system.
14102 * mono-config.c: Add variable bundled_machinec_onfig.
14103 (mono_config_string_for_assembly_file): New function.
14104 (mono_config_for_assembly): Move code snippet that looks for a
14105 bundled assembly .config file into the above new function. Call
14107 (mono_register_machine_config, mono_get_machine_config): New
14108 functions to set and retrieve
14110 * assembly.h: Declare mono_register_machine_config().
14112 * mono-config.h: Declare mono_get_machine_config() and
14113 mono_config_string_for_assembly_file().
14115 * icall.c: No declaration of environ necessary on Win32. It is
14116 declared (as a macro expanding to a function call) in stdlib.h.
14117 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
14118 New internal mono function. Returns the value of
14119 mono_get_machine_config() as a Mono string.
14121 * icall-def.h: Add get_bundled_machine_config().
14123 2007-01-04 Raja R Harinath <rharinath@novell.com>
14125 Remove redundant field
14126 * class-internals.h (_MonoGenericContext.container): Remove field.
14127 * loader.c (mono_method_get_signature_full): Don't parse a
14128 "container" for a signature parse when the signature is inflated
14130 (method_from_methodspec): Likewise, for a generic_inst.
14131 * class.c, metadata.c, reflection.c: Update to changes.
14133 2006-01-04 Raja R Harinath <rharinath@novell.com>
14135 * class-internals.h (_MonoGenericClass): Rename 'context' field to
14136 'cached_context', and change semantics -- it starts off NULL, and
14137 is initialized on demand.
14138 * class.c (mono_generic_class_get_context): New accessor to
14139 replace 'context' field accesses.
14140 (mono_class_get_context): New helper.
14141 (*): Update to changes.
14142 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
14144 2007-01-03 Miguel de Icaza <miguel@novell.com>
14146 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
14147 before the memcpy. Fixes Marshal2 regression.
14149 2007-01-02 Jb Evain <jbevain@gmail.com>
14151 * blob.h: add a MONO_TYPE_ENUM definition
14152 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
14153 fix the encoding of arrays of enums in custom attributes.
14157 2007-01-01 Miguel de Icaza <miguel@novell.com>
14159 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
14160 string is null terminated, but only cut the string short if it
14161 overflows the buffer.
14163 (mono_string_to_byvalstr): Also fix this routine. The code here
14164 was not properly terminating a string (it was only terminated
14165 because of the previous catch-all memset).
14167 I left the memset, because I do not know if applications expect
14168 the runtime to clear this region.
14172 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
14173 Clear the error before returning to unmanaged code to prevent the
14174 runtime from being confused later on (fixes 80420).
14175 (ves_icall_type_from_name): Always call mono_loader_clear_error
14176 after parsing a type that could have failed.
14177 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
14179 * loader.c (mono_loader_clear_error): Fix indentation.
14181 2006-12-28 Martin Baulig <martin@ximian.com>
14183 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
14185 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14187 * reflection.c: patch from Rolf Bjarne Kvinge to fix
14188 getting a token for an EnumBuilder.
14190 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
14192 * reflection.c: be more careful in case resource generation
14193 fails to create the data array.
14195 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14197 * sgen-gc.c: write barrier for clone and fix unregister handles.
14199 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14201 * reflection.c: some fixes needed in the generics code for the moving GC.
14203 2006-12-22 Robert Jordan <robertj@gmx.net>
14205 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
14206 account. Fixes bug #80299.
14208 2006-12-21 Raja R Harinath <rharinath@novell.com>
14210 Fix WaitHandle usage in delegates.
14211 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
14212 * object.c (mono_wait_handle_new): Use the property set method to
14213 initialize the handle.
14214 (mono_wait_handle_get_handle): New.
14215 * threadpool.c (mono_async_invoke): Use it.
14216 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
14218 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
14220 2006-12-21 Jonathan Chambers <joncham@gmail.com>
14222 * marshal.c (emit_marshal): Call emit_marshal_variant and
14223 emit_marshal_com_interface when applicable.
14224 (emit_marshal_variant, emit_marshal_com_interface): Add
14225 methods for this case and remove if's from emit_marshal_object.
14227 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
14229 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
14231 2006-12-19 Jonathan Chambers <joncham@gmail.com>
14233 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
14234 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
14235 and GlobalFree on Windows. Remove FIXME.
14237 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14239 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
14240 implementation for managed objects.
14242 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
14244 * object.c: implemented code to be used for checking
14245 that no reference field overlaps with non-references.
14247 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14249 * threadpool.c: fix queue code to be compatible with the
14252 2006-12-18 Miguel de Icaza <miguel@novell.com>
14254 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
14255 in structures by throwing ArgumentNullException.
14257 (emit_marshal_safehandle): Also when they are null parameters.
14259 (emit_marshal_safehandle): Add support for ref
14260 SafeHandles parameters
14262 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14264 * profiler.c: updated to use the mono-dl API instead of
14267 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14269 * profiler.c: updated to use the mono-dl dynamic loading
14270 API instead of gmodule.
14272 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14274 * profiler.c: use readlink, older versions of glib don't have
14275 g_file_read_link ().
14277 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14279 * profiler.c: try to detect the path to mono if libc fails to provide
14280 a useful name (bug #80286).
14282 2006-12-16 Raja R Harinath <rharinath@novell.com>
14285 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
14286 instance, use the generic type definition instead.
14287 (ves_icall_Type_GetNestedTypes): Likewise.
14288 * class.c (mono_class_create_generic): Always set the
14289 nested_classes of a generic instance to NULL, even if the generic
14290 type definition has nested types.
14292 2006-12-15 Jonathan Chambers <joncham@gmail.com>
14294 * marshal.c (mono_string_from_bstr): Revert previous Windows change
14297 2006-12-15 Miguel de Icaza <miguel@novell.com>
14299 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
14300 my arguments were in the wrong order. I also fixed the Windows
14301 version which seems to have had the same issue.
14303 (mono_free_bstr): On Unix, this is g_free.
14304 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
14305 conversions (for the tests in corlib to pass).
14307 2006-12-14 Miguel de Icaza <miguel@novell.com>
14309 * marshal.c (emit_ptr_to_object_conv): For now, ignore
14310 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
14311 exception if a ref SafeHandle in a struct has changed).
14313 (emit_struct_conv): Do not perform layout checks for classes
14314 derived from SafeHandle, as those are specially handled.
14316 (emit_object_to_ptr_conv): Add support for
14317 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
14319 (emit_marshal_safehandle): Implement conversion of return values
14320 of safehandles (MARSHAL_ACTION_CONV_RESULT).
14322 * threads.c: WaitHandle now is compiled with two different handles
14323 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
14326 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
14327 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
14328 these routines to cope with both kinds of fields.
14330 2006-12-12 Miguel de Icaza <miguel@novell.com>
14332 * metadata.c (mono_type_to_unmanaged): Handle the case where
14333 type->data.klass is a SafeHandle, and in that case, return the
14334 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
14335 MONO_MARSHAL_CONV_SAFEHANDLE.
14337 2006-12-11 Miguel de Icaza <miguel@novell.com>
14339 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
14340 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
14341 calling emit_marshal_object.
14343 (emit_marshal_safehandle): Implement marshalling of
14344 SafeHandle parameters (no ref support yet).
14346 (MarshalAction): Document the defines as I implement
14347 them for SafeHandle.
14349 (emit_marshal_object): indentation police.
14351 * class-internals.h: Define MonoSafeHandle.
14352 Add safehandle_class to MonoDefaults type.
14354 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
14355 list of classes to check for fields.
14357 * domain.c (mono_init_internal): Add SafeHandle to the list of
14358 mono_defaults loaded.
14360 2006-12-15 Raja R Harinath <rharinath@novell.com>
14363 * reflection.c (mono_reflection_bind_generic_parameters): If the
14364 generic type definition is a type builder, ensure that it is fully
14365 initialized before instantiating it. Kill some dead code.
14367 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14369 * object.c: clear the loader_error () before loading
14370 more metadata stuff (bug #80258).
14372 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
14374 * icall.c, icall-defs.h: type modifiers icalls for
14375 parameters and properties.
14377 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
14379 * object.c, icall.c: fixed warnings.
14381 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14383 * marshal.c: fixed a couple of leaks and coding style in a few places.
14385 2006-12-08 Dick Porter <dick@ximian.com>
14387 * process.c: Cope with NULL ProcessStartInfo arguments on windows
14388 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
14391 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14393 * process.c: ProcessStartInfo may have only filename set and
14394 arguments can be NULL.
14396 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14398 * icall.c: fix leak found by Robert Jordan.
14400 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14402 * marshal.c, marshal.h: generate managed method to access an element
14403 of a multi-dimensional array.
14405 2006-11-30 Paolo Molaro (lupus@ximian.com)
14407 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
14409 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14411 * icall.c: back out GetFields () fix until the serialization code is
14412 fixed to not depend on the incorrect behaviour.
14414 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14416 * profiler.c: provide defaults if none are set.
14418 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14420 * Makefile.am, attrdefs.h: new public header file with
14421 constants for attributes for use by embedders.
14423 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14425 * icall.c: GetFields () fix for bug #80064.
14427 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
14429 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
14430 removed long unused icalls.
14432 2006-11-27 Jonathan Chambers <joncham@gmail.com>
14435 (mono_marshal_emit_managed_wrapper): Level of indirection for
14436 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
14437 can be generated without a delegate class.
14438 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
14440 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14442 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14444 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
14447 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
14449 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
14450 icall-def.h: added icalls needed by System.GC.
14452 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
14454 * loader.c: ensure the class in catch clauses is handled
14455 correctly for generics methods (fixes bug#79980).
14457 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
14459 * monitor.h, monitor.c: added mono_locks_dump () function
14460 to help debug deadlocks involving managed locks.
14462 2006-11-13 Dick Porter <dick@ximian.com>
14464 * file-io.c (get_file_attributes): If the file is a symlink try
14465 and get the stat data for the target, but also add the
14466 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
14467 the specs for the windows symlink support, but will probably have
14468 to be reworked when I have test data from a vista machine. Fixes
14471 2006-11-13 Dick Porter <dick@ximian.com>
14473 * gc.c (mono_domain_finalize):
14474 * marshal.c (mono_delegate_begin_invoke):
14475 * threadpool.c (socket_io_init, mono_thread_pool_init)
14476 (mono_thread_pool_finish):
14477 * monitor.c (mono_monitor_try_enter_internal):
14478 * threads.c (mono_thread_resume, mono_thread_init)
14479 (mono_thread_suspend_all_other_threads)
14480 (mono_thread_execute_interruption):
14481 * appdomain.c (mono_domain_unload): Check for NULL error returns
14482 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
14485 2006-11-11 Miguel de Icaza <miguel@novell.com>
14488 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
14489 Only close the handle if the value of the handle is not
14490 INVALID_HANDLE_VALUE. This just makes the process a bit more
14493 Improvement for #75733, so that we do not run into this problem.
14496 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
14497 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
14498 internal variables. Fixes #79462
14501 2006-11-09 Dick Porter <dick@ximian.com>
14503 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14504 Use poll() not select(). Fixes bug 79397.
14506 2006-11-09 Raja R Harinath <rharinath@novell.com>
14509 * assembly.c (mono_assembly_load_from_full): Check that the given
14510 image has an assembly manifest.
14512 2006-11-09 Ankit Jain <jankit@novell.com>
14514 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
14515 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
14516 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
14518 2006-11-07 Dick Porter <dick@ximian.com>
14520 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
14521 Put the old resolver behaviour back for pre-2.0 profiles.
14523 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
14525 * threadpool.c: precise GC and locking fixes.
14527 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14529 * class.c: don't load types that have an explicit unaligned
14530 managed reference. Provide better info in the TypeLoad exception.
14531 Part of the fix for bug #79744.
14532 * object.c: use the correct check for class type load issues.
14534 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
14536 * class.c: enforce alignment of fields with managed references
14537 even when Pack=1 is forced by the user (bug #77788).
14539 2006-11-03 Dick Porter <dick@ximian.com>
14541 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
14542 If the address reverse lookup fails, return it as the hostname
14543 anyway. Fixes bug 79721.
14545 2006-11-03 Dick Porter <dick@ximian.com>
14547 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
14548 Fix build on Windows.
14550 2006-11-02 Dick Porter <dick@ximian.com>
14553 * object-internals.h:
14554 * exception.c (mono_get_exception_thread_interrupted):
14555 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
14558 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
14559 Check for pending Thread.Interrupt.
14561 2006-10-27 Massimiliano Mantione <massi@ximian.com>
14562 * loader.c: Fixed bug 79684.
14564 2006-10-27 Dick Porter <dick@ximian.com>
14566 * file-io.c (get_file_attributes): Force symlinks to directories
14567 to be returned as a regular file. Fixes bug 79733.
14568 2006-10-26 Dick Porter <dick@ximian.com>
14570 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
14571 CreateFile to open a directory then we need to set the
14572 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
14574 2006-10-23 Zoltan Varga <vargaz@gmail.com>
14576 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
14579 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14581 * sgengc.c: small cleanup of timer code.
14583 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14585 * sgen-gc.c: fix some warnings and start adding support for
14586 complete object removal on domain unload.
14588 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
14590 * assembly.c: build_assembly_name should not consider a version
14591 number without build or revision number invalid. Fixes bug #79715.
14593 2006-10-18 Jonathan Chambers <joncham@gmail.com>
14595 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
14596 call kernel32 function OutputDebugString directly.
14598 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14600 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
14602 * reflection.c: small cleanup, using a function to insert a MonoString
14603 in the string heap.
14605 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
14607 * reflection.c: moving GC fixes.
14609 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
14611 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
14612 all the objects with finalizers belonging to an unloading appdomain.
14614 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
14616 * sgen-gc.c: added ability to allocate even when the nursery is fully
14617 pinned and fixed a couple of bugs.
14619 2006-10-15 Zoltan Varga <vargaz@gmail.com>
14621 * threads.h: Revert the last change for now.
14623 * threads.h (mono_thread_get_pending_exception): Rename this to
14624 mono_thread_get_undeniable_exception ().
14626 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
14628 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
14629 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
14630 when fname does not refer to valid assembly. This result in a more
14631 meaningful error message.
14632 * exception.c: added mono_get_exception_bad_image_format2 which
14633 constructs a BadImageFormatException using the ctor taking a custom
14634 message and the file name. Passing in a NULL msg results in a default
14636 * exception.h: define mono_get_exception_bad_image_format2 function.
14637 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
14638 when file name pointed to an invalid IL image. Use
14639 mono_get_exception_file_not_found2 to construct FileNotFoundException,
14640 as this results in a more meaningful error message.
14642 2006-10-15 Zoltan Varga <vargaz@gmail.com>
14644 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
14647 2006-10-12 Zoltan Varga <vargaz@gmail.com>
14649 * metadata.c (mono_type_size): Change the align parameter to guint32 for
14650 consistency with the other _size functions.
14651 (mono_type_stack_size): Ditto.
14653 * class.c object.c icall.c: Fix warnings caused by the above change.
14655 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
14657 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
14659 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
14661 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
14663 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
14664 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
14665 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
14666 threadpool.h, threads-types.h: mark more internal functions.
14668 2006-10-11 Dick Porter <dick@ximian.com>
14670 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14671 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
14672 reproduce the bug even before applying the fix.)
14674 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
14676 * reflection.c: allow retrieving attributes for arguments in generic
14677 methods (bug #79241).
14679 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
14681 * debug-mono-symfile.c: properly check fopen () result (found by
14684 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
14686 * reflection.c: make error message clearer and fixed two
14687 issuelets found by Coverity.
14689 2006-10-10 Zoltan Varga <vargaz@gmail.com>
14691 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
14693 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
14695 * object-internals.h, gc-internal.h, profiler-private.h:
14696 mark internal functions.
14698 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14700 * reflection.c: put data in the text section.
14701 * icall.c: recognize more types in type_from_typename ().
14702 * process.c, marshal.c: added some GC FIXMEs.
14704 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14706 * loader.c: check for NULL before initializing.
14708 2006-10-09 Zoltan Varga <vargaz@gmail.com>
14710 * gc.c (finalizer_thread): Use a non-alertable wait here.
14712 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
14713 until the correct solution is found.
14715 2006-10-06 Zoltan Varga <vargaz@gmail.com>
14717 * reflection.c (mono_module_get_object): Avoid an assert when operating on
14718 modules with no metadata. Fixes #79596.
14720 * image.c (load_metadata_ptrs): Put back the error message when
14721 the #- heap is encountered since the support is not complete yet.
14723 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14725 * gc.c: do not allow the user to SuppressFinalize () a
14726 delegate because it would leak the trampoline if present.
14728 2006-10-06 Zoltan Varga <vargaz@gmail.com>
14730 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
14733 2006-10-05 Zoltan Varga <vargaz@gmail.com>
14735 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
14737 * metadata.c (mono_metadata_get_param_attrs): Ditto.
14739 * row-indexes.h: Add definitions for *Ptr tables.
14741 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
14743 * metadata.c (mono_metadata_translate_token_index): New helper function to
14744 translate table indexes used in uncompressed metadata.
14745 (mono_metadata_decode_table_row): Ditto.
14746 (mono_metadata_decode_table_row_col): Ditto.
14748 * metadata.c: Add table schema for *Ptr tables.
14750 * class.c loader.c: Use the new helper function to access the affected metadata
14753 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
14756 2006-10-04 Zoltan Varga <vargaz@gmail.com>
14758 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
14759 sequences which can be unbounded in size. Fixes #79583.
14761 2006-10-02 Zoltan Varga <vargaz@gmail.com>
14763 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
14764 static initialization.
14766 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
14768 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
14770 * domain.c (mono_domain_free): Free up type_init_exception_hash.
14772 * object.c (mono_runtime_class_init): Implement correct semantics when a static
14773 ctor fails, i.e. throw the same exception on subsequent accesses.
14775 2006-09-0 Jonathan Chambers <joncham@gmail.com>
14777 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
14778 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
14779 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
14780 Handle marshalling of interfaces and VARIANTs contained in structs.
14782 Code is contributed under MIT/X11 license.
14784 2006-09-30 Zoltan Varga <vargaz@gmail.com>
14786 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
14788 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
14791 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14793 * console-io.c: ignore previous SIGINT handler.
14795 2006-09-27 Zoltan Varga <vargaz@gmail.com>
14797 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
14798 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
14799 #79460, #79461, #79485.
14801 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
14803 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
14806 2006-09-26 Zoltan Varga <vargaz@gmail.com>
14808 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
14809 could be generated from it.
14811 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
14813 * rand.c: fix read loop to correctly handle EINTR.
14815 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14817 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
14818 internal calls are defined to keep methods closer to the declaring
14819 type and allow a significant reduction in runtime relocations and
14822 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
14824 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
14825 exception message to have FileNotFoundException use the default
14826 assembly load error message. Fixes bug #79426.
14827 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
14829 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14831 * threadpool.c: (start_thread_or_queue) use the root domain when
14832 creating the thread instead of the async object one.
14834 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
14836 * class.c, object.c, class-internals.h, reflection.c:
14837 for arrays, store element_size inside MonoClass (speedup
14838 for array object creation).
14840 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
14842 * icall.c: fixed CodeBase to use the file name and not the module
14845 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14847 * mono-debug.c, mono-debug.h: export find_method as
14848 mono_debug_find_method ().
14850 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14852 * debug-helpers.c, class-internals.h: added a few functions useful
14853 when debugging under gdb.
14855 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14857 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
14858 characters that need special handling.
14860 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
14862 * mono-config.c: make the os/cpu specification more flexible,
14863 allowing lists and negation.
14865 2006-09-18 Jonathan Chambers <joncham@gmail.com>
14867 * marshal.c: COM Interop fixes. Handle case where method->klass.
14868 is interface. Handle BSTR/MonoString when null. Use CDECL as
14869 calling convention on non-windows platforms. This is for
14870 compatibility with XPCOM and MainWin COM.
14872 Code is contributed under MIT/X11 license.
14875 2006-09-18 Zoltan Varga <vargaz@gmail.com>
14877 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
14878 correctly. Fixes #79217.
14880 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
14882 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
14884 * mono-config.c: allow both an os and cpu attribute for dllmap
14885 and dllentry elemnets to enable a single config file to be used
14886 for multiple architectures.
14888 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
14890 * loader.c: MonoLoaderError was cleared too soon on load failure.
14893 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
14895 * icall.c: use the defining class vtable when accessing a
14896 static field, not a pobblibly derived class.
14898 2006-09-17 Zoltan Varga <vargaz@gmail.com>
14900 * icall.c string-icalls.c: Remove references to unicode.h.
14902 * unicode.h unicode.c Makefile.am: Remove these unused source files.
14904 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
14906 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
14907 indicating the image where custom marshaller types should be looked up.
14908 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
14909 custom marshallers, instead of corlib. Fixes #79425.
14911 2006-09-14 Zoltan Varga <vargaz@gmail.com>
14913 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
14915 2006-09-14 Jonathan Chambers <joncham@gmail.com>
14917 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
14918 Implement Environment.ProcessorCount.
14920 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
14921 Implement Environment.ProcessorCount.
14924 Add Environment.ProcessorCount icall.
14926 Patch by Jason McFall.
14928 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14930 * assembly.c: don't append .exe/.dll when the filename already contains
14931 one of those extensions.
14933 2006-09-12 Martin Baulig <martin@ximian.com>
14935 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
14936 to array interfaces.
14938 2006-09-11 Martin Baulig <martin@ximian.com>
14940 * reflection.c (mono_image_build_metadata): Create the
14941 MethodImpl's after emitting all types and methods, so we don't
14942 need another fixup pass for them.
14944 2006-09-11 Zoltan Varga <vargaz@gmail.com>
14946 * class.c (mono_class_from_name_case): Fix regression introduced by the last
14949 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
14951 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
14954 2006-09-10 Zoltan Varga <vargaz@gmail.com>
14956 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
14957 args is not set. Fixes #78926.
14959 2006-09-08 Zoltan Varga <vargaz@gmail.com>
14961 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
14963 * image.c (load_class_names): Move this to class.c, and rename it to
14964 'mono_image_init_name_cache'.
14965 (load_modules): Fix a warning.
14967 * class.c icall.c image.c: Initialize image->name_cache lazily.
14969 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
14970 on its name using information in the AOT file.
14972 * class.c (mono_class_from_name): Use the new hook function.
14974 2006-09-06 Zoltan Varga <vargaz@gmail.com>
14976 * reflection.c (mono_param_get_objects): Handle enum default parameter values
14979 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
14982 2006-09-06 Martin Baulig <martin@ximian.com>
14984 * icall.c (mono_lookup_internal_call): Small fix.
14986 2006-09-05 Raja R Harinath <rharinath@novell.com>
14988 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
14991 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
14993 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
14994 when --debug is specified.
14996 2006-09-04 Zoltan Varga <vargaz@gmail.com>
14998 * class.c (setup_generic_array_ifaces): Fix a warning.
15000 2006-09-04 Miguel de Icaza <miguel@novell.com>
15002 * Temporarily remove the patch to assemly.c that checks the
15003 assembly versions as it breaks our gacutil.
15005 2006-09-03 Zoltan Varga <vargaz@gmail.com>
15007 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
15009 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
15012 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
15013 created using the default ctor. Fixes #79152.
15014 (mono_string_builder_to_utf16): Ditto.
15016 2006-09-01 Martin Baulig <martin@ximian.com>
15018 Fix handling of the generic array interfaces.
15020 * class-internals.h
15021 (MonoDefaults): Removed `generic_array_class' and added
15022 `generic_ilist' class.
15025 (mono_bounded_array_class_get): Add the new generic array interfaces.
15026 (setup_generic_array_ifaces): New static method; create vtable
15027 entries for each method in the generic array interfaces.
15030 (select_container): Allow "parent-less" generic methods.
15033 (mono_marshal_get_generic_array_helper): New public method.
15036 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
15037 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
15038 moved the interncall into System.Array.
15040 2006-09-01 Raja R Harinath <rharinath@novell.com>
15042 A few more cases of avoiding work on types with ->byref set.
15043 Has the real fix for #79238
15044 * icall.c (is_generic_parameter): New helper.
15045 (ves_icall_Type_GetGenericParameterPosition): Use it.
15046 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
15047 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
15048 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
15049 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
15051 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
15053 (ves_icall_Type_get_IsGenericInstance): Likewise.
15054 (ves_icall_Type_get_IsGenericType): Likewise.
15056 2006-09-01 Zoltan Varga <vargaz@gmail.com>
15058 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
15061 * mempool.h (mono_mempool_get_allocated): New helper function.
15063 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
15066 * mempool.c: Fix warnings and the calculation of stats.
15068 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
15070 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
15072 * loader.c (mono_get_method_from_token): Update method_count stat.
15074 * class-internals.h (MonoStats): Add some stats.
15076 2006-08-31 Robert Jordan <robertj@gmx.net>
15078 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
15079 with managed variants.
15080 All code is contributed under the MIT/X11 license.
15082 2006-08-31 Zoltan Varga <vargaz@gmail.com>
15084 * reflection.c (reflection_methodbuilder_to_mono_method): Set
15085 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
15087 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
15089 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
15090 with cycles in classes.
15092 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
15094 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
15095 missing a [MarshalAs] directive. Fixes #79203.
15097 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
15098 klass->marshal_info. Fixes #79217.
15100 2006-08-30 Martin Baulig <martin@ximian.com>
15102 Committing a patch from Joachim Ante <joe@otee.dk>:
15103 Add support for binary data symbol stores.
15105 * debug-mono-symfile.c
15106 (mono_debug_open_mono_symbol_file): Renamed into
15107 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
15111 (mono_debug_open_image): Added `raw_contents' and `size' args.
15112 (mono_debug_init_2_memory): New public function.
15114 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
15116 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
15118 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15120 * appdomain.c: implement support for ShadowCopyFiles.
15122 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
15124 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
15125 when value is NULL (and should remove CID #51).
15127 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15129 * image.c: moved 2 functions to ../utils.
15131 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
15133 * gc.c: cope with the target object of a GC handle being NULL
15136 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
15138 * class.c: recursively check parent's explicit implementations
15139 of interface methods (fixes bug #79125).
15141 2006-08-19 Miguel de Icaza <miguel@novell.com>
15143 * filewatcher.c: Avoid warnings when building, do not redefine
15144 constants that are defined.
15148 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15150 * image.c: don't fail when the link points to an absolute path.
15152 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
15154 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
15157 2006-08-17 Miguel de Icaza <miguel@novell.com>
15159 * image.c (full_path): A new method used to obtain the actual path
15160 of an assembly even in the presence of symbolic links.
15162 This is necessary for the case where we are running a binary that
15163 has been GACed, but we are using the "published" path name
15164 ($prefix/mono/1.0/blah.exe) which happens to point to the real
15167 This was the source of the failure for the `xsp' command with the
15168 recent AppDomain changes, as far as the runtime was concerned,
15169 there were two different assemblies: $prefix/mono/1.0/blah.exe and
15170 $prefix/mono/gac/blah/version/blah.exe.
15172 (do_mono_image_open): use full path
15174 2006-08-17 Zoltan Varga <vargaz@gmail.com>
15176 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
15178 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
15180 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
15181 domain_id is supplied. Fix CID #241 and corlib's unit tests.
15183 2006-08-17 Zoltan Varga <vargaz@gmail.com>
15185 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
15186 small structures. Fixes #78990.
15188 2006-08-17 Zoltan Varga <vargaz@gmail.com>
15190 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
15192 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
15194 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15197 * marshal.c: don't load all the assemblies from a domain into newly
15198 created ones. The new domains might have different rules and load
15199 assemblies from different locations. Fixes bug #76757.
15201 Patch by Lluis. Conflicts resolved by Brian Crowell.
15203 2006-08-16 Alp Toker <alp@atoker.com>
15205 * socket-io.c: First half of the fix for #79084.
15206 Set sa_size to the length of the content, not that of the struct.
15207 Don't add NULL suffix to the content, this should be done in
15208 managed code if needed.
15210 2006-08-14 Raja R Harinath <rharinath@novell.com>
15213 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
15214 mono_metadata_parse_type returns NULL.
15216 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
15218 * normalization-tables.h : new file for string normalization data.
15219 * locales.c, locales.h, icall.c :
15220 added load_normalization_resource() for string normalization,
15222 * Makefile.am : added normalization-tables.h to the sources.
15224 2006-08-13 Zoltan Varga <vargaz@gmail.com>
15226 * marshal.c: Add more helper functions to reduce code duplication and use them
15229 2006-08-12 Zoltan Varga <vargaz@gmail.com>
15231 * marshal.c: Fix non-x86 stdcall warnings.
15233 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
15236 2006-08-11 Jonathan Chambers <joncham@gmail.com>
15238 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
15239 type check on multi-dimensional arrays. Fixes #79000.
15241 2006-08-10 Jonathan Chambers <joncham@gmail.com>
15243 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
15244 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
15245 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
15246 * class-internals.h: add is_com_object to class structure.
15247 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
15248 null checks to COM object marshalling. Fix .ctor call on RCW.
15249 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
15251 All code is contributed under the MIT/X11 license.
15253 2006-08-09 Dick Porter <dick@ximian.com>
15255 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
15256 racing mono_monitor_allocator_lock() somewhere, so don't delete
15257 the critical section for now. Found by running and exiting
15260 2006-08-10 Zoltan Varga <vargaz@gmail.com>
15262 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
15263 (ves_icall_System_ComObject_FindInterface): Ditto.
15264 (ves_icall_System_ComObject_CacheInterface): Ditto.
15266 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
15267 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
15269 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15271 * threadpool.c: treat pipes from process asynchronous reads as sockets
15272 when reading from them, so we get select/poll or epoll to wait for
15275 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
15277 * loader.c: Fix a typo (CID #233) in the null check.
15279 2006-08-07 Zoltan Varga <vargaz@gmail.com>
15281 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
15282 Hopefully fixes #78949.
15284 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
15285 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
15286 bytes. Fixes #78972.
15288 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15290 * filewatcher.c: we need to set errno here.
15292 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15294 * filewatcher.c: let Win32Exception get the error value.
15296 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15298 * filewatcher.c: translate errno into win32 errors for Win32Exception
15299 to know what happened.
15301 2006-08-01 Zoltan Varga <vargaz@gmail.com>
15303 * threadpool.c: Fix more warnings.
15305 * assembly.c (search_loaded): Fix warnings.
15307 * threadpool.c (mono_thread_pool_finish): Fix warnings.
15308 (mono_async_invoke): Ditto.
15310 2006-07-28 Jonathan Chambers <joncham@gmail.com>
15312 * object.c (mono_remote_class_vtable): Need to create proxy vtable
15313 entries for __ComObject type in addition to ComImport types.
15314 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
15317 All code is contributed under the MIT/X11 license.
15319 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
15321 * image.c: avoid tentative loading of modulerefs that contain
15322 no metadata (P/Invoke library names).
15324 2006-07-28 Dick Porter <dick@ximian.com>
15326 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
15327 mono_loader_lock() somewhere, so don't delete the critical section
15328 for now. Found by running and exiting monodevelop.
15330 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15332 * filewatcher.c: define the inotify syscalls when we're building on
15333 linux and have sys/syscall.h. The build system might not have support
15334 for inotify but the target system might have it.
15336 2006-07-26 Miguel de Icaza <miguel@novell.com>
15338 * domain.c: Documentation updates.
15340 * loader.c (mono_free_method): Do not release the method
15341 information if we are being profiled, as profilers will use this
15342 information at shut down to present some data to the user.
15344 This is needed so that the profiler does not crash, as the
15345 profiler tends to keep MonoMethods around, and they might become
15346 invalid if we free these.
15348 (mono_get_method_constrained): Return the original CIL stream
15349 method as well, so verification can be performed against it.
15351 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15353 * filewatcher.[ch]: support for inotify file system watcher.
15354 * icall.c: add new internal calls for the inotify file system watcher.
15356 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15358 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
15361 2006-07-20 Dick Porter <dick@ximian.com>
15363 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
15366 2006-07-20 Dick Porter <dick@ximian.com>
15368 * threads.c (start_wrapper): Do the thread cleanup while we still
15369 hold a reference to its object. Fixes bug 78123.
15371 2006-07-18 Kornél Pál <kornelpal@gmail.com>
15373 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
15374 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
15375 "managed-to-managed".
15376 * icall.c: Redirect string constructors that take sbyte* to
15377 ves_icall_System_String_ctor_RedirectToCreateString.
15378 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
15379 to CreateString () methods with matching signature.
15380 * reflection.c: Use original security informations for
15381 MONO_WRAPPER_MANAGED_TO_MANAGED.
15382 * security-manager.c: Use original security informations for
15383 MONO_WRAPPER_MANAGED_TO_MANAGED.
15384 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
15385 that is a placeholder and only its address should be used.
15386 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
15387 that is a placeholder and only its address should be used.
15389 2006-07-15 Jonathan Chambers <joncham@gmail.com>
15391 Begin implementing COM Interop.
15392 * appdomain.c: Increment corlib version.
15393 * class.c: Set ComImport classes' parent to __ComObject.
15394 * loader.c: Mark cominterop methods as such.
15395 * domain.c: Add __ComObject class to MonoDefaults structure.
15396 * image.c: Add 2 hashtables to the image for COM Interop related methods
15397 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
15398 using the mempool allocator
15400 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
15401 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
15402 declaration for mono_metadata_type_dup_mp.
15404 * debug-helpers.c: Added strings for two additional wrapper types
15405 * object.c: Create proxy objects for ComImport classes
15406 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
15407 and added __ComObject class to MonoDefaults structure.
15409 * object-internals.h: Finish MonoRealProxy definition, and add definition of
15410 MonoComInteropProxy and MonoComObject.
15412 * marshal.c: Added support for COM Interop
15413 (signature_cominterop): Converts managed signature to corresponding
15414 unmanaged COM signature.
15415 (cominterop_get_function_pointer): gets unmanaged function pointer via
15417 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
15418 (cominterop_get_method_interface): returns interface type that method is defined on
15419 (mono_mb_emit_cominterop_call): emits native call to function pointer
15421 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
15422 that matches signature of unmanaged function.
15423 (cominterop_get_native_wrapper): wrapper around adjusted method call.
15424 (cominterop_get_invoke): forwards call from proxy to __ComObject
15425 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
15426 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
15427 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
15429 * marshal.h: Added Marshal icall declarations.
15430 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
15431 so we can access them in finalizer
15433 2006-07-14 Dick Porter <dick@ximian.com>
15435 * object.c (mono_type_initialization_cleanup): Fix a race
15436 condition by temporarily commenting out the critical section
15439 2006-07-14 Zoltan Varga <vargaz@gmail.com>
15441 * reflection.c (create_custom_attr): Fix some warnings.
15442 (create_custom_attr_data): Ditto.
15443 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
15444 types. Fixes #78855.
15446 2006-07-11 Zoltan Varga <vargaz@gmail.com>
15448 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
15450 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
15452 2006-07-08 Zoltan Varga <vargaz@gmail.com>
15454 * reflection.c (resolve_object): Add support for DynamicMethod.
15456 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
15457 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
15459 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
15461 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
15462 don't leak GPtrArray's pdata has we have no use (nor free) for it.
15464 2006-07-01 Zoltan Varga <vargaz@gmail.com>
15466 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
15469 2006-06-30 Raja R Harinath <rharinath@novell.com>
15471 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
15472 slightly: remove a shadow local variable.
15474 2006-06-29 Raja R Harinath <rharinath@novell.com>
15476 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
15477 definition that introduces the virtual function slot.
15478 Also fix Coverity #105.
15480 2006-06-29 Zoltan Varga <vargaz@gmail.com>
15482 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
15483 for dynamic assemblies. Fixes #78724.
15485 2006-06-28 Zoltan Varga <vargaz@gmail.com>
15487 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
15490 2006-06-21 Martin Baulig <martin@ximian.com>
15493 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
15496 2006-06-21 Zoltan Varga <vargaz@gmail.com>
15498 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
15500 2006-06-20 Raja R Harinath <rharinath@novell.com>
15502 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
15504 * class.c (mono_class_create_from_typespec): Add 'context' argument.
15505 Inflate result if necessary.
15506 (mono_class_get_full): Remove old version. Rename from
15507 'mono_class_get' and add 'context' argument. Pass it to
15508 ..._create_from_typespec.
15509 (mono_class_get): New. Simple wrapper to mono_class_get_full.
15510 (mono_ldtoken): Revert change below.
15512 2006-06-20 Martin Baulig <martin@ximian.com>
15514 * class.c (mono_ldtoken): Don't pass the generic context to
15515 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
15517 2006-06-15 Zoltan Varga <vargaz@gmail.com>
15519 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
15520 and later freeing it. Fixes #78638.
15522 2006-06-15 Miguel de Icaza <miguel@novell.com>
15524 * icall.c (mono_class_get_throw): Revert over-zealous error
15525 throwing, the caller for mono_class_get_throw will cope with
15526 errors when classes are not properly initialized already.
15528 The code still copes with loader exceptions though.
15530 Fixes the regression in reftype1 and reftype3 from the CAS tests.
15532 2006-06-14 Miguel de Icaza <miguel@novell.com>
15534 Fixes the `make run1' version of RuntimeAbort (to be commited,
15535 source is in Bugzilla).
15537 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
15538 FALSE on class loading failure instead of returning true.
15540 * class.c (mono_class_create_from_typedef): It is possible for
15541 mono_metadata_interfaces_from_typedef_full to fail if a class is
15542 not found, cope with this.
15545 2006-06-14 Dick Porter <dick@ximian.com>
15548 * process.c: Fix a bunch of signed/unsigned warnings from gcc
15551 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
15553 * culture-info-table.h : oops, forgot to make it nsync with r61548.
15555 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
15557 * icall.c: Another fix for building mono in Visual Studio.
15559 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
15561 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
15563 2006-06-09 Martin Baulig <martin@ximian.com>
15565 * debug-mono-symfile.c: Put this back and really fix it this
15566 time. Sorry for all the trouble.
15568 2006-06-08 Zoltan Varga <vargaz@gmail.com>
15570 * icall.c (mono_class_get_throw): Fix a warning.
15571 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
15572 ReflectionTypeLoadException if needed. Fixes #78606.
15574 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
15575 (mono_class_init): Ditto.
15577 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
15578 ref_only exceptions.
15579 (mono_loader_clear_error): Make this work even if there is no error.
15581 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
15583 * object-internals.h marshal.c marshal.h icall.c: Implement method
15584 Marshal.GetComSlotForMethodInfo using internal call.
15586 2006-06-07 Zoltan Varga <vargaz@gmail.com>
15588 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
15589 a function for signalling it.
15591 * class.c (mono_class_from_typeref): Use the new kind of loader error when
15592 a referenced assembly is not found.
15594 * loader.c (mono_loader_error_prepare_exception): Add support for
15595 LOADER_ERROR_ASSEMBLY. Fix formatting.
15597 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
15599 * domain.c appdomain.c class-internals.h marshal.c: Add support
15600 for VARIANT marshalling on windows and increment corlib version
15601 since Variant struct was added.
15603 2006-06-03 Miguel de Icaza <miguel@novell.com>
15605 * debug-mono-symfile.c: Revert Martin's previous patch which broke
15606 stack trace line information:
15608 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
15609 (Martin) when looking up B which is between A and C, return A not C.
15613 Thanks to Alexander Olk for tracking this down.
15615 2006-06-02 Zoltan Varga <vargaz@gmail.com>
15617 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
15619 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
15620 avoid clobbering its value.
15621 (mono_string_to_lpstr): Fix a warning on windows.
15623 2006-05-31 Zoltan Varga <vargaz@gmail.com>
15625 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
15627 * reflection.c loader.c: Removed references to 'dummy' flag.
15629 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
15631 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
15632 it gets GC tracking.
15634 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
15637 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
15639 * marshal.c threadpool.c: Update callers of mono_async_result_new.
15641 * appdomain.c: Bump corlib version.
15643 2006-05-30 Zoltan Varga <vargaz@gmail.com>
15645 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15646 CEE_STIND_REF when working with object references.
15648 2006-05-31 Zoltan Varga <vargaz@gmail.com>
15650 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
15653 2006-05-30 Miguel de Icaza <miguel@novell.com>
15655 * loader.c (method_from_memberref): Fix argument value for
15656 mono_loader_set_error_method_load (I was passing the MonoClass
15657 instead of the class name char *).
15659 2006-05-30 Zoltan Varga <vargaz@gmail.com>
15661 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15662 CEE_STIND_REF when working with object references.
15664 2006-05-30 Martin Baulig <martin@ximian.com>
15666 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
15667 mono_method_full_name() change and replace the ':' with a '.'
15670 2006-05-30 Martin Baulig <martin@ximian.com>
15672 * debug-mono-symfile.c
15673 (mono_debug_symfile_lookup_location): Fix the algorithm:
15674 when looking up B which is between A and C, return A not C.
15676 2006-05-29 Martin Baulig <martin@ximian.com>
15679 (MonoDebugMethodInfo): Make the typedef public.
15680 (MonoDebugSourceLocation): New public struct.
15683 (mono_debug_source_location_from_address): Removed.
15684 (mono_debug_source_location_from_il_offset): Removed.
15685 (mono_debug_il_offset_from_address): Removed.
15686 (mono_debug_address_from_il_offset): Removed.
15687 (mono_debug_lookup_method): New public function.
15688 (mono_debug_lookup_source_location): New public function; replaces
15689 the old mono_debug_source_location_from_*() functions; see the
15690 inline documentation.
15691 (mono_debug_free_source_location): New public function.
15692 (mono_debug_print_stack_frame): New public function; see the
15693 inline documentation.
15695 * debug-mono-symfile.c
15696 (mono_debug_find_source_location): Renamed into
15697 mono_debug_symfile_lookup_location(); only take a
15698 `MonoDebugMethodInfo *' and an `offset' argument; added inline
15700 (mono_debug_find_method): Renamed into
15701 mono_debug_symfile_lookup_method().
15703 2006-05-27 Zoltan Varga <vargaz@gmail.com>
15705 * assembly.c (mono_assembly_open_full): Dont overwrite the status
15706 returned by mono_image_open_full ().
15708 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
15709 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
15712 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
15715 2006-05-27 Miguel de Icaza <miguel@novell.com>
15717 * class.c (mono_class_from_typeref): handle missing images
15718 earlier, deals with bug #78418. Refactor code;
15720 Fix a warning introduced in my previous commit (some stale code
15721 from before I revisited my patch).
15723 * class.c (mono_class_create_from_typedef): On failure, remove the
15724 class from the MonoImage->class_cache as the class is not
15725 initialized; Fixes the leak pointed out by Paolo.
15727 2006-05-25 Dick Porter <dick@ximian.com>
15729 * threads.c (mono_thread_cleanup): Build fix. Comment out the
15730 DeleteCriticalSections until I figure out which one may still be
15731 sometimes locked when mono_thread_cleanup is called.
15733 2006-05-24 Dick Porter <dick@ximian.com>
15735 * threads.c (mono_thread_cleanup): Move the threading cleanup out
15736 of mono_thread_manage and back into its own function, so it can be
15737 called after the finalizer thread has finished.
15739 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
15741 2006-05-24 Zoltan Varga <vargaz@gmail.com>
15743 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
15746 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
15747 with non-blittable elements.
15748 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
15750 2006-05-24 Martin Baulig <martin@ximian.com>
15752 * mono-debug-debugger.h (MonoDebuggerEvent): Added
15753 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
15755 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
15756 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
15757 `mono_debugger_event_handler' to NULL.
15759 2006-05-24 Martin Baulig <martin@ximian.com>
15761 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
15763 2006-05-24 Martin Baulig <martin@ximian.com>
15765 * mono-debug-debugger.h
15766 (mono_debugger_create_notification_function): Added
15767 `MonoCodeManager *' argument.
15769 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
15771 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
15773 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
15775 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
15776 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
15779 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
15781 * icall.c: precise GC support: objects can't be stored in unmanaged
15782 memory anymore, even if they are kept alive by other references: since
15783 they can move the GC needs to be able to always find them.
15785 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15787 * object.c: precise GC support for static fields. Support
15788 for moving GCs: write barriers and pinned allocation for interned
15791 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
15793 * domain.c, domain-internals.h: precise GC support for the MonoDomain
15796 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
15798 * class.c, gc.c: sgen and precise GC updates.
15800 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
15802 * marshal.h, marshal.c: added write barrier wrapper and precise type
15805 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
15807 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
15810 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15812 * reflection.c: precise and sgen GC updates.
15814 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
15816 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
15818 2006-05-22 Zoltan Varga <vargaz@gmail.com>
15820 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
15822 2006-05-20 Zoltan Varga <vargaz@gmail.com>
15824 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
15825 MONO_TYPE_OBJECT. Fixes #78462.
15827 2006-05-18 Zoltan Varga <vargaz@gmail.com>
15829 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
15830 and blittable types.
15832 2006-05-17 Miguel de Icaza <miguel@novell.com>
15834 * class.c (mono_class_get_exception_for_failure): Implement parts
15835 of a TODO: if the loader error is set (instead of the class
15836 error), we return a Loader exception that can be properly thrown
15839 This was exposed by some Winforms 2.0 code that I tried to run
15840 (Atsushi pointed me to it).
15842 2006-05-17 Zoltan Varga <vargaz@gmail.com>
15844 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
15845 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
15847 * marshal.c (emit_marshal_vtype): Add limited support for
15848 UnmanagedType.LPStruct. Fixes #78427.
15850 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
15851 Applied a patch from kangaroo to fix #77523.
15853 2006-05-17 Martin Baulig <martin@ximian.com>
15856 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
15857 (debugger_thread_created): Removed.
15858 (debugger_thread_exited): Removed.
15860 2006-05-15 Zoltan Varga <vargaz@gmail.com>
15862 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15864 * object-internals.h (MonoReflectionResource): Sync with managed version.
15866 2006-05-12 Wade Berrier <wberrier@novell.com>
15868 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
15870 2006-05-12 Zoltan Varga <vargaz@gmail.com>
15872 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
15873 functions try to allocate from the image mempool.
15875 2006-05-12 Dick Porter <dick@ximian.com>
15877 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
15879 2006-05-12 Lluis Sanchez <lluis@ximian.com>
15881 * object.c: The FieldGetter and FieldSetter methods require the full
15882 name of the class, not only the name. Fixes bug #78277.
15884 2006-05-11 Miguel de Icaza <miguel@novell.com>
15886 * loader.c (method_from_memberref): Do not pass the NULL klass to
15887 mono_loader_set_error_() methods. Pass the non-NULL value
15890 2006-05-11 Zoltan Varga <vargaz@gmail.com>
15892 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
15893 (mono_assembly_close): Null out assembly->image->references after freeing it.
15895 * image.c (mono_image_close): Free image->references.
15897 * reflection.c (mono_image_basic_init): Fix a small memory leak.
15899 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15901 * marshal.c: In function mono_mb_add_local don't use the mb pointer
15902 before checking if it's NULL (g_assert).
15904 2006-05-10 Martin Baulig <martin@ximian.com>
15906 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
15907 I thought I already killed that two months ago, but now it somehow reappeared.
15909 2006-05-10 Martin Baulig <martin@ximian.com>
15911 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
15913 2006-05-10 Zoltan Varga <vargaz@gmail.com>
15915 * reflection.c: Allocate memory for dynamically created methods in the image
15918 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15920 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
15921 don't use the ad pointer before checking if it's NULL (g_assert).
15923 2006-05-09 Zoltan Varga <vargaz@gmail.com>
15925 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
15926 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
15928 * marshal.c: Allocate all signatures from mempools.
15930 * marshal.c: Allocate some more signatures from mempools.
15932 2006-05-09 Miguel de Icaza <miguel@novell.com>
15934 * object.c (mono_load_remote_field): The code used to provide a
15935 temporary variable for returning results if the user did not
15936 provide a result pointer. But our temporary variable was allocted
15939 Fix calling code to always pass a result area. Coverity ID 103.
15941 2006-05-06 Zoltan Varga <vargaz@gmail.com>
15943 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
15944 value, not the old. Fixes #78312.
15945 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
15947 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
15948 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
15951 * assembly.c (mono_assembly_close): Free image->references.
15953 * assembly.c (mono_assembly_names_equal): Fix a warning.
15954 (mono_assemblies_cleanup): Cleanup more global data.
15956 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
15958 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
15959 ptr_cache and image->modules.
15961 * image.c (mono_image_init): Allocate array_cache lazily.
15963 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15965 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
15966 behavior was changed recently and has bad side effects.
15968 2006-05-05 Zoltan Varga <vargaz@gmail.com>
15970 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
15972 * assembly.c (mono_assembly_close): Remove a debug printf.
15974 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
15976 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
15977 to also allow for temporary references between mono_image_open ()/close ().
15979 * domain.c (get_runtimes_from_exe): Add a FIXME.
15981 2006-05-04 Zoltan Varga <vargaz@gmail.com>
15983 * marshal.c: Fix support for dynamic methods.
15985 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
15987 * marshal.c (mono_marshal_cleanup): New cleanup function.
15989 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
15992 * class.c (mono_class_init): Fix leaking class->nested_classes.
15994 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
15996 * image.c (mono_image_init): Initialize the new cashes.
15998 * image.c (mono_image_close): Destroy the new cashes.
16000 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
16002 * mempool.c (mono_mempool_strdup): New helper function.
16004 * class-internals.h: Add prototype for mono_loader_unlock ().
16006 * domain.c (mono_jit_info_table_find): Fix a warning.
16007 (mono_debugger_check_runtime_version): Ditto.
16009 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
16010 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
16011 functions to these modules.
16013 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
16016 * marshal.c (mono_free_bstr): Fix a warning.
16018 * assembly.c (mono_assembly_open_full): Fix another small leak.
16020 * object.c: Fix some unload leaks in the remoting code.
16022 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
16025 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
16027 * reflection.c: Fix some unload leaks in dynamic assemblies.
16029 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
16031 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
16032 * marshal.h: Add BSTR support on Win32
16033 * icall.c: Add BSTR icalls
16034 * metadata.h: Add BSTR enums
16036 2006-04-28 Miguel de Icaza <miguel@novell.com>
16038 Work to catch the crash from #76795 and turn it into an
16039 exception. As I stubbed out pieces of the VisualBasic support,
16040 I found a number of places where the code was failing and I added
16041 checks to those places.
16043 * metadata.c (do_mono_metadata_parse_generic_class): Make this
16044 function return a status code. If we fail to parse the signature
16045 from mono_metadata_parse_generic_inst, return FALSE.
16047 * loader.c (mono_get_method_from_token): If we fail to load the
16048 method (mono_class_get) return NULL.
16050 * (method_from_memberref): Return NULL if we are unable to parse
16051 the method signature
16053 (mono_loader_error_prepare_exception): Since we now use the
16054 loader_error flag internally to stop processing, and obtaining
16055 exceptions that might be thrown will walk this code path the
16056 proper way of going from a MonoLoaderError into a
16057 MonoException was convoluted. This new routine encapsulates the
16058 process of turning the error into an exception and *clearing* the
16061 2006-04-27 Miguel de Icaza <miguel@novell.com>
16063 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
16064 with missing assemblies), and to cope with:
16066 * Missing fieldref from a non-existing assembly.
16067 * Missing methodref from a non-existing assembly.
16069 The first batch of work to address *some* of the issues from 76661.
16071 * object.c (mono_class_create_runtime_vtable): If we fail to
16072 initialize the class raise the exception here.
16074 * metadata.c (mono_class_get_overrides_full): If any methods fail
16075 to load return the failure to the caller.
16077 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
16078 flagging assemblies that failed to load.
16080 Do not crash if we are unable to load the assembly.
16082 (mono_assembly_close): Do nothing with REFERENCE_MISSING
16085 * loader.c (mono_loader_set_error_type_load): Change the
16086 convention to always pass unallocated strings, so we make our own
16087 copies (I know our own code had duplicated strings before, but
16088 this keeps the normal conventions).
16089 (method_from_memberref): Call mono_loader_set_error_method_load
16090 for all possible failures of loading the class.
16091 Remove assert, turn into a loader error.
16093 (mono_loader_error_to_exception): Move this routine from mini
16094 (mini_loader_error_to_exception) there was no need to have that in
16097 * class.c (mono_class_from_typeref): If we were not able to load
16098 the assembly with mono_assembly_load_reference, call the
16099 mono_loader_set_error_type_load to register the problem.
16101 (mono_class_setup_fields): If we fail to load the type from
16102 mono_metadata_parse_type_full, call mono_class_set_failure and
16103 break from the loop.
16105 If class->exception_type is set, we do not layout the fields as
16106 that might crash the runtime, and instead return (from breaking
16107 from the previous loop).
16109 (mono_class_setup_vtable): This now returns a boolean indicating
16110 whether the table was properly setup. The decision is driven by
16111 mono_class_get_overrides_full which might run into non-existing
16114 (mono_class_init): Returns TRUE on success or FALSE if there was a
16115 problem in loading the type (incorrect assemblies, missing
16116 assemblies, methods, etc).
16118 When we call mono_class_setup_fields we also check for a potential
16119 error inside this call (either a class exception or a general
16122 (mono_class_create_from_typedef): If the parent fails to load
16123 (calling mono_class_get_full) return NULL.
16127 calls to mono_metadata_parse_type_full should be checked
16128 everywhere and set the mono_class_set_failure
16129 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
16131 The current patch checks the places where my manually constructed
16132 tests show the errors are showing up, but we should do it
16137 mono_class_init return values should be tested everywhere, like
16138 the previous case this is something that we should audit
16139 everywhere and not only on the cases exposed by the tests I
16142 2006-04-26 Miguel de Icaza <miguel@novell.com>
16144 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
16145 boolean parameter and instead pass the information on `options'
16146 parameter (FileOptions).
16148 * icall.c: Register the new signature for MonoIO.Open.
16150 * debug-helpers.c (dis_one): Trying to understand how coverity
16151 works. Fix Run 5, item 78.
16153 2006-04-26 Dick Porter <dick@ximian.com>
16155 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
16158 2006-04-25 Martin Baulig <martin@ximian.com>
16160 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
16162 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
16163 debugger_thread_created().
16164 (debugger_gc_push_all_stacks): Don't handle the main thread in any
16166 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
16167 (mono_debugger_finalize_threads): New function; undo the effects
16168 of mono_debugger_init_threads().
16169 (mono_debugger_create_all_threads): Removed.
16171 2006-04-24 Zoltan Varga <vargaz@gmail.com>
16173 * image.c (mono_image_close): Tidy up trace messages.
16175 * assembly.c (mono_assembly_close): Ditto.
16177 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
16178 no longer references an already freed assembly. Fixes #78168.
16180 2006-04-21 Dick Porter <dick@ximian.com>
16182 * threads.c (mono_thread_detach): Fix reference counting when
16185 2006-04-21 Zoltan Varga <vargaz@gmail.com>
16187 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
16190 2006-04-19 Zoltan Varga <vargaz@gmail.com>
16192 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
16193 (mono_type_to_stind): Ditto.
16195 * marshal.c: Use the new helper functions to simplify code.
16197 * image.c (mono_image_close): Add some code for help debug assembly unloading
16200 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
16203 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
16204 assembly was already loaded in another appdomain. Fixes #78083.
16206 2006-04-13 Zoltan Varga <vargaz@gmail.com>
16208 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
16209 referenced assemblies.
16210 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
16212 * domain.c (mono_domain_free): Add a trace message.
16214 * appdomain.c (add_assemblies_to_domain): Ditto.
16216 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
16219 2006-04-12 Zoltan Varga <vargaz@gmail.com>
16221 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
16223 2006-04-12 Martin Baulig <martin@ximian.com>
16225 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
16226 `USE_INCLUDED_LIBGC'.
16228 2006-04-12 Zoltan Varga <vargaz@gmail.com>
16230 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
16231 the patch contains ../ and a small directory name later. Hopefully fixes
16234 2006-04-10 Martin Baulig <martin@ximian.com>
16236 Clean up the debugger's thread-handling code.
16238 The debugger's thread-handling code has been moved from
16239 ../mini/debug-debugger.c to threads.c. We now iterate directly
16240 over the `threads' hash, keep track of exiting threads and also
16241 use proper locking.
16243 We can now debug XSP and XSP based applications with the debugger.
16245 * object-internals.h (MonoThread): Added `gpointer end_stack'.
16248 (MonoThreadCallbacks): Removed; this was only used by the debugger.
16249 (mono_install_thread_callbacks): Likewise.
16251 * threads.c (mono_thread_callbacks): Removed.
16252 (debugger_thread_created, debugger_thread_exited): New static functions.
16253 (start_wrapper): Call debugger_thread_created().
16254 (thread_cleanup): Call debugger_thread_exited().
16255 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
16256 (mono_debugger_init_threads): New public function.
16257 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
16258 iterate directly over the `threads' hash and also use proper locking.
16260 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
16262 * mono-debug-debugger.h
16263 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
16265 2006-04-10 Zoltan Varga <vargaz@gmail.com>
16267 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
16268 argument type=array. Fixes #78057.
16270 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
16272 * culture-info-table.h : regenerated. Fixed bug #69652.
16274 2006-04-07 Zoltan Varga <vargaz@gmail.com>
16276 * loader.c metadata.c: Reapply a variant r59116.
16278 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
16280 * class.c (mono_class_setup_interface_offsets): New internal function.
16282 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
16283 interfaces too. Fixes #77398.
16285 * reflection.c (encode_cattr_value): Add support for
16286 parameter type=object, argument type=array.
16287 (load_cattr_value): Ditto. Fixes #77916.
16289 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
16290 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
16292 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
16293 a byval char array and CharSet is Ansi.
16295 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
16297 2006-04-06 Zoltan Varga <vargaz@gmail.com>
16299 * metadata.c: Add some locking comments.
16301 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
16303 (mono_metadata_free_method_signature): Don't free the signature itself.
16305 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
16307 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
16308 reference the same MonoImage.
16309 (mono_assembly_load_from_full): Add an assert.
16311 2006-04-05 Zoltan Varga <vargaz@gmail.com>
16313 * image.c (mono_image_close): Don't put the image we are about to free into the
16314 loaded_images_guid_hash.
16316 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
16317 to reduce code duplication.
16319 * marshal.c: Register the native functions called by this module as icalls, to
16320 somewhat centralize the creation of MonoMethodSignature's.
16322 * loader.c (mono_method_signature): Add a cache for method signatures.
16324 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
16325 the parameter attributes of a method.
16326 (mono_metadata_parse_method_signature_full): Refactored the computation of
16327 parameter attributes into a separate function. Also avoid one allocation in
16330 * assembly.c (mono_assembly_close): Ditto.
16332 * image.c (mono_image_close): Log trace messages with INFO level.
16334 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
16336 * image.c reflection.c: Correct reference counting of image modules.
16338 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
16339 of this function from the image mempool.
16341 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
16342 to allow more cached types to be used.
16344 * mono-debug.c (mono_debug_add_method): Appled patch from
16345 David S. Miller <davem@sunset.davemloft.net>: Access
16346 minfo->lexical_blocks[] entry elements using read32().
16348 2006-04-04 Zoltan Varga <vargaz@gmail.com>
16350 * loader.c (mono_free_method): No longer free the method header for non-dynamic
16351 methods as it is allocated from the mempool.
16353 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
16356 * metadata-internals.h: Add comments describing the reference counting scheme
16357 used for MonoImage and MonoAssembly.
16359 * image.c assembly.c reflection.c: Rework reference counting of images and
16360 assemblies so they are freed when the runtime is shut down. Free some
16361 additional memory structures when an image is unloaded.
16363 2006-04-03 Zoltan Varga <vargaz@gmail.com>
16365 * class.c loader.c reflection.c: Allocate more data structures in
16368 2006-03-31 Miguel de Icaza <miguel@novell.com>
16371 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
16372 build on pre glib 2.4 systems.
16374 2006-03-31 Zoltan Varga <vargaz@gmail.com>
16376 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
16378 * icall.c: Fix some warnings.
16380 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
16382 * culture-info-table.h : regenerated.
16384 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
16386 * threads.c, object-internals.h, verify.c: changed the culture caching
16387 code to use a normal MonoArray for storage so the GC can keep track of
16388 them easily. Fixed bits of the cache logic, too and simplified the
16391 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
16393 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
16394 thread for non-Boehm GCs.
16396 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
16398 * domain.c, object.c, domain-internals.h: reduce the amount of memory
16399 needed to keep track of the data for static fields.
16401 2006-03-29 Raja R Harinath <rharinath@novell.com>
16404 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
16405 for interface classes. Use 'num_methods' instead.
16406 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
16407 before using '->vtable_size' field.
16409 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16411 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
16412 doesn't contain managed pointers, so use a normal hashtable.
16414 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
16416 * reflection.c, class-internals.h, domain.c: fixed handling of types
16417 used as values for objects in custom attributes (bug #77915):
16419 2006-03-24 Martin Baulig <martin@ximian.com>
16421 * class.c (mono_class_setup_fields): Added support for generic
16422 instances; fixes #77580.
16424 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16426 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
16428 2006-03-24 Dick Porter <dick@ximian.com>
16430 * file-io.c (get_file_attributes): More stat macro breakage.
16433 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
16435 * profiler.c: added the file=filename option in the default profiler
16436 to output the profile data to filename.
16438 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16440 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
16443 2006-03-22 Martin Baulig <martin@ximian.com>
16445 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
16446 allocated `MonoClassField *' in `fb->handle'.
16448 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16450 * class.c, image.c, metadata-internals.h: implemented new mechanism to
16451 allocate interface ID to save memory and allow better ID reuse on
16452 appdomain unload. setup_generic_vtable () removal from Martin.
16454 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16456 * object.h, appdomain.c, domain.c, exception.c, icall.c,
16457 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
16458 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
16459 write barriers for reference stores with managed objects accessed with
16460 C structures in the runtime and in embedding programs.
16462 2006-03-20 Raja R Harinath <rharinath@novell.com>
16464 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
16465 'interface_id' and 'max_interface_id' fields of MonoClasses
16466 representing open generic types.
16468 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
16470 * object.h, object.c, icall.c: added functions to deal with
16471 storing valuetypes that contain references in managed objects.
16472 * reflection.c, string-icalls.c, threads.c, marshal.c: small
16473 fixes and comments around uses of mono_array_addr ().
16475 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
16477 * object.h, icall.c, monitor.c: object.GetHashCode ()
16478 implementation that supports the moving garbage collector.
16480 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16482 * icall.c, threads-types.h, threads.c: implemented finalizer for
16483 LocalDataStoreSlot.
16485 2006-03-15 Zoltan Varga <vargaz@gmail.com>
16487 * metadata.c (mono_type_size): Add a fixme.
16488 (mono_type_stack_size): Ditto.
16490 * object-internals.h (MonoReflectionAssemblyBuilder): Added
16491 'type_forwarders' field.
16493 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
16494 attribute from net 2.0.
16496 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
16499 * class.c (mono_class_setup_fields): Fix a warning.
16501 * class.c (mono_class_from_name): Add support for assemblyref entries
16502 in the EXPORTEDTYPE table.
16504 * reflection.c: Add support for handling type forwarders under net 2.0.
16506 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16508 2006-03-14 Zoltan Varga <vargaz@gmail.com>
16510 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
16511 overwriting entries in ModuleBuild->types, also clean up the code
16512 a little. Fixes #77774.
16514 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16516 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
16517 load friend assembly info when present.
16519 2006-03-14 Raja R Harinath <rharinath@novell.com>
16521 Fix crasher on gtest-158.cs.
16522 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
16523 the return value if the MonoClass we want is yet in an
16524 inconsistent state.
16525 * class.c (mono_class_create_from_typedef): Add an comment
16526 explaining an order dependency between mono_class_setup_parent and
16527 mono_class_setup_mono_type.
16529 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
16531 * class.c: documentation updates and events bug fix.
16533 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
16535 * class.c: some cleanup, locking fixes.
16537 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16539 * class.c: fix the generics code to setup nested
16540 type info to the instantiated type (bug #77770).
16542 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16544 * marshal.c: fixed a few type correctness issues.
16546 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16548 * loader.c: the Set/Get/Addrtess array methods should be public.
16550 2006-03-11 Zoltan Varga <vargaz@gmail.com>
16552 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
16554 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
16557 2006-03-10 Zoltan Varga <vargaz@gmail.com>
16559 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
16561 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
16563 * mempool.c (mono_mempool_alloc): Speed this up a bit.
16564 (mono_mempool_alloc0): Ditto.
16566 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16569 (create_object_from_sockaddr): it was allocating 4 extra bytes
16570 for the AF_UNIX data. Fixes bug #77747.
16572 2006-03-09 Zoltan Varga <vargaz@gmail.com>
16574 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
16576 2006-03-09 Dick Porter <dick@ximian.com>
16578 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
16579 Fixes bug 76966 again.
16581 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
16583 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
16585 * appdomain.c: Bumped corlib version to 48 (due to r57532)
16587 2006-03-07 Martin Baulig <martin@ximian.com>
16590 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
16592 2006-03-07 Martin Baulig <martin@ximian.com>
16595 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
16596 regression introduced in r56970; see gtest-252.cs.
16598 * loader.c (mono_get_method_constrained): Correctly handle generic
16599 methods; see gtest-253.cs.
16601 2006-03-04 Zoltan Varga <vargaz@gmail.com>
16603 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
16605 2006-03-04 Martin Baulig <martin@ximian.com>
16607 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
16608 compute the parent type at runtime, just like we're already doing
16612 (mono_reflection_bind_generic_parameters): Don't compute the
16613 parent type anymore.
16615 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
16617 2006-03-04 Martin Baulig <martin@ximian.com>
16619 * mono-debug-debugger.h
16620 (mono_debugger_create_notification_function): Allocate memory at
16621 runtime and return a pointer to it.
16623 2006-03-03 Zoltan Varga <vargaz@gmail.com>
16625 * assembly.c: Fix windows build.
16627 * assembly.c: Fix build.
16629 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
16631 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
16633 2006-03-03 Dick Porter <dick@ximian.com>
16636 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16637 Check parameters before dereferencing them. Fixes Aaron's part of
16640 2006-03-03 Raja R Harinath <rharinath@novell.com>
16642 Fix performance regression.
16643 * loader.c (find_method_in_class): Add 'from_class' argument.
16644 Rename 'klass' argument to 'in_class'. The signature is compared
16645 against the method in 'in_class', and the corresponding method is
16646 returned from 'from_class'.
16647 (find_method): Walk both 'in_class' and 'from_class' in parallel.
16648 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
16649 type definition and generic instantiation in parallel.
16650 (mono_get_method_constrained): Update to changes.
16652 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16654 * threads.c: make sure the domain is correct, too when doing
16655 mono_thread_attach ().
16657 2006-03-01 Zoltan Varga <vargaz@gmail.com>
16659 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
16660 windows. Fixes #77683.
16662 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16664 * object.h, *: introduced specific way to set elements of an array
16665 of references to be used as write barrier. Still need to audit the
16666 uses of mono_array_addr.
16668 2006-03-01 Miguel de Icaza <miguel@novell.com>
16670 * object-internals.h: New field to cache the assmebly name, patch
16671 from Tambet Ingo (tambet@ximian.com)
16673 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16675 * decimal.h, class-internals.h, metadata-internals.h,
16676 file-io.h: mark a few function declarations as internal, to
16677 reduce the number of PLT entries.
16679 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16681 * file-io.c: fix typo in warning message.
16683 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
16685 * loader.c: on unix, lookup the "*A" version of a function
16686 if charset is auto as a second option before failing.
16688 2006-02-28 Raja R Harinath <rharinath@novell.com>
16690 * class.h (mono_class_inflate_generic_method): Revert to two
16692 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
16693 (mono_class_inflate_generic_method_full): Add.
16694 * class.c (mono_class_inflate_generic_method_full): Rename from
16695 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
16696 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
16697 * loader.c, reflection.c: Update to changes.
16699 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
16701 * icall.c: const fixes and small improvements.
16703 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16705 * threadpool.c: for asynchronous connect(), enable the same workaround
16706 for BSD 6 as for the Mac. Fixes bug #77637.
16708 2006-02-24 Zoltan Varga <vargaz@gmail.com>
16710 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
16711 formatted classes. Fixes #77524.
16713 2006-02-24 Raja R Harinath <rharinath@novell.com>
16715 * class.c (inflate_generic_type): Add a couple more
16716 micro-optimizations.
16717 (inflate_generic_context): Don't use the 'gmethod' from
16719 (mono_class_inflate_generic_method): If the method has generic
16720 parameters, but the passed-in context doesn't have a 'gmethod',
16721 create one. Use the possibly simplified generic instantiation
16722 from the declaring class instead of the one passed in.
16724 2006-02-24 Raja R Harinath <harinath@gmail.com>
16726 Make generic method signature and method header handling lazy.
16727 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
16728 (inflate_generic_header): Likewise.
16729 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
16730 parameter to avoid inflating types.
16731 (mono_get_inflated_method): Empty out.
16732 * class.h (mono_class_inflate_generic_method): Update to changes.
16733 * loader.c (mono_get_method_from_token): Don't parse signature for
16734 generic methods, nor methods of generic classes.
16735 (mono_method_signature): Rename from 'mono_method_signature'.
16736 Inflate signature on demand.
16737 (mono_method_get_header): Inflate method header on demand.
16738 * reflection.c: Update to changes.
16740 2006-02-23 Raja R Harinath <rharinath@novell.com>
16742 * metadata.c (mono_metadata_inflate_generic_inst): If the
16743 instantiation is closed, don't bother expanding it in the new
16745 * class.c (inflate_generic_class): If the generic instantiation
16746 doesn't change after inflation, return the argument itself.
16747 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
16749 (inflate_generic_context): If neither the generic class nor the
16750 generic method instantiations change, return the original context.
16751 * reflection.c (mono_method_get_object): Do
16752 'mono_get_inflated_method' before accessing the ->klass field.
16753 (inflate_mono_method): Don't create a MonoGenericMethod unless
16755 (inflate_method): Don't pass a constructed type as the declaring
16756 type of a methodbuilder.
16758 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
16760 * object.c: fix memory overwrite.
16762 2006-02-22 Dick Porter <dick@ximian.com>
16764 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
16765 it doesn't work any more.
16766 (mono_threads_request_thread_dump): Fix unused variable warnings.
16768 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16770 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
16771 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
16772 the public header file.
16774 2006-02-21 Zoltan Varga <vargaz@gmail.com>
16776 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
16778 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16780 * class-internals.h, object.c: reduce the size of MonoVTable
16781 and store the interface_offsets array at negative offsets.
16783 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16785 * metadata.c: tweak table descriptors data structures to reduce
16786 size and runtime relocations.
16788 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16790 * marshal.c: fix some types and opcodes to be type-safe
16791 in marshaling wrappers.
16793 2006-02-21 Ankit Jain <jankit@novell.com>
16795 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
16797 2006-02-21 Raja R Harinath <rharinath@novell.com>
16799 * metadata.c (get_constraints): Relax debugging checks for monodis.
16801 2006-02-21 Ankit Jain <jankit@novell.com>
16803 * metadata.c (mono_metadata_load_generic_params): Move the code
16804 checking for ambiguous generic params from here to mono/dis/get.c
16805 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
16807 2006-02-21 Raja R Harinath <harinath@gmail.com>
16809 Fix assertion triggered when compiling nemerle.
16810 * class.c (mono_get_shared_generic_inst): Rename from
16811 get_shared_inst and make non-static.
16812 * loader.c (mono_get_shared_generic_method): New. Used to create
16813 the MonoGenericContext-equivalent of a MonoGenericContainer.
16814 (mono_get_method_from_token): Initialize the 'context' field of
16815 the created MonoGenericContainer.
16816 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
16817 * metadata.c (get_constraints): Add sanity check.
16818 * class-internals.h: Add new internal methods.
16820 * reflection.c (verify_safe_for_managed_space): New sanity check.
16821 Currently checks that owner-less generic parameters aren't allowed
16823 (mono_type_get_object): Use it.
16824 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
16825 that are now in mono_type_get_object.
16826 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
16828 2006-02-19 Raja R Harinath <harinath@gmail.com>
16830 * metadata.c (mono_type_create_from_typespec): Rename from
16831 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
16832 argument and caching of types in the generic container.
16833 (unwrap_arrays, find_generic_param): Remove.
16834 * metadata-internals.h: Update.
16835 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
16837 2006-02-18 Zoltan Varga <vargaz@gmail.com>
16839 * class.c (mono_class_get_exception_for_failure): Fix a warning.
16841 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
16842 return values. Fixes #77581.
16844 * class.c (mono_fnptr_class_get): Switch name and name_space.
16846 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
16847 classes and add support for [In, Out] attributes.
16848 (mono_marshal_free_asany): Ditto. Fixes #77524.
16850 2006-02-18 Raja R Harinath <harinath@gmail.com>
16852 * class.c (mono_class_from_generic_parameter): Make more robust to
16853 incomplete MonoGenericContainers from monodis.
16855 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16857 * class-internals.h: added some more exception types.
16858 * class.c, metadata.c: added a few checks to handle missing
16861 2006-02-17 Raja R Harinath <rharinath@novell.com>
16863 Use owner-less generic-params some more.
16864 * class.c (my_mono_class_from_generic_parameter): Remove.
16865 (mono_class_from_generic_parameter): Handle null image,
16866 param->name and param->owner.
16867 (mono_class_from_mono_type): Update.
16868 (mono_class_create_from_typespec): Remove 'container' parameter.
16869 If that parameter is non-null, the result is always inflated by
16870 'mono_class_get_full' anyway.
16871 (mono_class_get): Rename from _mono_class_get. Remove 'container'
16873 (mono_class_get_full): Update.
16875 * class.c (inflate_generic_type) [GENERICINST]: If the generic
16876 instance is not open, don't bother inflating.
16877 (mono_class_setup_fields): Hoist some loop-invariants. Don't
16878 parse metadata for inflated classes.
16879 (_mono_class_get): Change GenericContext* parameter to
16881 (mono_class_create_from_typespec): Likewise. Simplify, and
16882 implement trivially. All the cases are handled in
16883 mono_class_from_mono_type. Don't inflate returned class.
16884 (mono_class_get_full): Delegate GENERICINST optimization to
16885 inflate_generic_type.
16886 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
16888 2006-02-16 Dick Porter <dick@ximian.com>
16890 * socket-io.c (create_object_from_sockaddr): Fix typo.
16891 (create_sockaddr_from_object): Check array lengths before
16892 potentially accessing items off the end.
16893 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
16894 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
16895 (ves_icall_System_Net_Sockets_Socket_Send_internal)
16896 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
16897 length checks to avoid wraparound overflows.
16898 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
16899 contents of the array of sockets
16900 (hostent_to_IPHostEntry2)
16901 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
16902 Check return value of inet_ntop ().
16903 (addrinfo_to_IPHostEntry): Fix typo
16905 2006-02-16 Raja R Harinath <rharinath@novell.com>
16907 Type metadata parsing doesn't use generic-instantiation information.
16908 * metadata.c (mono_metadata_parse_array_full): Change
16909 MonoGenericContext* parameter to MonoGenericContainer*.
16910 (mono_metadata_parse_type_full): Likewise.
16911 (mono_type_create_from_typespec_full): Likewise.
16912 (mono_metadata_parse_mh_full): Likewise.
16913 (mono_metadata_parse_generic_inst): Likewise.
16914 (do_mono_metadata_parse_generic_class): Likewise.
16915 (do_mono_metadata_parse_type): Likewise.
16916 * metadata-internals.h: Update to changes.
16917 * class.c (mono_class_find_enum_basetype): Likewise.
16918 (mono_class_setup_fields): Likewise.
16919 (mono_class_create_from_typespec): Likewise.
16920 * loader.c (method_from_methodspec): Likewise.
16921 (mono_get_method_from_token): Likewise.
16922 (mono_method_get_header): Likewise.
16924 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16926 * marshal.c: handle additional GENERICINST case (patch from
16927 Thong Nguyen <tum@veridicus.com>).
16928 Fix a few cases where LDIND_I/STIND_I was used for references.
16930 2006-02-16 Raja R Harinath <rharinath@novell.com>
16932 * reflection.c (mono_reflection_get_token): Remove unused variable.
16934 2006-02-16 Martin Baulig <martin@ximian.com>
16936 * reflection.c (mono_reflection_get_token): Add support for fields
16937 in instantiated generic types.
16940 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
16942 2006-02-15 Martin Baulig <martin@ximian.com>
16945 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
16946 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
16947 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
16948 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
16950 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16952 * class.c, metadata.c, metadata.h, object.c, icall.c,
16953 marshal.c: changed mono_type_get_underlying_type () to do
16954 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
16955 Fixed handling of instantiated generic valuetypes (bug #75479).
16957 2006-02-15 Raja R Harinath <rharinath@novell.com>
16959 * metadata.c (mono_metadata_decode_signed_value): Simplify.
16960 Delegate to mono_metadata_decode_value, and work on the returned value.
16962 * icall.c (ves_icall_MonoType_GetGenericArguments):
16963 Add consistency check here too.
16965 2006-02-15 Ankit Jain <jankit@novell.com>
16967 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
16970 2006-02-15 Ankit Jain <jankit@novell.com>
16972 * metadata.c (mono_metadata_decode_signed_value): New function to decode
16973 signed values, used only for representing lower bounds of arrays.
16974 (mono_metadata_parse_array_full): Use new
16975 mono_metadata_decode_signed_value to decode lower bounds.
16977 2006-02-14 Martin Baulig <martin@ximian.com>
16980 (mono_reflection_get_token): Support "MonoGenericMethod" and
16981 "MonoGenericCMethod" and allow generic instances / methods.
16983 2006-02-11 Zoltan Varga <vargaz@gmail.com>
16985 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
16986 to obtain the terminal size using an ioctl.
16988 * object.c (mono_nullable_init): Revert this as nullable reference
16989 types are not valid.
16990 (mono_nullable_box): Ditto.
16992 2006-02-09 Dick Porter <dick@ximian.com>
16994 * threads.c (mono_thread_detach): Drop a reference to the thread
16997 2006-02-09 Zoltan Varga <vargaz@gmail.com>
16999 * object.c (mono_nullable_init): Handle nullable reference types.
17000 (mono_nullable_box): Ditto. Fixes #77446.
17002 2006-02-07 Martin Baulig <martin@ximian.com>
17004 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
17006 2006-02-07 Ankit Jain <jankit@novell.com>
17008 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
17009 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
17010 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
17011 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
17012 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
17013 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
17015 2006-02-02 Zoltan Varga <vargaz@gmail.com>
17017 * class.c (mono_class_create_generic): Set type_token as well.
17019 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
17020 compatible with MS.
17022 2006-02-02 Martin Baulig <martin@ximian.com>
17024 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
17025 has never been used so far.
17027 2006-02-02 Martin Baulig <martin@ximian.com>
17029 * mono-debug-debugger.h: Changed comment at the top of this file;
17030 the header is not installed, but it's safe to #include it from
17033 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
17034 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
17036 2006-02-02 Martin Baulig <martin@ximian.com>
17039 (MonoSymbolTable): Removed the `metadata_info' field.
17042 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
17044 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
17045 (mono_debugger_add_builtin_types): Removed.
17046 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
17047 (mono_debugger_create_notification_function): We now operate on a
17048 pre-allocated area; take a `gpointer' and return `void'.
17050 * mono-debug-debugger.c
17051 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
17052 (mono_debugger_add_builtin_types): Removed.
17054 2006-02-02 Martin Baulig <martin@ximian.com>
17056 * threads.c (mono_debugger_create_all_threads): New public method.
17058 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
17060 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
17061 breaks on several platforms.
17063 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
17065 * assembly.c: the VS.NET build doesn't supply default values for
17066 MONO_ASSEMBLIES and MONO_CFG_DIR.
17068 2006-02-01 Zoltan Varga <vargaz@gmail.com>
17070 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
17073 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
17075 * loader.c (method_from_memberref): Fix a warning.
17077 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
17079 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
17080 with explicit layout. Fixes #77433.
17082 2006-01-31 Zoltan Varga <vargaz@gmail.com>
17084 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
17085 max_interface_id is initialized before using it. Fixes #77398.
17086 (ves_icall_Type_GetInterfaces): Ditto.
17088 2006-01-30 Raja R Harinath <rharinath@novell.com>
17090 * metadata.c (mono_metadata_parse_method_signature_full): Don't
17091 allocate memory for parameter attributes when parsing memberref
17093 * loader.c (mono_loader_set_error_method_load): Don't warn.
17094 (method_from_memberref): Ensure MissingMethodException gets thrown
17095 if method is not found. Make warning more informative.
17097 2006-01-29 Raja R Harinath <harinath@gmail.com>
17100 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
17101 return true if is byref.
17102 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
17103 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
17104 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
17106 2006-01-27 Raja R Harinath <rharinath@novell.com>
17108 Fix tests/find-method.2.il
17109 * loader.c (find_method, find_method_in_class): Remove is_inflated
17110 argument. Revert 2006-01-18 change.
17111 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
17112 is generic, search for method in its generic definition.
17113 * class.c (mono_class_setup_vtable_general): Print generic
17114 arguments of generic types in debugging printf.
17116 2006-01-26 Zoltan Varga <vargaz@gmail.com>
17118 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
17120 * threads.c (mono_threads_request_thread_dump): New helper function.
17122 2006-01-25 Raja R Harinath <rharinath@novell.com>
17124 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
17126 2006-01-25 Ankit Jain <jankit@novell.com>
17128 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
17129 move definition to ..
17130 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
17132 2006-01-25 Ankit Jain <jankit@novell.com>
17133 Raja R Harinath <rharinath@novell.com>
17135 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
17136 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
17139 2006-01-25 Martin Baulig <martin@ximian.com>
17141 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
17142 `MonoDebuggerThread' into debug-debugger.c.
17144 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
17146 * profiler.c: fix printing of data.
17148 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
17150 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
17151 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
17153 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
17155 * object.c: fix deadlock related to string interning.
17157 2006-01-23 Martin Baulig <martin@ximian.com>
17159 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
17161 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
17163 2006-01-23 Martin Baulig <martin@ximian.com>
17165 * mono-debug.h: Moved the prototypes of some functions which are
17166 used by the JIT here from mono-debug-debugger.h.
17168 2006-01-21 Martin Baulig <martin@ximian.com>
17170 * Makefile.am: Don't install mono-debug-debugger.h.
17172 2006-01-21 Martin Baulig <martin@ximian.com>
17174 * mono-debug-debugger.h: Enforce the private status of this header
17175 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
17176 Moved some stuff from mono-debugger-jit-wrapper.h here.
17178 2006-01-20 Raja R Harinath <rharinath@novell.com>
17180 * class.c (mono_class_from_typeref): Add a sanity test to help
17181 catch lack of assembly load/search hooks.
17183 2006-01-19 Zoltan Varga <vargaz@gmail.com>
17185 * marshal.c (emit_struct_conv): Relax the fields with same offset
17186 check even more. Fixes #77230.
17188 2006-01-18 Martin Baulig <martin@ximian.com>
17190 * loader.c (find_method_in_class): Added `gboolean is_inflated'
17191 argument; if false, we compare the uninstantiated signatures.
17192 (method_from_memberref): Compare the uninstantiated signatures;
17195 2006-01-18 Robert Jordan <robertj@gmx.net>
17197 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
17198 Clear the weak link. Fixes bug #77170.
17200 * gc.c (mono_gchandle_free):
17201 Reflect *-gc.c changes (tiny optimization).
17203 2006-01-18 Zoltan Varga <vargaz@gmail.com>
17205 * metadata.c (mono_metadata_signature_dup): Applied patch from
17206 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
17209 2006-01-17 Zoltan Varga <vargaz@gmail.com>
17211 * marshal.c (emit_struct_conv): Allow fields with the same offset when
17212 marshalling from native to managed code. Fixes #77230.
17214 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17216 * threadpool.c: fix problem (Mac only) when more than one asynchronous
17217 connect. Fixes bug #77020.
17219 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
17221 * class.c: fixed id assignement for nested interfaces (bug #77275).
17222 Added also better info for --print-vtable debugging.
17224 2006-01-12 Martin Baulig <martin@ximian.com>
17226 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
17227 interfaces on-the-fly; fixes #76625.
17229 * class-internals.h
17230 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
17231 don't need that anymore.
17233 2006-01-12 Miguel de Icaza <miguel@novell.com>
17236 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
17237 To avoid initing the nested_classes when not needed I turned the
17238 PeerCredData as a toplevel internal class, as it has to be shared
17241 Fixes the CASA issue.
17243 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
17245 * domain.c: Accessors for MonoJitInfo
17247 * profiler-private.h: Add jitinfo to the end jit hook
17249 * profiler.[ch]: Define new hooks, called after jitting which give
17250 the MonoJitInfo that was compiled
17252 2006-01-10 Martin Baulig <martin@ximian.com>
17254 * class.c (mono_class_setup_events): Add support for generic
17255 classes; fixes #76440.
17257 2006-01-06 Raja R Harinath <rharinath@novell.com>
17260 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
17261 on passed-in method.
17263 2006-01-03 Zoltan Varga <vargaz@gmail.com>
17265 * object.c (mono_runtime_invoke_array): Add Nullable support.
17267 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
17269 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
17271 * file-io.c: Don't consider sockets as directory and avoid an endless
17272 loop. Fix bug #76966.
17274 2006-01-03 Zoltan Varga <vargaz@gmail.com>
17276 * object.c (mono_nullable_init): New helper function.
17277 (mono_nullable_box): Ditto.
17279 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
17281 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
17283 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
17285 2006-01-02 Zoltan Varga <vargaz@gmail.com>
17287 * class.c (mono_class_is_assignable_from): Make T assignable to
17290 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
17292 * appdomain.c: Bump corlib version to 46.
17293 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
17294 serialization purpose) and changed ves_icall_System_Reflection_
17295 Assembly_get_code_base signature to accept a boolean (to escape, or
17296 not, the assembly code base).
17298 2005-12-23 Dick Porter <dick@ximian.com>
17302 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
17303 CreateEvent icall now returns "created" boolean parameter.
17305 2005-12-22 Zoltan Varga <vargaz@gmail.com>
17307 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
17310 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
17311 when attr_klass is an interface. Fixes #77045.
17313 2005-12-20 Zoltan Varga <vargaz@gmail.com>
17315 * marshal.c (emit_struct_conv): Fix previous patch.
17317 * marshal.c (emit_struct_conv): Add a check for fields with the same
17320 2005-12-20 Raja R Harinath <rharinath@novell.com>
17322 Fix regression in Mono.C5.
17323 * class.c (mono_class_create_generic): If 'klass' is an interface
17324 set up the interface offsets.
17325 (mono_class_is_assignable_from): Don't throw away generic arguments.
17327 2005-12-19 Raja R Harinath <rharinath@novell.com>
17329 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
17332 2005-12-15 Raja R Harinath <rharinath@novell.com>
17334 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
17336 (do_mono_metadata_parse_generic_class): Don't pass the current
17337 generic context when parsing the type being instantiated: it
17338 cannot use it, anyway.
17340 * loader.c (method_from_memberref): Don't inflate a signature if
17341 it doesn't contain any type parameters.
17343 2005-12-15 Zoltan Varga <vargaz@gmail.com>
17345 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
17347 2005-12-14 Martin Baulig <martin@ximian.com>
17350 (mono_type_get_name_recurse): Don't return null for type
17351 parameters and open generic classes.
17352 (mono_class_setup_methods): Don't exclude generic instances.
17353 (mono_get_unique_iid): Use different IDs for different
17354 instantiations of the same generic type.
17355 (mono_class_setup_vtable): Only use setup_generic_vtable() for
17356 open generic instances; create a normal vtable for closed generic
17358 (mono_class_setup_vtable_general): We're now also called for
17359 closed generic instances.
17362 (mono_reflection_bind_generic_parameters): Correctly use
17363 mono_metadata_lookup_generic_inst() everywhere.
17365 2005-12-14 Zoltan Varga <vargaz@gmail.com>
17367 * object.c (mono_class_create_runtime_vtable): Call
17368 mono_class_setup_vtable ().
17370 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
17372 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
17375 * loader.c (mono_loader_set_error_type_load): Print the type load
17376 warnings to the console so they are more visible to the user.
17377 (mono_loader_set_error_method_load): Ditto.
17379 * reflection.c (ensure_runtime_vtable): Revert the last change as it
17382 * reflection.c (ensure_runtime_vtable): Fix build.
17384 * reflection.c (ensure_runtime_vtable): Disable an optimization which
17385 doesn't work in all cases.
17387 2005-12-13 Zoltan Varga <vargaz@gmail.com>
17389 * object.c (mono_array_new_full): Treat a single dimensional array
17390 with 0 lower bounds as an szarray. Fixes #76973.
17392 * reflection.c (custom_attr_visible): Really fix this.
17394 2005-12-12 Zoltan Varga <vargaz@gmail.com>
17396 * reflection.c (custom_attr_visible): Allow nested public attributes
17399 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
17402 2005-12-12 Raja R Harinath <harinath@gmail.com>
17404 * class.c (set_generic_param_owner): Delete.
17405 (mono_class_create_from_typedef): Don't set ->owner field of
17406 generic parameters to "param containers" of enclosing classes.
17407 * reflection.c (mono_reflection_initialize_generic_parameter):
17410 2005-12-11 Zoltan Varga <vargaz@gmail.com>
17412 * reflection.c (custom_attr_visible): Fix build.
17414 2005-12-10 Zoltan Varga <vargaz@gmail.com>
17416 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
17417 private attributes.
17419 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
17420 handling of null parameter defaults.
17422 2005-12-09 Raja R Harinath <rharinath@novell.com>
17424 * class.c (mono_class_from_generic_parameter): Don't set
17425 klass->generic_container.
17426 (my_mono_class_from_generic_parameter): Likewise.
17428 2005-12-07 Zoltan Varga <vargaz@gmail.com>
17430 * reflection.c (load_public_key): Fix a warning.
17431 (method_encode_code): Fix unaligned accesses.
17433 2005-12-07 Martin Baulig <martin@ximian.com>
17435 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
17438 (write_generic_param_entry): Encode our custom attrs.
17440 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
17442 2005-12-07 Martin Baulig <martin@ximian.com>
17444 * reflection.c (encode_new_constraint): Removed; we don't use the
17445 `NewConstraintAttribute' anymore.
17447 2005-12-06 Zoltan Varga <vargaz@gmail.com>
17449 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
17450 not fire a TypeResolve event when Assembly.GetType () is called.
17452 2005-12-05 Ben Maurer <bmaurer@ximian.com>
17454 Beginning of support for nullable types in the runtime. Parts of
17455 this patch are from Martin.
17457 * appdomain.c (MONO_CORLIB_VERSION): Bump
17459 * domain.c (mono_init_internal): get the nullable type
17461 * class.c (mono_class_is_nullable): New method
17462 (mono_class_get_nullable_param): New mehod
17463 (mono_class_create_generic): In types T? set cast_class to T
17465 * class-internals.h (MonoDefaults): new nullable default class
17466 (mono_class_get_nullable_param, mono_class_get_nullable_param):
17469 2005-12-05 Raja R Harinath <rharinath@novell.com>
17471 * metadata.c (select_container): New. Refactor code to select the
17472 appropriate GenericContainer given the type of generic parameter
17473 we are looking for.
17474 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
17475 not a MonoGenericContext. Use select_container. Update parameters.
17476 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
17477 and MONO_TYPE_MVAR.
17478 (unwrap_arrays): Remove duplicate tests.
17479 (find_generic_param): Rename from 'has_same_context'. Now walks a
17480 generic instantiated class to find any arguments that are generic
17482 (mono_type_create_from_typespec_full): Use find_generic_param to
17483 avoid evicting some generic instantiations from the typespec
17486 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
17488 * reflection.c: fixed writing of doubles on ARM FPA.
17490 2005-12-02 Robert Jordan <robertj@gmx.net>
17492 * icall.c: Fixed EventInfo.ReflectedType (#76829).
17494 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17496 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
17497 least on SUSE 10 they are not the same (on debian, they are just the
17500 2005-12-01 Raja R Harinath <rharinath@novell.com>
17502 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
17503 DeclaringType for VARs and MVARs.
17504 * class.c (set_generic_param_owner): Fix initialization of owner
17507 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
17509 * icall.c: fixed Enum.ToObject() to correctly convert the values.
17511 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17513 * threadpool.c: workaround for a bug that shows up on the Mac:
17514 select()+connect() on a blocking socket is not like it should
17515 be, so we proceed to connect() in that case, wasting the I/O
17516 threadpool thread until connect succeedes. Fixes bug #75436.
17518 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17520 * threadpool.c: fix typo when setting file descriptor states.
17522 2005-11-28 Raja R Harinath <rharinath@novell.com>
17524 * class-internals.h (MonoGenericContainer.is_signature): Remove.
17525 * metadata.c (mono_metadata_parse_method_signature_full): Don't
17526 create a temporary signature container.
17527 (mono_metadata_parse_generic_param): Update to changes.
17528 (mono_type_create_from_typespec_full): Update to changes.
17529 * loader.c (method_from_memberref): Don't use a
17530 MonoGenericContainer while parsing a memberref signature.
17531 (method_from_methodspec): Remove dead-store of the 'container'
17532 variable. It's overwritten before use.
17534 * metadata.c (mono_type_create_from_typespec_full): Make debugging
17536 (mono_metadata_parse_generic_param): Likewise.
17537 * loader.c (find_method_in_class): Does not need a
17538 MonoGenericContainer. Use 'mono_method_signature' rather than
17539 'mono_method_signature_full'.
17540 (find_method, mono_get_method_constrained, method_from_memberref):
17543 * metadata.c (mono_type_create_from_typespec_full): Ensure that
17544 owner-less generic-parameters are never evicted from the typespec
17547 * loader.c (method_from_memberref): Don't use the current context
17548 when parsing signatures.
17549 (method_from_methodspec, mono_get_method_from_token): Update to changes.
17551 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
17552 side-effects in g_assert.
17553 * loader.c (mono_get_method_from_token): Resolve klass earlier so
17554 that we don't potentially lose information.
17556 2005-11-26 Dick Porter <dick@ximian.com>
17559 * threads.c: icalls to implement basic (ie, not named)
17560 System.Threading.Semaphore.
17562 2005-11-24 Dick Porter <dick@ximian.com>
17565 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
17566 Use GetProcessId() if it's available.
17568 2005-11-23 Zoltan Varga <vargaz@gmail.com>
17570 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
17572 2005-11-23 Raja R Harinath <rharinath@novell.com>
17573 Ankit Jain <jankit@novell.com>
17575 * loader.c (mono_get_method_from_token): Initialize 'method' field
17576 of all generic parameters before parsing the signature. Remove
17577 code that "fixed"-up MVAR references.
17579 2005-11-23 Ankit Jain <jankit@novell.com>
17581 * metadata.c (mono_metadata_has_generic_params):
17582 (mono_metadata_load_generic_param_constraints):
17583 (mono_metadata_load_generic_params): Move duplicate code ...
17584 (mono_metadata_get_generic_param_row): ... here. Returns the
17585 first row-id in GenericParam table for a given owner (token).
17586 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
17589 2005-11-23 Raja R Harinath <rharinath@novell.com>
17590 Ankit Jain <jankit@novell.com>
17592 * metadata.c (mono_metadata_class_equal): Pass signature_only when
17593 comparing VARs too.
17594 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
17595 type->data.generic_param only if the type is an MVAR.
17596 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
17597 leak owner-less VARs and MVARs into managed space.
17599 2005-11-21 Martin Baulig <martin@ximian.com>
17601 * class-internals.h
17602 (MonoMethod): Moved the `generic_container' here from
17603 `MonoMethodNormal' since we now also need it for
17604 `MonoMethodPInvoke';
17605 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
17606 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
17607 an union containing both `MonoMethodNormal' and
17608 `MonoMethodPInvoke'.
17611 (mono_get_method_from_token): Allow implementing generic methods
17615 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
17618 2005-11-17 Dick Porter <dick@ximian.com>
17622 * process.c: Split the Process Start_internal icall into
17623 ShellExecuteEx_internal and CreateProcess_internal, which are
17624 called depending on whether UseShellExecute is true. Fixes bug
17627 * appdomain.c (MONO_CORLIB_VERSION): Incremented
17629 2005-11-17 Zoltan Varga <vargaz@gmail.com>
17631 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
17632 'msize' parameters, use the information in 'mspec' instead.
17633 (emit_object_to_ptr_conv): Ditto.
17635 * marshal.c (emit_struct_conv): Handle explicit layout structs with
17636 fields out of order. Fixes #76733.
17638 2005-11-17 Ankit Jain <jankit@novell.com>
17640 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
17642 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
17644 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
17647 2005-11-16 Zoltan Varga <vargaz@gmail.com>
17649 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
17650 for types with non-auto layout. Fixes #76717.
17652 2005-11-16 Ankit Jain <jankit@novell.com>
17654 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
17655 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
17656 if generic_context is null.
17657 (mono_metadata_generic_param_equal): param->owner can be null.
17658 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
17661 2005-11-16 Zoltan Varga <vargaz@gmail.com>
17663 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
17666 2005-11-15 Martin Baulig <martin@ximian.com>
17668 * object.c (set_value): Use mono_class_from_mono_type() instead of
17669 the hack for generic instances; fixes #76136.
17671 2005-11-15 Zoltan Varga <vargaz@gmail.com>
17673 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
17676 * image.c (load_metadata_ptrs): Initialize the new fields.
17678 * reflection.c (create_dynamic_mono_image): Ditto.
17680 * reflection.c (build_compressed_metadata): Use the new fields.
17682 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
17685 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
17688 2005-11-15 Ankit Jain <jankit@novell.com>
17689 Raja R Harinath <harinath@gmail.com>
17691 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
17692 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
17693 new per-generic_container cache if the cached MonoType's context matches
17694 the current context.
17695 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
17696 to the expected context.
17697 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
17699 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17701 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
17702 we changed the signature of an icall.
17703 * icall.c: Modify to mono_double_ParseImpl return true/false
17704 depending on the success, instead of throwing the exception. This will
17705 help us in Double.TryParse methods.
17707 2005-11-14 Zoltan Varga <vargaz@gmail.com>
17709 * marshal.c (emit_marshal_object): Throw an exception when
17710 marshalling 'object' instead of crashing. Fixes #76696.
17712 2005-11-11 Zoltan Varga <vargaz@gmail.com>
17714 * class-internals.h: Add prototype for mono_type_get_full_name ().
17716 2005-11-11 Dick Porter <dick@ximian.com>
17718 * threads.c (mono_thread_manage): Make sure the main thread has
17719 abandoned all its mutexes when cleaning up. Fixes bug 74680.
17721 2005-11-11 Zoltan Varga <vargaz@gmail.com>
17723 * loader.c (mono_loader_set_error_type_load): Log a warning to the
17724 console about the missing type.
17725 (mono_loader_set_error_method_load): Ditto.
17727 2005-11-09 Miguel de Icaza <miguel@novell.com>
17729 * mono-config.c (mono_get_config_dir): Set the system defaults if
17732 * assembly.c (mono_set_dirs): New API entry point to set the
17733 assembly and the config directory in one call
17735 2005-11-09 Zoltan Varga <vargaz@gmail.com>
17737 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
17738 the ftnptr was created from a delegate in a domain other than the
17739 current domain. Fixes #75377.
17741 * exception.h exception.c: Add mono_get_exception_not_supported ().
17743 2005-11-08 Martin Baulig <martin@ximian.com>
17745 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
17747 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
17749 * security-manager.h: Added definitions to deal with strongname key
17750 pairs bigger (and smaller) than 1024 bits.
17751 * reflection.c: Remove hardcoded strongname size (128 bytes) and
17752 adjust wrt the public key length being used.
17754 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
17756 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
17757 Windows build (r51396-51397).
17759 2005-11-03 Martin Baulig <martin@ximian.com>
17761 * class.c (mono_class_setup_vtable_general): Also add generic
17762 methods to the vtable; fixes #76581.
17764 2005-11-01 Miguel de Icaza <miguel@novell.com>
17766 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
17767 sure that we lookup GetString method from the System.Text.Encoding
17768 class, not the derived class or we get an empty method.
17770 Fixed class #76612.
17772 2005-10-25 Miguel de Icaza <miguel@novell.com>
17774 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
17775 if it has been previously set (embedders).
17777 Make mono_set_rootdir available also on Unix.
17779 005-10-24 Robert Jordan <robertj@gmx.net>
17781 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
17783 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
17785 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
17786 only calls which are made to native code use this flag.
17788 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
17790 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
17792 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
17793 Add support for FieldBuilders.
17795 2005-10-29 Martin Baulig <martin@ximian.com>
17798 (mono_debug_using_mono_debugger): New public method; returns
17799 whether we're running inside the debugger.
17801 2005-10-27 Zoltan Varga <vargaz@gmail.com>
17803 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
17804 for Method/Constructor/FieldBuilders.
17806 2005-10-26 Zoltan Varga <vargaz@gmail.com>
17808 * reflection.c (module_add_cattrs): Save custom attributes for global methods
17809 and fields as well.
17811 2005-10-26 Martin Baulig <martin@ximian.com>
17813 * mono-debug-debugger.c
17814 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
17816 2005-10-24 Raja R Harinath <harinath@gmail.com>
17818 * icall.c (base64_to_byte_array): Don't pass an out-of-range
17819 integer to isspace.
17821 2005-10-21 Zoltan Varga <vargaz@gmail.com>
17823 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
17824 when passing valuetypes byref. Fixes #76502.
17826 2005-10-19 Jackson Harper <jackson@ximian.com>
17828 * profiler.c: Don't put a . in front of types that are not in a
17831 2005-10-18 Zoltan Varga <vargaz@gmail.com>
17833 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
17835 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
17837 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
17839 (mono_marshal_get_ldflda_wrapper): Fix a warning.
17841 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17843 * assembly.c metadata-internals.h icall.c: Define an additional
17844 parameter for mono_assembly_name_parse_full, so we can avoid creating
17845 S.R.AssemblyName.Version when no version info wasn't passed.
17847 2005-10-09 Miguel de Icaza <miguel@novell.com>
17849 * class.c (mono_type_get_full_name): Reimplement method that was
17852 * image.c: Some docs
17854 2005-10-10 Zoltan Varga <vargaz@gmail.com>
17856 * profiler.c (output_newobj_profile): Fix printing of Total memory
17859 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
17861 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
17863 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
17865 * threads.c: remove debug output.
17867 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
17869 * threads.c (mono_thread_manage): Fix crashes if more than 64
17870 threads need to be aborted. Hopefully fixes #75899.
17872 * assembly.c (mono_stringify_assembly_name): New helper function.
17874 * class.c: Use mono_stringify_assembly_name instead of the similar
17877 * assembly.h assembly.c: Add support for calling a postload search
17878 hook if an assembly cannot be loaded.
17880 * appdomain.c: Register new search hooks which call the AssemblyResolve
17881 events in AppDomain. Fixes #75231
17883 2005-10-07 Martin Baulig <martin@ximian.com>
17885 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
17886 methods without debug info.
17888 2005-10-07 Zoltan Varga <vargaz@gmail.com>
17890 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
17893 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17895 * file-io.c: now that we return symlinks, use lstat and, when the file
17896 is a symbolic link, stat, to get the file attributes. Also avoid the
17897 conversion to/from utf16/external.
17899 2005-10-06 Zoltan Varga <vargaz@gmail.com>
17901 * class.c (mono_class_layout_fields): Compute klass->has_references
17902 correctly if an embedded valuetype is not yet initialized. Fixes
17905 2005-10-04 Martin Baulig <martin@ximian.com>
17908 (mono_metadata_load_generic_param_constraints): New public
17909 function; splitted the constraints loading out from
17910 mono_metadata_load_generic_params().
17912 * class.c (mono_class_create_from_typedef): Call
17913 mono_metadata_load_generic_param_constraints() after setting up
17914 the type and creating our parent; fixes #75329.
17916 2005-10-04 Martin Baulig <martin@ximian.com>
17918 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
17919 non-dynamic parent classes.
17921 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
17923 * file-io.c : win32 build fix (ETXTBSY seems not found).
17925 2005-10-04 Martin Baulig <martin@ximian.com>
17928 (mono_image_get_methodspec_token): Make the cache actually work;
17931 2005-10-04 Martin Baulig <martin@ximian.com>
17933 * class.c (mono_class_name_from_token): Removed the unneccessary
17934 `MonoGenericContext *' argument.
17936 2005-10-04 Martin Baulig <martin@ximian.com>
17939 (method_from_methodspec): Make the caching work again; fixes the
17940 performance regression from #76262.
17942 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17946 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
17947 GetFileSystemEntries that performs the same work but without going
17948 into io-layer, locking, etc.
17950 2005-09-30 Zoltan Varga <vargaz@gmail.com>
17952 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
17953 ThreadState_Stopped as well. Fixes #76047.
17955 2005-09-29 Martin Baulig <martin@ximian.com>
17958 (inflate_generic_context): If the new context has a `gmethod', set
17959 its `container' that that gmethod's `container'.
17962 (mono_metadata_parse_generic_param): Simplify things;
17963 `generic_container = generic_context->container;' is just fine.
17965 * loader.c (method_from_methodspec): Code cleanups.
17967 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17969 * decimal.c: fix warning (and let gcc generate correct
17970 code on ARM with optimizations).
17972 2005-09-28 Martin Baulig <martin@ximian.com>
17975 (method_from_memberref): Added `MonoGenericContext *class_context'
17976 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
17977 (method_from_methodspec): If we're a memberref, use the enclosing
17978 context when parsing its parent. Fixes #76262; see gtest-206.cs.
17980 2005-09-28 Martin Baulig <martin@ximian.com>
17982 * object.c (mono_runtime_invoke_array): Added support for
17983 MONO_TYPE_GENERICINST; fixes #75917.
17985 2005-09-27 Martin Baulig <martin@ximian.com>
17987 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
17988 `k->byval_arg.type' to determine the actual type.
17990 * loader.c (method_from_methodspec): Removed some hacks.
17992 2005-09-27 Ben Maurer <bmaurer@ximian.com>
17994 * class-internals.h (mono_field_is_deleted): Do the test for
17995 rtspecialname before we check the actual name of the field. This
17996 prevents us from dereferencing a pointer into the string table,
17997 saving us from accessing a few pages
17999 * *.c: Replace the use of {Enter,Leave}CriticalSection with
18000 macros. This will allow a deadlock debugger to easily be plugged
18003 2005-09-27 Martin Baulig <martin@ximian.com>
18005 * loader.c (method_from_methodspec): Create a "signature"
18006 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
18008 2005-09-27 Martin Baulig <martin@ximian.com>
18011 (inflate_generic_class): Correctly set the new context's
18015 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
18016 instead of a `MonoGenericContext *'.
18017 (mono_method_signature_full): Take a `MonoGenericContainer *'
18018 instead of a `MonoGenericContext *'.
18021 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
18022 instead of a `MonoGenericContext *'.
18023 (mono_metadata_parse_method_signature_full): Likewise.
18025 2005-09-26 Martin Baulig <martin@ximian.com>
18028 (mono_class_from_generic_parameter): Set `klass->generic_container'
18029 (mono_class_from_generic_parameter): Likewise.
18030 (mono_bounded_array_class_get): We inherit the generic container
18031 from the element class.
18034 (find_method, find_method_in_class): Take a `MonoGenericContext *'
18035 argument rather than computing it here.
18036 (method_from_memberref): Correctly set the generic context before
18037 parsing the signature. Fixes #75681.
18039 2005-09-26 Zoltan Varga <vargaz@gmail.com>
18041 * object.c (mono_class_has_special_static_fields): Fix warnings.
18043 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18045 * assembly.c: Add parse_public_key function, to
18046 par the public keys. Also added mono_assembly_name_parse_full,
18047 to define it the parsed key should be freed or not.
18048 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
18049 to parse a long format assembly name.
18050 * metadata-internals.h: Keep mono_assembly_name_parse_full as
18051 private, since calling it to preserve the key requires
18052 freeing it manually.
18054 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
18056 * locales.c : removed HAVE_ICU part.
18058 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
18060 * object.c (mono_class_create_runtime_vtable): Avoid calling
18061 field_is_special_static if the klass has no special static fields.
18063 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
18064 (MonoCachedClassInfo): Likewise.
18066 * object.c (mono_class_has_special_static_fields): New helper function.
18068 2005-09-23 Zoltan Varga <vargaz@gmail.com>
18070 * class.c (mono_class_create_from_typedef): Don't call
18071 interfaces_from_typedef_full for enums.
18072 (mono_class_create_from_typedef): Compute the base types of enums directly
18073 without calling mono_class_setup_fields ().
18074 (mono_class_find_enum_basetype): New helper function.
18076 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
18077 one place inside the string heap.
18079 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
18081 * class.c: locking fixes, code cleanups, some docs added.
18082 Allocate some data structures in the image mempool.
18084 2005-09-23 Zoltan Varga <vargaz@gmail.com>
18086 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
18089 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
18091 * class-internals.h, class.c, reflection.c: reduce memory taken by
18094 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
18096 * metadata.c, metadata.h, loader.h: documentation updates, code and
18099 2005-09-23 Zoltan Varga <vargaz@gmail.com>
18101 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
18104 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
18105 page faults caused by the runtime while reading metadata.
18107 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18109 * socket-io.c: the field names were changed 3 months ago and no one
18110 realized until bug #76077 got filed!
18112 2005-09-20 Martin Baulig <martin@ximian.com>
18114 * icall.c (assembly_icalls): Removed some unused debugger icalls.
18116 2005-09-20 Martin Baulig <martin@ximian.com>
18118 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
18119 write the rank into the class entry.
18121 2005-09-20 Martin Baulig <martin@ximian.com>
18123 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
18125 2005-09-19 Zoltan Varga <vargaz@gmail.com>
18127 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18129 * icall.c (custom_attrs_defined_internal): New icall.
18131 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
18133 (mono_custom_attrs_construct_by_type): New helper function.
18135 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
18137 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
18138 terminate the resulting string. Fixes #76123.
18140 2005-09-16 Martin Baulig <martin@ximian.com>
18143 (mono_debug_add_method): Ignore inflated methods for the moment.
18145 2005-09-14 Martin Baulig <martin@ximian.com>
18147 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
18149 2005-09-13 Zoltan Varga <vargaz@gmail.com>
18151 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
18152 return a success/failure indication.
18153 (mono_metadata_interfaces_from_typedef_full): Ditto.
18154 (get_constraints): Ditto.
18156 2005-09-12 Zoltan Varga <vargaz@gmail.com>
18158 * marshal.c (emit_marshal_array): Fix handling of null arrays.
18160 * marshal.c (emit_marshal_array): Add support for returning string
18161 arrays from delegates. Fixes #76063.
18163 * marshal.c: Use the emit_ldloc/stloc macros where possible.
18165 2005-09-11 Zoltan Varga <vargaz@gmail.com>
18167 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
18170 2005-09-09 Zoltan Varga <vargaz@gmail.com>
18172 * reflection.c icall.c: Fix after mono_get_exception_type_load
18175 * assembly.c (mono_assembly_get_assemblyref): New helper function.
18176 (mono_assembly_load_reference): Use the new helper.
18178 * class-internals.h (MonoLoaderError): New structure containing
18179 information about type loading errors.
18181 * class-internals.h loader.c: Add APIs to store per-thread loader
18184 * loader.c class.c: Set the loader error if needed.
18186 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
18188 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
18190 * decimal.c: fixed to handle the broken ARM fp format.
18192 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
18194 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
18197 2005-09-06 Martin Baulig <martin@ximian.com>
18199 * domain.c (supported_runtimes): Added v2.0.50727.
18201 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
18203 * culture-info.h: reduce the size of some structures.
18205 2005-09-05 Martin Baulig <martin@ximian.com>
18207 Reflect latest API changes in the August CTP.
18210 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
18211 ("MonoType.HasGenericArguments"): Removed.
18212 ("MonoMethod.BindGenericParameters"): Renamed to
18213 "MakeGenericMethod".
18214 ("MethodBuilder.BindGenericParameters"): Renamed to
18215 "MakeGenericMethod".
18217 2005-09-05 Martin Baulig <martin@ximian.com>
18219 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
18221 2005-09-05 Martin Baulig <martin@ximian.com>
18223 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18225 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
18226 generic_container is non-NULL.
18228 2005-09-05 Martin Baulig <martin@ximian.com>
18230 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18232 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
18234 2005-08-29 Michal Moskal <malekith@nemerle.org>
18236 * reflection.c (encode_locals,
18237 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
18238 for large generic types.
18240 2005-09-05 Martin Baulig <martin@ximian.com>
18242 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18244 * class.c (mono_dup_array_type): New public method.
18245 (mono_metadata_signature_deep_dup): New public method.
18246 (dup_type): Correctly duplicate array and function types.
18248 2005-09-05 Martin Baulig <martin@ximian.com>
18250 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18252 * reflection.c (get_default_param_value_blobs): Handle generic types
18253 and generic methods.
18255 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
18257 * class.c: Fixed error reporting (method/class were inversed) for
18258 inheritance demands.
18259 * security-manager.c|h: Added the AppDomain when calling the managed
18260 System.Security.SecurityManager.InheritanceDemand method.
18262 2005-09-01 Raja R Harinath <rharinath@novell.com>
18264 * reflection.c (encode_marshal_blob): 'marshaltype' and
18265 'marshaltyperef' are alternate sources for the custom marshaler
18268 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
18270 * class.c: fix creation of array classes with rank == 1
18271 (patch by Ankit Jain <jankit@novell.com>).
18273 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
18275 * object.c: fix check for creating the bound data for arrays vs
18278 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18280 * object.c: configuration file name is now based on the executable name,
18281 not the image name. Fixes bug #75931.
18283 2005-08-29 Zoltan Varga <vargaz@gmail.com>
18285 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
18286 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
18288 2005-08-25 Zoltan Varga <vargaz@gmail.com>
18290 * rand.c: Use wincrypt.h instead of WinCrypt.h.
18292 2005-08-24 Ankit Jain <jankit@novell.com>
18293 Raja R Harinath <rharinath@novell.com>
18295 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
18296 called by it recursively.
18297 (mono_class_init): Remove special case in pending_init handling, since it's
18298 superseded by the fix to mono_class_from_typeref.
18300 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
18302 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
18303 BROKEN_THREAD_START stuff.
18305 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
18307 * class-internals.h object.c: Add a new kind of trampoline called a delegate
18310 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
18312 * object.c (mono_delegate_ctor): Replace the original function address with
18313 a delegate trampoline.
18315 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
18317 * icall.c: add boolean argument to base64_to_byte_array and
18318 InternalFromBase64String to control whether a whitespace-only string
18319 is allowed (or should casue a FormatException to be thrown). We need
18320 this as the behavior has changed between MS.NET 1.x and 2.0, and we
18321 to match the MS behaviour in both profiles.
18322 * appdomain.c: Bump corlib version.
18324 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18326 This patch implements a big portion of publisher policy
18327 support, used to bind assembly versions and redirect
18328 one assembly from version A to version B.
18331 New GSList loaded_assembly_bindings, for storing the cached
18333 (assembly_binding_maps_name): New static function for checking if a
18334 assembly binding information maps an assembly name.
18335 (mono_assembly_binding_info_free): New function for freeing
18336 assembly binding information resources.
18337 (get_publisher_policy_info): New static function for retrieving
18338 assembly binding information from a MonoImage.
18339 (compare_versions): New static function for comparing an assembly
18340 binding information data and the version of an assembly name.
18341 (check_policy_versions): New static function for checking if an
18342 assembly binding info mapping an assembly name is valid for it.
18343 (mono_assembly_load_publisher_policy): New static function for
18344 loading the 'policy.major.minor.MyAssembly' image for an assembly
18345 with an assembly name 'aname'.
18346 (mono_assembly_bind_version): New static function for updating
18347 assembly redirection.
18348 (mono_assembly_apply_binding): New static function for applying
18350 (search_binding_loaded): New static function for searching
18351 loaded assembly binding infos in the cache domain.
18352 (mono_assembly_load_full): Don't apply assembly binding for
18353 reflection only assemblies.
18355 * metadata-internals.h: Add MonoAssemblyBindingInfo,
18356 which contains information about assembly binding. Also
18357 declare signature for mono_config_parse_publisher_policy ()
18358 function, used to retrieve pub policy info.
18361 (publisher_policy_start): New static function used to parse publisher
18362 policy config files.
18363 (publisher_policy_parser): New static MonoParseHandler containing
18364 the functions used when parsing config files.
18365 (mono_config_parse_publisher_policy): New function for parsing
18366 publisher policy files.
18368 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
18370 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
18372 * marshal.c (mono_delegate_free_ftnptr): Ditto.
18374 * object.c (mono_get_addr_from_ftnptr): New helper function.
18376 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
18378 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18380 2005-08-19 Dick Porter <dick@ximian.com>
18382 * threads.c, threads.h, appdomain.c, appdomain.h,
18383 profiler-private.h, monitor.c, object.c, object-internals.h,
18384 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
18385 store the thread ID, so it can hold a 64 bit value if needed.
18387 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
18389 * reflection.c (mono_reflection_create_dynamic_method): Store the
18390 handle class into the method references as well so ldtoken works in
18393 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
18396 2005-08-19 Ankit Jain <jankit@novell.com>
18399 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
18400 here rather than using the method signature of a arbitrary function
18401 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
18403 Hack done with Harinath.
18405 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18407 * threadpool.c: disable printing stack traces when we get a exception
18408 in a threadpool thread. I need to do more testing to figure out which
18409 cases actually print this. Fixes bug #75828.
18411 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18413 * icall.c: there might be ignored whitespace after the last '='. This
18414 fixes length computation and bug #75840.
18416 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
18418 * assembly.c (mono_assembly_load_full): Consider .exe extension as
18419 well. Fixes #75809.
18421 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
18424 * reflection.c (create_custom_attr_data): Ditto.
18426 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
18428 * locales.c, culture-info.h : removed RegionLCIDMap.
18429 * culture-info-tables.h : regenerated.
18431 2005-08-16 Martin Baulig <martin@ximian.com>
18433 * class.c (mono_type_get_name_recurse): Small fix.
18435 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
18437 * locales.c : indentation fixie.
18439 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
18441 * object-internals.h,
18445 icall.c : added RegionInfo table support.
18446 * culture-info-table.h : regenerated for region support.
18448 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
18450 * reflection.c (resolve_object): handle all kinds of MonoMethod
18451 including generic ones
18453 2005-08-12 Ankit Jain <jankit@novell.com>
18455 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
18456 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
18458 2005-09-12 Lluis Sanchez <lluis@ximian.com>
18460 * process.c: Don't close a thread handle when it's NULL. This is a
18461 workaround for bug #75733.
18463 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
18465 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
18467 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
18469 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
18471 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18473 * threadpool.c: if a work item in the thread pool has a callback that
18474 catches a exception, don't propagate it after invoking the callback.
18477 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
18479 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
18481 * class-internals.h (MonoCachedClassInfo): Add some new fields.
18483 * class.c (mono_class_init): Load field info lazily in the AOT case.
18485 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
18487 2005-08-03 Ankit Jain <jankit@novell.com>
18490 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
18491 PInvoke calling convention is 0.
18493 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
18495 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
18496 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
18498 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
18500 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
18501 to handle threads not started by the GC (patch by Michael Meeks
18502 <michael.meeks@novell.com>).
18504 2005-07-31 Kamil Skalski <nazgul@omega.pl>
18506 * reflection.c: Make buffer used in emitting types larger for some
18507 big generic types (patch by Michal Moskal).
18509 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
18511 * mono-debug.c: Fix some (not all) alignment problems.
18513 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18515 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
18516 Invoke mono_image_load_from_data_full passing the refonly
18520 (mono_assembly_open_from_bundle): Add the refonly argument,
18521 in order to pass it to other methods it calls to.
18522 (do_mono_assembly_open): Add the refonly argument, in order
18523 to pass it to other methods it calls to.
18524 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
18525 the refonly parameter to it.
18527 * image.c: Add loaded_images_refonly_hash and
18528 loaded_images_refonly_guid_hash to cache the reflection
18529 only loaded images.
18530 (mono_images_init): Initialize the hash tables used for
18531 caching the reflection only images.
18532 (load_modules): Invoke mono_image_open_full passing the refonly
18533 parameter to load the modules the correct way.
18534 (build_guid_table): Add the refonly argument, to re-build the
18535 correct hash table.
18536 (do_mono_image_open): Added the refonly argument, in order to
18537 define it for the loaded image.
18538 (mono_image_loaded_full): New function, which receives an
18539 additional parameter to look for the image in the refonly or
18540 non-refonly section.
18541 (mono_image_loaded): Updated, using mono_image_loaded_full.
18542 (mono_image_loaded_by_guid_full): The same case that happens
18543 with mono_image_loaded_full.
18544 (mono_image_loaded_by_guid): Likewise.
18545 (register_image): Use the ref_only variable inside MonoImage
18546 to decide in which hash table store the current image.
18547 (mono_image_open_from_data_full): Rename
18548 mono_image_open_from_data to mono_image_open_from_data_full,
18549 adding the refonly argument, to define the ref_only variable
18551 (mono_image_open_from_data): Return
18552 mono_image_open_from_data_full.
18553 (mono_image_open_full): Rename mono_image_open to
18554 mono_image_open_full, receiving the new refonly argument,
18555 to pass it to inner methods.
18556 (mono_pe_file_open): Update this function, to open
18557 a MonoImage as a non-refonly image.
18558 (mono_image_close): Use the refonly variable inside
18559 MonoImage to remove the image from the correct caches.
18561 * image.h: Add the signatures of mono_image_open_full,
18562 mono_image_open_from_data_full, mono_image_loaded_full,
18563 mono_image_loaded_by_guid_full.
18565 * metadata-internals.h: Add the ref_only field to
18568 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18570 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
18571 Fix the last behavior, which used to load the assemblies and
18572 extract MonoReflectionAssemblyName information, instead of
18573 extract it from the metadata tables. Needed for Reflection
18576 2005-07-29 Martin Baulig <martin@ximian.com>
18578 * mono-debug-debugger.c
18579 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
18583 (mono_debug_address_from_il_offset): Check whether we have
18584 debugging support before attempting to take the lock.
18585 (mono_debug_source_location_from_address): Likewise.
18586 (mono_debug_source_location_from_il_offset): Likewise.
18587 (mono_debug_il_offset_from_address): Likewise.
18588 (mono_debug_address_from_il_offset): Likewise.
18590 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
18592 * class.c (mono_class_from_name_case): Add support for dynamic images.
18595 * object.c (mono_class_compute_gc_descriptor): Add a workaround
18598 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
18600 * reflection.c (mono_method_get_object): Fix warning.
18602 2005-07-28 Martin Baulig <martin@ximian.com>
18605 (mono_debug_add_wrapper): Also write the wrapper type.
18607 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
18609 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
18611 * class.c (mono_class_init): Avoid reading nested classes if the AOT
18612 data indicates the class has none.
18614 2005-07-26 Ben Maurer <bmaurer@ximian.com>
18616 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
18617 loader lock with the debugger lock. Prevents deadlocks for beagle.
18619 Beagle can now run on an smp box for a weekend without any
18622 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
18624 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
18625 in a module. Fixes #75629.
18627 2005-07-26 Martin Baulig <martin@ximian.com>
18629 * mono-debug.c (mono_debug_add_wrapper): New static method.
18630 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
18631 interncall or a wrapper.
18633 * mono-debug.h (MonoDebugWrapperData): New public typedef.
18634 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
18635 (MONO_DEBUGGER_VERSION): Bump to 51.
18637 * mono-debug-debugger.c
18638 (mono_debugger_add_type): Removed this empty function.
18639 (mono_debugger_add_method): Likewise.
18641 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
18643 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
18644 before accessing method->slot.
18646 2005-07-21 Jb Evain <jbevain@gmail.com>
18648 * reflection.c (method_encode_clauses/class): Handle filters clauses.
18651 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
18653 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
18656 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
18658 * image.h image.c: Add mono_image_get_guid () API function.
18660 2005-07-19 Ben Maurer <bmaurer@ximian.com>
18662 There were issues when multiple threads tried to load
18663 assemblies. A deadlock was created between assemblies_mutex and
18664 mono_domain_assemblies_lock. This fixes the issue by making the
18665 assembly ref counting be lock free. See bug 75586.
18667 * image.c (mono_image_close): The add ref function here was using
18668 Interlocked operations while the unref was using a mutex and a
18669 --. I don't think this was ever a bug that would be exposed in a
18670 non-pendantic way (ie, by an embedder doing a ref on one thread
18671 and an unref on another), but for the sake of correctness, this is
18674 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
18675 (mono_assembly_load_reference): Call mono_assembly_addref rather
18676 than touching the refcount ourselves.
18677 (mono_assembly_close): Use InterlockedDecrement to unref the
18678 assembly. Don't acquire the lock unless it is actually needed.
18680 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
18682 * class.c (mono_class_layout_fields): Fix calculation of has_references
18685 2005-07-12 Martin Baulig <martin@ximian.com>
18687 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18690 (mono_type_hash): Provide better hashing for generic instances.
18691 (mono_generic_inst_hash): Improve hashing.
18692 (mono_generic_class_hash): Likewise.
18694 * reflection.c (mymono_metadata_type_hash): Improve hashing for
18697 2005-07-12 Martin Baulig <martin@ximian.com>
18699 * reflection.c (mono_reflection_create_runtime_class): Remove the
18700 hack for generic type definitions and non-`Run' assemblies.
18701 (mono_reflection_bind_generic_parameters): Also use
18702 `klass->wastypebuilder' to check for TypeBuilders.
18704 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
18706 * class.c (mono_class_layout_fields): Fix calculation of has_references
18709 * class.c (inflate_generic_class): Fix a leak.
18710 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
18713 2005-07-11 Martin Baulig <martin@ximian.com>
18715 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
18718 2005-07-11 Martin Baulig <martin@ximian.com>
18720 * loader.c (find_method): Also lookup in
18721 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
18723 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18725 * appdomain.c (mono_domain_unload): Don't free the error message
18726 before passing it to mono_get_exception_...
18728 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
18730 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
18732 * threads.c: try to better guess an available RT signal (bug #75387).
18734 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18736 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
18739 2005-07-07 Martin Baulig <martin@ximian.com>
18741 * class.c (mono_type_get_name_full): Return NULL for
18742 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
18745 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18747 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
18748 exit the appdomain as well being aborted.
18750 * threadpool.c: Create all threadpool threads inside the root appdomain, and
18751 change back to the root domain after calling managed code. This enables
18752 appdomains using threadpools to be unloaded.
18754 2005-07-07 Martin Baulig <martin@ximian.com>
18756 * class-internals.h
18757 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
18758 into `MonoDynamicGenericClass' since we only need it for dynamic
18761 * reflection.c (mono_class_bind_generic_parameters): We don't need
18762 to compute the `parent' here.
18764 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
18766 * culture-info-table.h : regenerated.
18768 2005-07-06 Martin Baulig <martin@ximian.com>
18771 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
18773 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
18775 2005-07-06 Martin Baulig <martin@ximian.com>
18777 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
18778 we're doing a signature-only comparision; fixes #74945.
18780 2005-07-06 Martin Baulig <martin@ximian.com>
18782 * class-internals.h (MonoGenericClass): Moved some things out into
18783 a new `MonoInflatedGenericClass' type.
18784 (MonoInflatedGenericClass): New type; the `klass' of a
18785 `MonoGenericClass' is now computed lazyly in
18786 mono_get_inflated_generic_class().
18788 * class.c (mono_get_inflated_generic_class): New public function.
18789 (mono_class_inflate_generic_method): Removed the unused
18790 `MonoClass *' argument.
18791 (setup_generic_vtable): Don't call mono_get_inflated_method() on
18793 (mono_class_create_generic): Make this static and merge it with
18794 mono_class_create_generic_2(); we're now called automatically from
18795 mono_get_inflated_generic_class().
18797 * loader.c (mono_method_signature): Call
18798 mono_get_inflated_method() here.
18800 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
18802 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
18803 type of fields with RVA.
18805 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
18806 for this pseudo class.
18807 (my_mono_class_from_generic_parameter): Likewise.
18808 (mono_class_init): Allow interfaces to have cctors.
18810 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
18812 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
18813 lazily for AOT methods.
18815 2005-07-05 Martin Baulig <martin@ximian.com>
18817 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
18818 returns FALSE for a successful match, not TRUE.
18820 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
18822 * loader.c (mono_method_get_index): Optimize this a bit.
18824 2005-07-04 Martin Baulig <martin@ximian.com>
18827 (class_compute_field_layout): Move the check for generic type
18828 definitions into mono_class_layout_fields(). Fixes #74684.
18829 (mono_class_from_generic_parameter): Correctly compute
18830 `klass->parent'; fixes #75457.
18832 * reflection.c (register_assembly, register_module): Make sure
18833 `domain->rejobject_hash' is already created.
18835 2005-07-02 Martin Baulig <martin@ximian.com>
18837 * class-internals.h
18838 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
18839 `MonoDynamicGenericClass'.
18841 2005-07-01 Lluis Sanchez <lluis@ximian.com>
18843 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
18844 returned by a field getter is null, since null is a valid value.
18846 2005-07-01 Martin Baulig <martin@ximian.com>
18848 * reflection.c (mono_reflection_generic_class_initialize): Update
18849 the `dgclass->fields [i].parent' to the correct class.
18850 (mono_image_get_fieldref_token): Use the declaring type, not the
18853 2005-07-01 Martin Baulig <martin@ximian.com>
18855 * loader.c (find_method): Also look in the interfaces; fixes #75429.
18857 2005-06-30 Ben Maurer <bmaurer@ximian.com>
18859 * threads.c (thread_cleanup): assert that thread != NULL
18860 (wait_for_tids_or_state_change): We were using the wrong variable
18861 when accessing wait->threads. `i' was always out of the bounds of
18864 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18866 * loader.c: map user32 and kernel32 to libMonoSupportW
18868 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
18870 * appdomain.c (unload_thread_main): Mark this as WINAPI.
18872 2005-06-28 Martin Baulig <martin@ximian.com>
18874 * loader.c (method_from_methodspec): Fix #75334.
18876 2005-06-28 Martin Baulig <martin@ximian.com>
18878 Fix #74953 - Arrays now implement the generic IList<T> interface
18879 on the 2.0 platform.
18881 * class-internals.h (MonoDefaults): Added `generic_array_class'.
18883 * reflection.c (mono_class_bind_generic_parameters): New public
18884 function; similar to mono_reflection_bind_generic_parameters(),
18885 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
18887 * domain.c (mono_init_internal): Try to initialize.
18888 `mono_defaults.generic_array_class' here; this'll only succeed if
18889 we're using the 2.0 corlib.
18892 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
18893 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
18894 (mono_lookup_internal_call): Added support for nested classes.
18897 (mono_get_method_from_token): Set `result->signature->pinvoke' if
18898 we're an interncall and have generic arguments.
18901 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
18902 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
18903 instance of System.Array.InternalArray<T> for arrays, so they
18904 implement the generic IList<T> interface.
18906 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
18908 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
18909 (chastamar@yahoo.com). Fixes #75374.
18911 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
18913 * culture-info-table.h: regenerated.
18915 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18917 * icall.c: handle spaces correctly for base64 strings.
18919 2005-06-26 Ben Maurer <bmaurer@ximian.com>
18921 * *.c: Kill some warnings.
18923 2005-06-23 Duncan Mak <duncan@novell.com>
18925 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
18926 that this builds on Solaris 10 (x86).
18928 2005-06-23 Martin Baulig <martin@ximian.com>
18931 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
18932 generic type definitions.
18934 2005-06-23 Martin Baulig <martin@ximian.com>
18938 * metadata.c (mono_class_get_overrides): Renamed to
18939 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
18940 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
18941 pass it to mono_get_method_full().
18943 2005-06-22 Ben Maurer <bmaurer@ximian.com>
18945 * reflection.c (mono_reflection_create_runtime_class): take the
18946 mono_domain_lock in this method. Prevents deadlocks
18948 2005-06-22 Martin Baulig <martin@ximian.com>
18950 * loader.c (method_from_methodspec): Fix #75330.
18952 2005-06-22 Martin Baulig <martin@ximian.com>
18954 * reflection.c (type_get_qualified_name): Use
18955 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
18956 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
18957 argument; use it if we don't have an assembly name.
18959 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
18961 * object.c: In mono_message_init, set "copy out" flag for in
18962 parameters with the [Out] flag.
18964 2005-06-21 Martin Baulig <martin@ximian.com>
18967 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
18970 2005-06-21 Martin Baulig <martin@ximian.com>
18972 * class.c (mono_class_init): Don't initialize `class->fields' for
18973 generic instances since they're initialized again in
18974 compute_field_layout().
18975 (compute_field_layout): Set the field's `generic_info' here; fix
18978 2005-06-21 Martin Baulig <martin@ximian.com>
18980 * class-internals.h
18981 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
18983 * metadata.c (mono_metadata_generic_method_equal): Also
18984 distinguish the `generic_class'; fixes #75334.
18986 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18990 * domain-internals.h:
18991 * reflection.c: 'domain_assemblies' field is now protected by its own
18992 lock. Don't call into managed code to run the AssemblyLoad event if we
18993 now there are no registered delegates for it.
18995 2005-06-20 Martin Baulig <martin@ximian.com>
18997 * class.c (mono_class_is_assignable_from): Use a custom version of
18998 mono_class_has_parent() to make things work for generic instances;
19001 2005-06-20 Martin Baulig <martin@ximian.com>
19003 * loader.c (method_from_methodspec): Apply a patch from
19004 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
19006 2005-06-20 Martin Baulig <martin@ximian.com>
19008 * class.c (mono_class_init): Reverted Zoltan's last change; it
19011 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
19013 * threads.c (wait_for_tids_or_state_change): Add missing locking.
19015 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19017 * socket-io.c: fix the index in the socket array for writable/error
19018 sockets. Fixes bug #75306.
19020 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
19022 * class.c (mono_class_init): Allow interfaces to have static ctors.
19024 2005-06-17 Martin Baulig <martin@ximian.com>
19026 * loader.c (method_from_methodspec): Use `context->container' when
19027 parsing the `gmethod->inst'.
19029 2005-06-17 Martin Baulig <martin@ximian.com>
19031 * class.c (mono_type_get_name_recurse): Don't add the assembly
19032 name for type arguments.
19034 2005-06-15 Martin Baulig <martin@ximian.com>
19036 * reflection.c (mono_image_get_inflated_method_token): Encode
19037 correct klass; fixes #75260.
19039 2005-06-13 Michal Moskal <malekith@nemerle.org>
19041 * icall.c: Make GetCorrespondingMethod/Constructor take
19042 MonoReflectionMethod method not MonoMethod. Removed
19043 MonoType.GetCorrespondingField, and make
19044 MonoGenericType.GetCorrespondingField take name not
19047 2005-06-13 Michal Moskal <malekith@nemerle.org>
19049 * reflection.c (field_encode_signature, encode_locals):
19050 Make sizes of buffers for types larger (for big generic types).
19051 (create_generic_typespec,
19052 mono_reflection_sighelper_get_signature_local,
19053 mono_reflection_sighelper_get_signature_field):
19054 Add asserts for too small buffers.
19056 2005-06-15 Martin Baulig <martin@ximian.com>
19058 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
19059 if our parent is not a dynamic type.
19061 2005-06-15 Martin Baulig <martin@ximian.com>
19063 * class-internals.h (MonoTypeNameFormat): New enum.
19066 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
19067 (mono_type_get_full_name): Removed.
19068 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
19069 argument instead of the boolean's.
19071 * icall.c (ves_icall_System_MonoType_getFullName):
19072 Added `gboolean assembly_qualified'.
19075 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
19077 * reflection.c (mono_reflection_parse_type): Parse the new type
19080 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19082 * icall.c: no need to convert from utf16 to utf8 and then back again
19083 after the call to GetLogicalDrives.
19085 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19087 * icall.c: frombase64. Fix problems exposed by new tests.
19089 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19091 * icall.c: added internal calls for converting char [] and strings in
19092 base64 into byte [].
19094 2005-06-10 Martin Baulig <martin@ximian.com>
19096 * class.c (mono_class_create_generic_2): Read the nested classes
19097 from the metadata rather than from `gklass->nested_classes' since
19098 `gklass' might not be initialized yet.
19100 2005-06-09 Duncan Mak <duncan@novell.com>
19102 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
19103 all public headers. Fixes #74919.
19105 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
19107 * domain.c: The key for proxy_vtable_hash is now a pointer
19108 array. Added new GHashFunc and GCompareFunc functions for this.
19110 * class.h: The list of interfaces in MonoRemoteClass is known in
19111 advance and can't grow (we create a new MonoRemoteClass if needed),
19112 so now the interface array can be allocated together with
19115 * object.c: Added a new method create_remote_class_key.
19116 Fixed mono_remote_class so it does not depend on
19117 mono_upgrade_remote_class.
19118 Removed extend_interface_array.
19119 Added new method clone_remote_class(), which makes a copy of a remote
19120 class and adds a new interface or class to it.
19121 mono_upgrade_remote_class() now creates a new remote class (or gets
19122 it from the cache) if an vtable upgrade is needed. In this way
19123 we make sure that other objects sharing the same remote class
19124 don't get the new vtable with unwanted interfaces.
19126 * object-internals.h:
19127 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
19129 * marshal.c: Track changes in mono_upgrade_remote_class().
19131 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
19132 * icall.c: Add runtime methods for obtaining members of inflated
19133 class, which were created from supplied non-inflated members. It
19134 is used in internal Get{Method,Constructor,Field} methods in
19137 2005-06-09 Martin Baulig <martin@ximian.com>
19140 (mono_reflection_bind_generic_method_parameters): Fix #75169.
19142 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19143 * reflection.c (mono_image_basic_init): Define
19144 Version in MonoDynamicAssembly.
19146 2005-06-08 Martin Baulig <martin@ximian.com>
19151 (mono_method_signature_full): New public method; takes a
19152 `MonoGenericContext *'.
19153 (find_method): Use mono_method_signature_full() and pass the
19154 klass'es context to it.
19156 * class.c (mono_class_is_inflated_method): Use
19157 mono_method_signature_full() and pass the context to it.
19159 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
19161 * object.c: add proper locking in mono_remote_class_vtable(),
19162 fixes possible memory corruption.
19164 2005-06-08 Michael Meeks <michael.meeks@novell.com>
19166 * marshal.c (mono_remoting_marshal_init): set
19167 initialized after initialization.
19169 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
19171 * locales.c : hush.
19173 2005-06-06 Michael Meeks <michael.meeks@novell.com>
19175 * object.c (extend_interface_array): fix really silly
19176 memory corrupting / comparison bug.
19178 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19180 * reflection.c: Functions added to support the creation
19181 of CustomAttributeData, which includes Attribute data
19182 used by ReflectionOnly methods.
19184 * reflection.h: mono_reflection_get_custom_attrs_data and
19185 mono_custom_attrs_data_construct added (functions exposed).
19187 * icall.c: Added mono_reflection_get_custom_attrs_data
19190 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
19192 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
19195 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
19197 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
19199 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
19200 dynamic DllImportAttribute.
19202 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
19203 dynamic DllImportAttribute.
19205 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
19208 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19210 * threads.c: avoid segfault when an unstarted thread is aborted.
19212 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
19214 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
19215 Returns the name and version of the runtime for reporting.
19217 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19219 * appdomain.c: bump corlib version.
19220 * object-internals.h: new field in MonoReflectionAssembly.
19222 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19224 * object-internals.h: Carlos forgot to add this field.
19226 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19228 * icall.c: Added create_version to create instances
19229 of Version of MonoReflectionAssemblyName. This change helps
19230 the AssemblyName tests to keep running fine.
19232 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
19234 * object.c (mono_method_return_message_restore): A somehow less
19235 intrusive fix for #75138.
19237 2005-06-03 Raja R Harinath <rharinath@novell.com>
19239 * object.c (mono_method_return_message_restore): Fix computation
19240 of expected number of out args.
19242 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
19244 * reflection.c (mono_image_get_method_info): Fix the case when the
19247 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
19249 * object.c: Added missing null check in
19250 mono_method_return_message_restore.
19252 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
19254 * reflection.c (mono_image_get_method_info): Handle the case when
19257 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
19259 * object.c: When creating the vtable for a proxy, take into account
19260 all inherited interfaces, not only the ones registered in
19261 iclass->interfaces. This fixs bug #74996.
19262 Also, in mono_method_return_message_restore, verify that the array
19263 of out args has the expected lengh.
19265 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19267 * socket-io.c: update the timeout in Poll when the call is interrupte.
19269 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19271 * socket-io.c: support abort/suspend in Select_internal after last
19274 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19276 * threadpool.c: remove warning.
19278 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19281 * socket-io.[ch]: Select_internal uses poll() now when available, thus
19282 removing the 1024 limit from select(). Runtime part of the fix for
19285 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19287 * socket-io.c: when resolving the addresses for the same
19288 host returned by gethostname(), get the local IPs from the interface
19289 list. Loopback addresses are discarded if the are interfaces up with
19290 non-loopback ones. Fixes bug #63265.
19292 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
19294 * appdomain.c, verify.c, object-internals.h, reflection.c:
19295 bumped corlib number to 36, and added new extra_flags field
19296 to ReflectionMethodBuilder and friends. Fixes #75060.
19298 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
19300 * gc.c: register a new weak link only if the object is non-null
19303 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
19305 * culture-info.h : short time pattern too.
19307 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
19309 * culture-info.h : expand long time pattern string length.
19311 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
19313 * culture-info-table.h : update (more French date format; #72788).
19315 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
19317 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
19318 the method is static. Fixes #75029.
19320 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
19322 * reflection.c: Update the table_idx field of method builders after
19323 saving the module, since it can change. This is a workaround for
19326 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
19328 * culture-info-table.h : update (additional French date format).
19330 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
19332 * icall.c (ves_icall_type_Equals): Revert last change.
19334 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
19336 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
19338 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
19340 * class-internals.h: Added executioncontext_class field to
19341 MonoDefaults structure.
19342 * domain.c: Cache System.Threading.ExecutionContext class in
19344 * object.c: Capture the ExecutionContext for asynchroneous calls in
19345 mono_async_result_new.
19346 * object-internals.h: Added execution_context and original_context
19347 fields to MonoAsyncResult. Added execution_context to MonoThread.
19348 * security-manager.c|.h: Added mono_get_context_capture_method to
19349 return the capture method (if required by the security manager or by
19350 the framework version used).
19351 * threadpool.c: Apply capture (if present) ExecutionContext in
19352 mono_async_invoke and revert to original context after it completes.
19354 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
19356 * culture-info-table.h : updated (real hacky solution for zh-CHT).
19358 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
19360 * culture-info-table.h : zh-CHT related workaround.
19362 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
19364 * marshal.c (emit_marshal_custom): Add some error checking and call the
19365 methods in the ICustomMarshaler interface. Fixes #74875.
19367 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
19368 native->managed wrappers.
19370 2005-05-12 Martin Baulig <martin@ximian.com>
19372 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
19373 here and use the loader lock.
19375 * mono-debug.c: Properly lock when the debugger is not attached.
19376 (mono_debug_init): Release the initial lock if we're not running
19379 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
19381 * marshal.c (emit_marshal_custom): Pass through NULL values without
19382 calling the custom marshalling routines.
19384 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
19385 conversion in structures. Fixes #74882.
19387 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
19389 * culture-info-table.h : zh-* cultures were missing.
19391 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
19393 * threads.c: Added a new event background_change_event which is signaled
19394 when a thread changes its background mode.
19395 Moved here several checks previously done in managed code. The checks
19396 require the thread lock, and using the thread lock in managed code
19397 can result in deadlocks.
19398 Merged Start_internal and Thread_internal into a single method. Now
19399 Thread_internal does all work of creating and starting a thread.
19400 Added icalls for setting and getting the state of the object. Moved from
19401 managed code to avoid locking there.
19402 Added wait_for_tids_or_state_change() which is called instad of
19403 wait_for_tids when waiting for non-backround threads to end. This method
19404 will return if one of the threads ends or the background_change_event
19406 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
19407 the background mode. This method signals the background_change_event
19410 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
19411 removed Start_internal.
19413 2005-05-11 Martin Baulig <martin@ximian.com>
19415 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
19416 to order of some fields to get proper alignment on 64-bit machines.
19418 2005-05-11 Martin Baulig <martin@ximian.com>
19420 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
19421 changes as they're broken and completely fuck up the debugger.
19423 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
19425 2005-05-10 Martin Baulig <martin@ximian.com>
19427 * reflection.c (mono_reflection_generic_class_initialize): Don't
19428 call mono_class_setup_parent() here.
19430 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19432 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
19433 send/receive timeout use an integer in milliseconds. We were using a
19436 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19439 (internal_get_cultures): reserve the first slot of the array for the
19440 InvariantCulture, which will be filled in managed code.
19442 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
19444 * reflection.c (mono_image_fill_module_table): Initialize the
19445 GENERATION field as well.
19447 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19449 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
19450 Monitor.Enter on the object.
19452 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
19454 * threads.c: Enable the wait for running threads when exiting.
19455 * icall.c: Suspend all threads before exiting.
19457 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
19459 * assembly.c (mono_assembly_load_reference): Fix warning.
19461 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19463 * threadpool.c: changed the default number of threads per cpu. From now
19464 on, the default will be 20 + (5 * number of cpus) instead of 50.
19466 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
19468 * loader.c (mono_method_get_signature_full): Add locking here.
19470 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
19472 * appdomain.c: Moved methods for parsing and freeing assembly
19473 names to assembly.c.
19474 * assembly.c, domain-internals.h: Created public methods for parsing
19475 assembly names. Fixed mono_assembly_load_with_partial_name:
19476 it now finds the best match, taking into account the version,
19477 token and culture specified in the partial name. Also return
19478 the latest version if no version information is specified.
19480 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
19482 * threadpool.c: replace check for SocketAsyncCall class.
19484 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19486 * threadpool-internals.h:
19487 * Makefile.am: added threadpool-internals.h
19489 * threadpool.c: call mono_unhandled_exception on exceptions not handled
19490 that happen in threadpool threads (tested on MS).
19491 (mono_thread_pool_remove_socket): new function that dispatch any pending
19492 AIO call on a socket that is closing. By now only epoll really needs it,
19493 as select/poll wake up when the socket closes.
19496 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
19498 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
19500 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
19502 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
19504 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
19506 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
19508 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
19509 has an abort request, convert it into a suspend request.
19511 2005-04-30 Ben Maurer <bmaurer@ximian.com>
19513 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
19514 warning for the usage of `UnmanagedFunctionPointerAttribute' which
19515 is not supported yet.
19517 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19519 * image.c: register assemblies loaded from data (bundles) in the loaded
19520 assemblies hash. Fixes bug #74772.
19522 2005-04-29 Martin Baulig <martin@ximian.com>
19524 * class.c (mono_type_get_name_recurse): Update to the new naming
19525 schema from the latest .NET 2.x beta2.
19526 (mono_class_setup_vtable_general): If we're a generic instance,
19527 copy the vtable from our generic type definition and inflate all
19530 * loader.c (find_method): Update to the new naming schema from the
19531 latest .NET 2.x beta2.
19533 2005-04-29 Raja R Harinath <harinath@gmail.com>
19535 * class.c (mono_class_init): Add a mono_loader_unlock to the
19538 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
19540 * icall.c (ves_icall_System_Environment_Exit): Remove the
19541 suspend_all_other_threads () call for the time being, since it can hang.
19543 * threads.c (mono_thread_manage): Similarly, disable the waiting for
19544 the background threads to exit, since it can also hang.
19546 * class.c (mono_class_init): Applied patch from Ankit Jain
19547 (radical@gmail.com). Avoid pending init errors when a field refers
19548 to a nested class using a typeref. Fixes #74734.
19550 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
19551 this for dynamic modules.
19553 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19555 * threads.c: don't wait for threads that are in the process of aborting
19556 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
19557 and waiting for background threads to finish. This makes xsp and
19558 mod-mono-server exit without random length delays and/or hangs.
19560 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19562 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
19564 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
19566 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
19567 dynamic types to prevent infinite loops. Fixes #74727.
19569 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
19570 ..._is_assignable_to.
19572 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
19574 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
19576 2005-04-25 Martin Baulig <martin@ximian.com>
19578 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
19581 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
19583 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
19585 * reflection.c (build_compressed_metadata): Set metadata header
19588 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
19590 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
19591 number into an integral and a decimal part. Fixes #70473.
19593 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
19595 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
19597 * culture-info-table.h : reflected the latest locale-builder output.
19599 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19601 * threadpool.c: check for SuspendRequested too when deciding if
19602 mono_thread_interruption_checkpoint should be called.
19604 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19606 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
19607 * threads.c: remove interruption_mutex and use Interlocked instead. When
19608 suspending all the threads, wait for all the suspended events at once.
19609 If we're shutting down and get an APC that is going to be queued,
19610 call mono_thread_execute_interruption immediately, as the thread might
19611 be sleeping on a pthread condition or mutex.
19613 * icall.c: call mono_runtime_set_shutting_down before suspending the
19616 Fixes bug #74693. And now xsp is happier when exiting.
19618 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
19620 * loader.c (mono_stack_walk): Fix #74690.
19622 2005-04-22 Martin Baulig <martin@ximian.com>
19624 * mono-debug.h (MonoDebugMethodJitInfo): Added
19625 `MonoDebugMethodJitInfo *jit'.
19627 * mono-debug.c (mono_debug_read_method): Cache the
19628 MonoDebugMethodJitInfo in `address->jit'.
19629 (mono_debug_free_method_jit_info): New public method.
19631 2005-04-22 Martin Baulig <martin@ximian.com>
19633 * class.c (mono_class_is_assignable_from): Disallow
19634 type parameter -> interface.
19636 2005-04-21 Dick Porter <dick@ximian.com>
19638 * threads.c (mono_thread_create): Turn an assertion into an error.
19640 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
19642 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
19644 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
19645 Fix some gcc 4.0 warnings.
19647 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
19649 * file-io.c: fix alt dir separator char on unix systems
19650 and cleanup (fixes bug #71214).
19652 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
19654 * marshal.c: Use CALLVIRT instead of CALL when dispatching
19655 a call to a remote domain, since the method may be an
19656 interface method in the client domain. This fixes bug #74192.
19658 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19660 * threadpool.c: recv/send are now performed before going back to managed
19661 code to save one transition.
19663 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19665 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
19667 * metadata/threadpool.c: removed hack to workaround the bug above.
19671 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
19673 * reflection.c reflection.h: Fix handling of parameter defaults in
19674 dynamic methods. Also fixes handling of parameter attributes.
19677 * mono-debug.c (mono_debug_close_image): Fix warning.
19679 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19681 * socket-io.h: replaced old unused field with new 'blocking'.
19682 * threadpool.c: restore socket blocking state on windows(tm).
19684 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
19686 * icall.c: don't return the codebase in the AssemblyName[] returned by
19687 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
19688 * object-internals.h: Removed FIXME (fields were presents) and fixed
19689 versioncompat declaration.
19691 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19693 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
19694 not closed, so don't cleanup when it happens.
19696 2005-04-13 Chris Toshok <toshok@ximian.com>
19698 * mono-debug-debugger.h: change prototype for
19699 mono_debugger_lookup_type.
19701 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
19702 this function, although it should probably be named
19703 mono_debugger_init_type.
19705 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19707 * threadpool.c: fix non-AIO case.
19709 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
19711 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
19712 the built-in profiler to measure just JIT compilation times.
19714 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19716 * threadpool.c: the epollfd might be closed by another thread at
19717 any time, so ignore EBADF at treat it as a "we're closing" sign.
19719 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19721 * threadpool.c: release the semaphores with a count equals to the number
19722 of working threads in both IO and regular pools. Fixed typo that messed
19723 up the count of IO pool threads. Don't initialize the pipe handles if
19726 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19728 * threadpool.c: some systems don't like a NULL when deleting the socket
19731 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19733 * threadpool.c: fix semaphore allocation.
19735 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19737 * threadpool.c: added epoll() based implementation for asynchronous IO
19738 that is used instead of the default poll() when available.
19739 It can be disabled by setting MONO_DISABLE_AIO.
19741 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19743 * threadpool.c: windows needs 'closesocket' and instead of returning
19744 0 when the stream is closed while in select, it returns -1. Fixes bug
19747 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
19749 * class.c (class_compute_field_layout): Fix the regression caused by
19752 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19754 * threadpool.c: separate pool for socket async. IO.
19755 * threadpool.h: mono_max_worker_threads is not a global any more.
19757 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
19759 * class.c (class_compute_field_layout): Fix #74549.
19761 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19763 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
19764 use 2 connected sockets instead.
19766 2005-04-08 Miguel de Icaza <miguel@novell.com>
19768 * mono-config.c: Add new entry point for mkbundle
19769 mono_config_parse_memory.
19771 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19773 * threadpool.c: removed another unused function.
19775 2005-04-08 Ankit Jain <radical@corewars.org>
19777 * reflection.c (get_default_param_value_blobs): Add 'types'
19778 parameter to get the types encoded in the constant table.
19779 (mono_param_get_objects): Use the type from the constant table,
19780 not the type of the parameter, when creating default values.
19781 Handle null default values correctly.
19783 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19790 * socket-io.c: removed dead code for async IO.
19792 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19794 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
19796 * threadpool.c: intercept socket async. calls and pass them to a thread
19797 that is polling and dispatching the job items to the threadpool as
19798 socket become ready. Fixes bugs #71217, #71933.
19800 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
19801 between char and short/ushort arrays.
19803 * socket-io.c: remove dead code.
19805 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
19808 icall.c : removed InternalToUpper_Comp() and
19809 InternalToLower_Comp().
19811 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
19813 * char-conversions.h : The tables were incorrectly generated. Should
19814 be generated against invariant culture.
19816 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
19818 * object.c (mono_runtime_invoke_array): Fix return value when
19819 passing pre-created valuetype objects to ctors.
19821 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
19822 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
19825 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
19827 * domain.c: removed g_assert for runtimesecurityframe_class. This is
19828 only used with --security and hides the wrong corlib version error.
19830 2005-03-30 Joshua Tauberer <tauberer@for.net>
19832 * class.c: Changed mono_class_name_from_token so that types
19833 outside of a namespace don't have an initial period. Improved
19834 the g_warning message used in _mono_class_get when loading
19836 * assembly.c: In mono_assembly_load_reference, when an assembly
19837 can't be found, "No such file or directory" is misleading and
19838 unhelpful because a few paths were checked for the presence of
19839 the assembly. When that happens (ENOENT), display a nicer
19840 message indicating the directories that were searched. In all
19841 cases, the warning is made easier to read for non-hackers.
19843 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
19845 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
19847 * appdomain.h|domain.c: Removed inline from functions.
19848 * appdomain.c: Reduced warnings when compiling on windows.
19849 * icall.c: Fixed output_debug declaration to gunichar2*.
19850 * mono-config.c: Reduced warnings when compiling on windows.
19851 * rand.c: Added missing "windows.h". Added missing return value.
19852 * rawbuffer.c: Added missing winsock2.h for windows.
19853 * sysmath.h: Added mono-compiler.h header to allow/ease
19854 compilation with non-GCC compilers.
19855 * threads.c: Fixed declarations to compile with VS.NET C compiler.
19856 Removed cast warnings.
19858 Adapted from the work of J Lothian (for VC6).
19860 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
19862 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
19865 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
19867 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
19870 2005-03-27 Raja R Harinath <harinath@gmail.com>
19872 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
19873 has to be in $(exec_prefix). $(prefix) is for arch-independent
19874 stuff, and it would probably use $(prefix)/share rather than
19877 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19879 * console-io.c: added 2 includes that might be missing.
19881 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
19883 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
19886 * reflection.c (create_custom_attr): Allocate the params array using
19887 alloca so it gets GC tracking.
19889 2005-03-23 Chris Toshok <toshok@ximian.com>
19891 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
19894 2005-03-24 Raja R Harinath <rharinath@novell.com>
19896 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
19897 changes to pick up any changes in prefix, etc.
19899 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19901 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
19903 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
19904 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
19906 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19908 * class-internals.h object-internals.h class.c reflection.c: Extend the
19909 mono_lookup_dynamic_token () function to return the class of the
19912 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
19913 well. Fixes #73848.
19915 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
19917 * security-manager.c: Skip inheritance checks for intra-corlib
19918 class inheritance and method overrides. This skips a lot of checks
19919 and (anyway) permissions cannot work until corlib is loaded.
19921 2005-03-23 Martin Baulig <martin@ximian.com>
19923 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
19924 MONO_TYPE_GENERICINST.
19926 2005-03-23 Martin Baulig <martin@ximian.com>
19928 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
19930 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19932 * class.c: added locking comments to some functions.
19933 Cache the interface offsets arrays (saves about 20 KB
19934 of runtime memory in a typical app).
19935 Reduce the time overhead in mono_class_setup_supertypes ().
19937 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
19939 * icall.c: speedup and fix leaks in GetMethodsByName and
19940 GetPropertiesByName.
19942 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19944 * reflection.c: some locking fixes.
19946 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19948 * metadata.c: added missing break in case statement.
19950 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
19952 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19953 typedbyref return values. Fixes #73941.
19955 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
19957 * security-manager.c|h: Added demandunmanaged method and
19958 suppressunmanagedcodesecurity class to MonoSecurityManager.
19959 Renamed aptc class to allowpartiallytrustedcallers.
19961 2005-03-17 Martin Baulig <martin@ximian.com>
19963 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
19965 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19967 * file-io.c: disabled file async. IO using aio_*. It uses the
19968 threadpool now. Workaround for bug #73718.
19970 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19972 * assembly.h, mono-config.c: added code to deal with bundled configs
19973 for bundled assemblies.
19975 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
19977 * *.c, private.h: cleanup, removing old private.h header file.
19979 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
19981 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
19982 and throw_on_unmappable_char attributes.
19984 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
19986 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
19987 _ProcessName_internal.
19989 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
19991 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
19994 * icall.c threads.c threads-types.h: Remove slothash icalls as they
19995 are no longer used.
19997 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
19999 * object.c (compute_class_bitmap): Add support for generics. Fixes
20002 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
20004 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
20006 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20008 * filewatcher.c: commented out the code for windows watcher, as we don't
20009 use it (we use the managed implementation instead).
20011 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
20013 * object-internals.h (MonoThread): Remove 'unused1' field.
20015 * appdomain.c: Bump corlib version.
20017 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
20019 * reflection.c (mono_reflection_create_runtime_class): Remove the
20020 AssemblyBuilder.Save optimization since it causes too many problems.
20022 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
20024 * exception.c|h: Added mono_get_exception_reflection_type_load to
20025 create a ReflectionTypeLoadException object.
20026 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
20027 to return NULL is a InheritanceDemand fails during reflection. Updated
20028 ves_icall_System_Reflection_Assembly_GetTypes to throw a
20029 ReflectionTypeLoadException if an InheritanceDemand fails during
20030 reflection. Added icall mapping for GetLinkDemandSecurity.
20031 * security-manager.c|h: Added ves_icall_System_Security_
20032 SecurityManager_GetLinkDemandSecurity internal call to return the
20033 class and methods permissions set for a LinkDemand. Removed unused
20034 fields in MonoSecurityManager.
20036 2005-03-10 Martin Baulig <martin@ximian.com>
20038 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
20039 it's a generic instance.
20041 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
20043 * reflection.c (mono_get_object_from_blob): Applied patch from
20044 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
20046 * class.c (mono_class_is_assignable_from): Another try at fixing
20047 #73469 without breaking anything.
20049 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
20051 * class.c: (mono_class_is_assignable_from): Revert the last changes
20052 since they don't work with generics.
20054 * class.c (mono_class_is_assignable_from): Fix build bustage.
20056 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
20057 the managed IsAssignableFrom method. Fixes #73469.
20059 * reflection.c (mono_reflection_call_is_assignable_from): New helper
20062 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
20064 * object.c (mono_load_remote_field_new): Fix returning uninitialized
20065 memory when the remoting callback does not sets the out arguments.
20068 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
20071 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
20073 * object-internals.h (MonoStackFrame): Sync with managed object layout.
20075 * appdomain.c: Bump corlib version.
20077 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
20079 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
20082 * threads.c (mono_thread_attach): Detect threads which are not started
20083 by the GC pthread wrappers.
20085 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
20087 * icall.c: Added new icall for RNG.
20088 * rand.c|h: Added new icall to open the RNG. This allows to share a
20089 single handle on Linux to access /dev/urandom and fix #73183.
20091 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
20093 * object.c: setting the new vtable in a transparent proxy object must
20094 not change the GC descriptor.
20096 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20098 * object.c: fixed compilation without GCJ support.
20099 * reflection.c: for runtime-created types ensure klass->has_references
20100 is correct (bug #73215).
20102 2005-03-02 Martin Baulig <martin@ximian.com>
20104 * class.c (mono_class_is_assignable_from): Make this work if
20105 `oklass' is a generic instance; fixes #72831.
20107 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
20109 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
20112 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
20114 * marshal.c: Reorganize native->managed marshalling code to also use
20115 the emit_marshal_... functions.
20117 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
20119 * object.c: typed allocs have issues with bitmap sizes > 30,
20120 so check for max_set >= 30.
20122 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
20124 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
20125 managed code. Fixes #73012.
20127 * metadata.h (MonoMarshalSpec): Add elem_mult field.
20129 * metadata.c reflection.c: Load/Emit elem_mult as well.
20131 * metadata.h (MonoMarshalSpec): Add comment.
20133 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
20135 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
20136 num_elem to -1 if not given.
20138 * object-internals.h (MonoReflectionMarshal): Add has_size field.
20140 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
20143 2005-03-01 Marek Safar <marek.safar@seznam.cz>
20145 * null-gc.c (mono_gc_free_fixed): Was not compilable.
20147 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
20149 * reflection.c (encode_marshal_blob): Encode param_num field as well.
20151 * object-internals.h (MonoReflectionMarshal): Add param_num field.
20153 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
20155 * object.c: generalized the reference bitmap creation
20156 and added hooks for the new GC.
20157 * class-internals.c: removed the gc_bitmap field from MonoClass.
20159 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20161 * domain.c: help the compiler to produce better code
20162 in mono_jit_info_table_find ().
20164 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
20166 * object.c: make all allocations look typed.
20168 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20170 * socket-io.c: load Mono.Posix if it's not loaded already
20173 2005-02-24 Martin Baulig <martin@ximian.com>
20175 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
20176 * reflection.c (dup_type): Likewise.
20178 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
20180 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
20181 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
20183 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20185 * domain.c, threads.c, object-internals.h: make the critical thread
20186 local vars use the fast access mode (even when we're compiled in
20187 a lib). Provide accessors to be used by the jit during codegen.
20189 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20191 * appdomain.c: Changed hook functios behavior to include
20192 support for the reflection only assemblies. Some icalls were changed
20193 to support the mentioned assemblies too. Signatures of static methods
20194 try_assembly_resolve and real_load now have an additional parameter:
20197 * assembly.c: General changes to mono_assembly_ methods to support
20198 reflection only api. Functions mono_assembly_open, mono_assembly_load,
20199 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
20200 suffix, to support an additional gbool parameter to specify whether
20201 the assembli is reflection only or not. Created some new hook functions
20202 to add support for reflection only assemblies. Signatures of static
20203 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
20204 have now an additional parameter: refonly.
20206 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
20207 indicating whether the assembly is reflection only or not.
20209 * exception.c: Add mono_get_exception_invalid_operation.
20211 * icall.c: Throw an InvalidOperationException when trying to invoke
20212 a property/method/event, or trying to set/get the value of a field.
20213 Also add an icall to retrieve the ref_only flag to the
20214 MonoReflectionAssembly.
20216 2005-02-23 Chris Toshok <toshok@ximian.com>
20218 Part of fix for #72827.
20219 * mono-debug.c (mono_debug_add_method): add lexical block data to
20220 the info we write. Kind of a hack at the moment - we copy the
20221 lexical block info from the MonoDebugMethodInfo to the
20222 MonoDebugMethodJitInfo here, before writing it.
20223 (mono_debug_read_method): read the lexical block info.
20225 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
20227 * debug-mono-symfile.h: add lexical block support.
20229 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
20232 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
20234 * loader.c (mono_lookup_pinvoke_call): Fix warning.
20236 * object.c (mono_runtime_free_method): Call mono_free_method () and
20237 put the TODOs there.
20239 * loader.c (mono_free_method): Free up most memory allocated for
20242 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20244 * reflection.c: properly flag a Type argument to a
20245 named custom attr value (bug #72248).
20247 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20249 * reflection.c: reduce code duplication in named custom
20250 attribute encoding.
20252 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
20254 * reflection.c: properly encode custom attrs of type object
20257 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
20259 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
20261 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
20263 * socket-io.c: load System.dll if it's not loaded already
20264 (bug #72850 and #70477).
20266 2005-02-21 Martin Baulig <martin@ximian.com>
20268 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
20271 2005-02-21 Martin Baulig <martin@ximian.com>
20273 * reflection.c (mono_image_build_metadata): We also need to
20274 "fixup" the MethodImpl table after we computed the final method
20275 indices. Call fixup_methodimpl() to do that.
20276 (fixup_methodimpl): New private method.
20278 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
20280 * assembly.c: special case mscorlib.dll (bug#72536),
20281 patch from Carlos Alberto Cortez.
20283 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
20285 * threads-types.h threads.c: Fix build bustage.
20287 * threads.c: Use a union for long<->double conversions.
20289 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
20290 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
20292 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
20293 containing the checkpoint call with NOT_TAKEN.
20295 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
20296 checkpoint before pushing the arguments, so they won't have to be
20299 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20301 * domain.c, assembly.c, domain-internals.h: make some data
20302 const and relocation-free.
20304 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
20306 * object.c, appdomain.c, class-internals.h: introduce the
20307 MonoClassRuntimeInfo structure to hold the info needed to
20308 use a class at runtime. Made mono_class_vtable() lock-free
20309 for all the appdomains.
20311 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
20313 * metadata-internals.h, image.c: introduce a per-image mempool to
20314 be used for memory that has the same lifetime as the image.
20316 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
20318 * domain.c: In mono_init_internal(), instead of selecting the first
20319 runtime version supported by an executable, get a list of all
20320 supported versions and select the one for which an mscorlib exists
20321 (since even if the runtime supports a given version, it doesn't mean
20322 that the framework for that version is installed).
20323 Modified get_runtimes_from_exe to support this behavior.
20324 In supported_runtimes, added information about additional system
20327 * assembly.c: Added support for more than one system assembly version
20328 per runtime version. Updated the assembly list.
20329 In mono_assembly_remap_version, removed the initial version check,
20330 since we don't know to which version we need to compare until we
20331 get the version set on which the assembly is based.
20332 Moved the code for loading corlib into the new method
20333 mono_assembly_load_corlib(), so it can be used by the initialization
20336 * domain-internals.h: Updated data structures and added declaration
20337 for mono_assembly_load_corlib.
20339 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
20341 * reflection.c (resolve_object): Fix the creation of the signature in
20342 the SignatureHelper case.
20344 * assembly.c (mono_assembly_remap_version): Fix binary search.
20346 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
20348 * class.c: Added inheritance check when a method is overloaded (from a
20349 virtual method or when implementing an interface) and when a class is
20350 inherited. Added functions to set a failure for a class and to
20351 retreive the exception from a failure.
20352 * class-internals.h: Added fields to MonoClass to keep the exception
20353 information status for inheritance (or other exceptions) to be thrown
20354 later (i.e. not at load time).
20355 * object.c: Throw the inheritance SecurityException when a type is to
20356 be created with either class or method inheritance violations.
20357 * reflection.c|h: Fix when getting declsec from a class. Removed
20358 unrequired code for class. Improved sanity in parameter naming.
20359 * security-manager.c|h: Added functions to check for class and method
20362 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
20364 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
20365 and has_finalize in dynamic types as well.
20367 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
20369 * culture-info-table.h : fixed currency format for en-GB (and so on).
20371 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
20373 * gc.c: ensure the GC handles never have 0 as a value.
20375 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
20377 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
20378 a pointer to a struct to unmanaged code. Fixes #72625.
20380 2005-02-16 Martin Baulig <martin@ximian.com>
20382 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
20384 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
20386 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
20388 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
20390 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
20392 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
20393 UnmanagedFunctionPointerAttribute, use it for determining calling convention
20396 * reflection.c (mono_custom_attrs_get_attr): New helper function.
20398 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
20400 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
20402 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
20403 changes to make the current context a field in MonoThread.
20405 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
20407 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
20410 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
20411 extracted from mono_marshal_get_native_wrapper.
20413 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
20414 to create wrappers around native functions.
20416 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
20417 delegates for arbitrary function pointers. Fixes #71472.
20419 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20421 * threads.c: cleaned up the code a little.
20423 2005-02-15 Martin Baulig <martin@ximian.com>
20425 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
20428 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
20429 allocate larger chunks if needed.
20431 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
20433 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
20436 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
20438 * domain.c: keep the domains in an array and ensure the domain ids
20439 are kept small, so they can be used as indexes to domain-specific data
20440 with a small memory overhead.
20442 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
20444 * icall.c: Handle byref types in Type icalls. Fixes #72544.
20446 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
20448 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
20450 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
20452 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
20454 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
20457 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
20459 2005-02-12 Ben Maurer <bmaurer@ximian.com>
20461 * domain-internals.h: add the hashtable here.
20463 * class-internals.h: Remove `info' from MonoMethod
20465 * domain.c: Add a new hashtable, jit_trampoline_hash
20467 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20469 * object.c: don't set the value of static fields
20472 2005-02-11 Martin Baulig <martin@ximian.com>
20474 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
20475 (mono_debug_add_method): Silently ignore the method if it's too big.
20476 (mono_debug_add_type): Likewise.
20478 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
20480 * threads.c, appdomain.c: remove #ifdefs from the code.
20482 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
20484 * metadata-internals.h: Added flags to MonoAssembly to cache the most
20485 common security informations. This allows us to stay in unmanaged code
20486 when doing LinkDemand and it's special cases (except for the first
20487 time for initialization). The flags a very much used with --security.
20488 * reflection.c|h: Added code to get declarative security attributes
20489 for LinkDemand and InheritanceDemand. This required to refactor the
20490 existing code for Demand.
20491 * security-manager.c|h: Added new method fields for the special cases
20494 2005-02-10 Martin Baulig <martin@ximian.com>
20496 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
20497 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
20499 2005-02-10 Martin Baulig <martin@ximian.com>
20501 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
20502 debugging code; this is almost a complete rewrite.
20504 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
20506 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20508 * domain.c, object.h: expose mono_string_equal () and
20509 mono_string_hash ().
20510 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
20511 it's implemented in managed code.
20513 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20515 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
20516 lo leak objects between appdomains.
20518 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20520 * assembly.c: old compilers compilation fix from
20521 robertj@gmx.net (Robert Jordan).
20523 2005-02-09 Ben Maurer <bmaurer@ximian.com>
20525 * class-internals.h: Little reminder for the future.
20527 * debug-helpers.c: Fix up wrapper_type_names
20529 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20531 * image.c, metadata-internals.h: when loading an image from a file,
20532 mmap all of it and use the same codepaths as when using a
20533 in-memory image: the code is simpler and we use less memory
20534 (both writable and readonly).
20536 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
20538 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
20539 API to alloc runtime data structures that need to be tracked by the
20540 GC and contain pointers.
20541 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
20542 make the code more readable and eventually use a different GC.
20544 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
20546 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
20549 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
20551 * object.c: In release_type_locks(), don't release the cctor lock
20552 if it has already been released. This fixes a crash in the
20555 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20557 * gc.c, marshal.c, icall.c: register a delegate for finalization
20558 only when the native function pointer has been allocated for it.
20560 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20562 * object.c: cleaned up some code, allocate objects that are
20563 pointer free with the atomic malloc variant. Allocate memory
20564 for static data from the mempool if it's pointer-free.
20565 Allocate the bounds array at the end of the array data, when needed.
20566 * object-internals.h, object.h: move a private function in a private
20568 * class.c: handle missing case in tracking references in fields.
20570 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
20572 * class.c, class-internals.h: keep track if a type has
20573 reference fields in either the instance or static fields.
20575 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
20577 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
20578 and renamed to MonoRuntimeInfo. Added fields to store the expected
20579 framework assembly version. Changed mono_get_framework_version and
20580 mono_get_runtime_version for a single mono_get_runtime_info method.
20582 * assembly.c: Added method to remap system assembly versions to the
20583 current executing runtime version. Removed old mapping code.
20584 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
20586 * icall.c, reflection.c: Track api changes.
20588 2005-02-06 Miguel de Icaza <miguel@novell.com>
20590 * loader.c (method_from_memberref): Improve error reporting,
20591 produce the class name instead of the typeref/typedef index.
20593 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
20595 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
20597 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20599 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
20600 stdcall and charset name mangling. Reorganize the code and add
20601 some tracing stuff.
20603 2005-02-05 Ben Maurer <bmaurer@ximian.com>
20605 * monodiet.c: More iters!
20607 * marshal.c: Iter usage.
20609 * icall.c: Iter usage.
20611 * object.c: Use iters.
20613 * debug-helpers.c: More iters
20615 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20617 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
20620 2005-02-05 Ben Maurer <bmaurer@ximian.com>
20622 * mono-debug-debugger.c: use iters
20624 * class.c, class-internals.h: mono_class_setup_events is static
20627 * All callers: use iters
20629 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20631 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
20632 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
20634 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
20636 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
20638 * marshal.h: Add prototypes for ldfld/stfld_remote.
20640 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
20641 this is called during startup.
20643 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
20645 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
20646 MonoThreadsSync struct private in monitor.c. Changed the way
20647 MonoThreadsSync is allocated so it's faster and there is no
20648 need to keep track of it with a finalizer and it uses less memory.
20649 This also finally allows us to allocate mono objects as ptrfree when
20650 there are no reference fields.
20652 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
20654 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
20655 disappearing link to the GC interface and use them to simplify
20656 the gchandles code.
20658 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
20660 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
20661 stfld_remote which call mono_load/store_field_new. This allows methods
20662 calling ldfld/stfld wrappers to be AOTed.
20664 * console-io.c: Include sys/filio.h under solaris.
20666 * console-io.c: Include curses.h if needed correctly.
20668 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
20670 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
20671 method->klass as well.
20673 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
20675 * class.c (mono_class_init): Switch on lazy initialization of
20678 * class.c (mono_class_get_finalizer): Handle the case when the
20679 finalizer is inherited.
20681 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20683 * console-io.c: <curses.h> is needed by term.h on solaris.
20685 2005-02-03 Ben Maurer <bmaurer@ximian.com>
20687 * icall.c, class-internals.h, monodiet.c, class.c: Remove
20688 mono_class_setup_properties where possible. Remove this ftn from
20689 the header file, and make it static.
20691 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
20693 * loader.c: Add missing setup_... call.
20695 * class.c: Add missing setup_... calls.
20697 * class.c (mono_class_init): Switch on lazy initialization of
20698 the generic vtable.
20700 * class.c (mono_class_init): Fix generics broken by the recent changes.
20702 * monodiet.c (handle_type): Add missing setup_... calls.
20704 * class.c: Back out garbage in previous patch.
20706 * class.c: Add missing setup_... calls.
20708 * class.c (mono_class_get_method_from_name_flags): Avoid calling
20709 mono_class_setup_methods () if possible.
20711 * class-internals.h (MonoClass): Add 'has_cctor' flag.
20713 * class-internals.h (MonoCachedClassInfo): New structure.
20715 * class.c: Initialize properties and events fields of MonoClass lazily.
20717 * class.c: Add infrastructure for lazily initializing the methods and
20718 vtable fields of MonoClass. Not yet used.
20720 * class.c (mono_class_get_finalizer): New helper function.
20722 * class.c: Add infrastructure for loading some class related data from
20725 * object.c: Add infrastructure for initializing the vtable from data
20728 * gc.c (run_finalize): Use mono_class_get_finalizer ().
20730 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
20731 appropriate initialization function before accessing parts of the
20732 MonoClass structure.
20734 * marshal.c: Fix warnings.
20736 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
20738 * mono-debug-debugger.c (get_exception_message): Use
20739 mono_class_get_method_from_name_flags ().
20741 2005-02-02 Ben Maurer <bmaurer@ximian.com>
20743 * reflection.c, appdomain.c: Replace a few manual searches that
20744 Zoltan missed. (Paolo approved this part of my initial patch).
20746 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
20748 * profiler.c: disable recording statistical events at report time.
20750 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20752 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
20753 to byteswap arrays of enum values, too (bug #72080).
20755 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
20757 * appdomain.c (set_domain_search_path): Allow this to be called if
20758 domain->setup is not yet set.
20760 * loader.c (mono_method_get_index): New helper function.
20762 * loader.c reflection.c: Use mono_method_get_index ().
20764 * class.c (mono_class_get_method_from_name_flags): New helper method.
20766 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
20769 * class.c (mono_class_get_cctor): New helper method.
20771 * string-icalls.c object.c class.c marshal.c reflection.c: Use
20772 mono_class_get_method () to look up methods.
20774 2005-02-01 Miguel de Icaza <miguel@novell.com>
20776 * console-io.c: Fix the build, this should work on Windows.
20778 2005-01-31 Ben Maurer <bmaurer@ximian.com>
20780 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
20781 be set to null to keep things valid
20783 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20785 * icall.c: added Console 2.0 icalls.
20786 * Makefile.am: added console-io.[ch]
20787 * console-io.[ch]: internal calls for Console 2.0 API.
20789 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20791 * class.c: make sure we consider all the interfaces
20792 when calculating max_interface_id (bug found by
20793 Jeroen Frijters running ikvm).
20795 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
20797 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
20798 valuetype fields to null.
20800 * object.c (set_value): Ditto. Fixes #71669.
20802 2005-01-31 Martin Baulig <martin@ximian.com>
20804 * metadata.c (mono_metadata_has_generic_params): New public
20805 function; checks whether something is a generic method.
20807 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20809 * appdomain.c: fix infinite recursion when adding assemblies.
20811 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
20813 * object.c: Fix small typo to return all items for Environment.
20814 GetCommandLineArgs.
20816 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20818 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
20819 reflection.c: more domain and assembly-unload related fixes
20820 and memory leaks plugs.
20822 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
20824 * 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.
20826 2005-01-29 Ben Maurer <bmaurer@ximian.com>
20828 * loader.c (mono_method_signature): Make this method lazy
20829 (mono_get_method_from_token): Don't computate the signature here.
20831 Doing this saves quite a bit of memory. I got 90 kb on starting up
20832 monodoc. It should also save some disk reads on startup.
20834 * *: MonoMethod->signature might be NULL now. You *MUST* use
20835 mono_method_signature.
20837 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
20839 * object.c (mono_runtime_get_main_args): Return an array from the
20840 current domain here. Fixes #71938.
20842 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20844 * monitor.c: formatting changes to comply with the
20845 mono coding style and remove #ifdefs from the code.
20847 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20849 * metadata.c, private.h: remove some unneeded data
20850 and use a more compact representation for table schemas.
20852 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20854 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
20855 to get a better distribution in hash tables.
20856 * *.c: use mono_aligned_addr_hash() where appropriate.
20857 * assembly.c: make var static.
20859 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
20861 * domain-internals.h: Put MonoJitInfo on a diet.
20863 * domain.c: Fix a warning.
20865 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20867 * gc.c: rework the gc handles code to reuse handles
20870 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20872 * domain.c: fixed long standing bug in mono_string_equal() which
20873 was brought to light with the ldstr changes.
20875 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
20877 * reflection.c: Remove warning by adding missing include for marshal.h
20879 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20881 * domain.c, object.c: change the ldstr_table to hold
20882 MonoString* as keys: makes the runtime isinterned lookup
20883 faster and simplifies memory management.
20885 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
20887 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
20888 possible to add imperative security checks before calling the icall.
20889 * reflection.c: Return security attributes on the original MonoMethod
20890 (and not the wrapped one). This fix permissions on icalls.
20892 2005-01-25 Dick Porter <dick@ximian.com>
20894 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
20895 the check for mktime() support actually test the mktime() return
20896 value. "Fixes" bug 71682, though the output is still different to
20899 2005-01-25 Martin Baulig <martin@ximian.com>
20901 * class.c (mono_class_is_assignable_from): Make this work for
20904 2005-01-24 Ben Maurer <bmaurer@ximian.com>
20906 * marshal.c (mono_string_utf8_to_builder)
20907 (mono_string_builder_to_utf16): We might not have ownership of the
20908 string. In thise case, we need to create a new buffer.
20910 * object-internals.h (mono_stringbuilder_capacity): sb->str might
20911 be null, in which case, use the default capacity.
20913 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20915 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
20916 GC events to the profiler.
20918 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20920 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
20921 if you don't want the GC to run.
20923 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
20925 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
20926 start providing a GC API and keeping different implementations in
20928 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
20930 2005-01-22 Ben Maurer <bmaurer@ximian.com>
20932 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
20933 mmap rather than allocating a huge buffer.
20934 (mono_debug_close_mono_symbol_file): Free the buffer allocated
20937 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
20939 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
20940 and CheckExecutionRights.
20941 * reflection.c|h: Keep the index of the declarative security to be
20942 used, instead of the pointer, when AOT compiler is used. Also add
20943 class initialization when requesting demands.
20944 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
20945 CheckExecutionRights. Both properties are now FALSE by default, and
20946 unmodifiable, unless the --security option is used.
20948 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20950 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
20951 reflection.c: properly refcount images and assemblies, many leaks fixed.
20953 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20955 * threadpool.c: increase the timeout for threads in the thread pool to
20956 10s. Fixes bug #67159.
20958 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
20960 * class-internals.h: Sun's compiler insists on explicit
20961 signed on bit fields to handle then correctly.
20963 2005-01-19 Miguel de Icaza <miguel@ximian.com>
20965 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
20966 Make the size of the array fit only the number of invalid path
20967 chars that we have.
20969 * class.c (_mono_class_get): Improve the error reporting when a
20970 class referenced is not found, to assist debugging.
20972 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
20974 * threads.c: fix off-by-one error.
20975 * domain.c: free data allocated in the domain.
20977 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20979 * reflection.c (mono_method_body_get_object): Fill out exception info
20982 * object-internals.h: Add MonoReflectionExceptionHandlingClause
20985 2005-01-19 Martin Baulig <martin@ximian.com>
20987 * loader.c (mono_get_method_constrained): Make this work again.
20989 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20991 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
20992 guint16 to match the managed side.
20994 * reflection.c (mono_reflection_body_get_object): Fill out local
20997 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
21000 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
21001 'local_var_sig_token'.
21003 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
21005 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
21008 * reflection.c (mono_method_body_get_object): Handle abstract and
21011 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
21013 * marshal.c, loader.c, class-internals.h, reflection.c:
21014 store the emthod data for a wrapper in an array instead of a list.
21016 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
21018 * marshal.c: change the code to allocate memory more
21019 conservatively for method wrappers.
21021 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
21023 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
21024 fields from MonoClass to the marshal info structure where they belong.
21026 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
21028 * class.c, object.c, class-internals.h, marshal.c: rearrange
21029 some fields and tweak some types to lower memory usage.
21031 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
21033 * threads.c (signal_thread_state_change): Handle the case when the
21034 target thread is the current thread.
21036 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
21038 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
21039 emit_ptr_to_object_conv.
21041 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
21042 marshalling. Fixes #71352.
21044 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
21046 * metadata.h, blob.h: move table enum to blob.h so it can be included
21048 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
21049 cut the size of MonoImage/MonoDynamicImage.
21051 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
21053 * profiler.c (mono_profiler_install_simple): Fix default arguments.
21055 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
21057 * reflection.c, reflection.h, icall.c: add a function to check
21058 if an attribute type is defined for a metadata object.
21060 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
21062 * object-internals.h: Added some needed fields from StringBuilder class.
21063 * marshal.c: Set the maxCapacity when creating a StringBuilder.
21065 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
21067 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
21068 threads before shutting down the runtime.
21070 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
21072 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
21074 * object-internal.h, threads.c: implement stacksize and
21075 parameterized thread start functionality (requires
21076 matching corlib). Marked broken code for later removal.
21078 2005-01-12 Martin Baulig <martin@ximian.com>
21080 * class-internals.h (MonoGenericClass): Moved the `initialized'
21081 flag to MonoDynamicGenericClass, removed `init_pending'.
21082 (MonoGenericInst): Added `is_reference' flag.
21084 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
21086 * reflection.c (mono_image_create_pefile): Only set the pe_offset
21087 inside the MSDOS header. Fixes #71201.
21089 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
21091 (mono_domain_finalize): Ditto.
21093 2005-01-12 Martin Baulig <martin@ximian.com>
21095 * class.c (mono_get_shared_generic_class): Use the cache for
21096 non-dynamic generic classes.
21098 * class-internals.h (mono_class_create_generic_2): Removed
21099 function prototype, this function is now static inside class.c.
21101 * class.c (mono_class_create_generic_2): Made this static, only
21102 call it from mono_class_init() and mono_class_setup_parent().
21103 (collect_implemented_interfaces_aux): Call mono_class_init() on
21104 the interfaces we collect.
21105 (mono_class_setup_vtable): Call mono_class_init (class->parent).
21107 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
21109 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
21110 it a real thread handle.
21112 * domain-internals.h: Move exvar_offset from MonoJitInfo to
21113 MonoJitExceptionInfo, since each catch clause needs its own variable.
21115 2005-01-11 Dick Porter <dick@ximian.com>
21117 * image.c (mono_pe_file_open): New variant on mono_image_open()
21118 that does not set up the CLI metadata; used for FileVersionInfo so
21119 it can get the data for windows binaries too.
21121 * process.c (process_read_string_block): Don't read off the end of
21122 the StringTable block.
21124 These both fix bug 70766.
21126 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
21128 * gc.c: set some fields to NULL at GC cleanup time.
21129 * threads.c: if we quit the main thread, call exit ().
21131 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
21133 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
21135 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
21137 * threads.h, threads.c, object.c: added accessor and settor for
21138 main_thread. Handle it specially when exiting from it: wait
21139 for other foreground threads to exit.
21141 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
21143 * process.c, verify.c: remove some bloat.
21145 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
21147 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
21148 the calling convention to cdecl under win32.
21150 2005-01-08 Ben Maurer <bmaurer@ximian.com>
21152 * object.c (mono_object_get_size): New function to get the size of
21153 an object instance.
21155 * profiler.c (simple_allocation): Use above.
21157 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
21159 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
21160 ves_icall_System_AppDomain_getRootDomain (as it's not required to
21161 get an appdomain by it's id and we can't assume the root's id is 0).
21162 * domain-internals.h: Change the function prototype to match.
21163 * icall.c: Change the icall table for AppDomain.
21165 2005-01-08 Miguel de Icaza <miguel@ximian.com>
21167 * locales.c (string_invariant_compare_char): Only compute
21168 GUnicodeTypes in the case where we need them. Test for ordinality
21169 first and return if so.
21174 * FIXME: here we must use the information from c1type and c2type
21175 * to find out the proper collation, even on the InvariantCulture, the
21176 * sorting is not done by computing the unicode values, but their
21177 * actual sort order.
21180 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
21182 * loader.c: for P/Invoke methods, allow the "Internal" shared
21183 library name to refer to the calling process symbol namespace.
21185 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
21187 * Makefile.am: Add the security manager to the build.
21188 * security-manager.c|h: New. Initialization of the security manager.
21190 2005-01-07 Dick Porter <dick@ximian.com>
21193 * monitor.c: Update thread state during Monitor and WaitHandle
21194 waits. Fixes bug 71031.
21196 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
21198 * reflection.c (property_encode_signature): Correctly handle when the
21199 property has no methods.
21201 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
21203 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
21205 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
21206 fields from mb, not rmb. Fixes #71017.
21208 * marshal.c (emit_ptr_to_str_conv): Add support for
21209 ByValTStr -> string conversion. Fixes #71015.
21211 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
21213 * mempool.c (mono_mempool_contains_addr): New helper function.
21215 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
21217 * metadata.c (mono_metadata_compute_size): Fix size calculation of
21218 HasSematics encoded fields.
21220 * metadata.c (mono_type_to_unmanaged): Improve error message for
21221 invalid string marshalling.
21223 * metadata.c: Fix warnings.
21225 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
21227 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
21230 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
21232 * domain.c object.c domain-internals.h: Revert part of r38077 since the
21233 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
21236 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
21238 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
21239 so methods containing these can be AOTed.
21241 2005-01-03 Martin Baulig <martin@ximian.com>
21243 * loader.c (find_method): Removed the hack for generic instances.
21244 (method_from_memberref): If our parent is a generic instance, pass
21245 its generic type definition to find_method() and then inflate the
21247 (mono_get_method_constrained): Pass the generic type definition to
21248 find_method() and inflate the method later.
21250 * class-internals.h (MonoStats): Added `generic_class_count'.
21252 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
21253 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
21255 * reflection.c (mono_custom_attrs_from_params): Don't ignore
21256 generic type definitions.
21258 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
21260 * loader.c icall.c: Fix warnings.
21262 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
21264 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
21265 blittable types. Fixes #70864.
21267 2004-12-29 Martin Baulig <martin@ximian.com>
21270 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
21272 * reflection.c (mono_method_get_object): Create a
21273 "System.Reflection.MonoGenericMethod" for inflated methods; don't
21274 call mono_get_inflated_method().
21276 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
21278 2004-12-27 Martin Baulig <martin@ximian.com>
21280 * class-internals.h (MonoMethod): Added `is_inflated' flag.
21281 (MonoMethodInflated): Added `inflated' field.
21283 * class.c (mono_class_inflate_generic_method): Don't really
21284 inflate the method here; just set the `is_inflated' flag in the
21286 (mono_class_get_inflated_method): Actually inflate the method here
21287 if it's not already inflated; we use the MonoMethodInflated's new
21288 `inflated' field as a cache.
21290 2004-12-26 Martin Baulig <martin@ximian.com>
21293 (inflate_generic_class): Moved some code out of inflate_generic_type().
21294 (mono_class_inflate_generic_method): If we're already inflated,
21295 inflate the context and use the declaring method; ie. make sure
21296 the declaring method of an inflated method is always the generic
21298 (mono_class_create_from_typedef): Create
21299 `class->generic_container->context->gclass'.
21301 2004-12-24 Ben Maurer <bmaurer@ximian.com>
21303 * metadata-internals.h, marshal.c, reflection.c: More
21304 MonoGHashTable->GHashTable.
21306 * domain-internals.h, class.c: Change MonoGHashTable's into
21307 GHashTables for some cases where no gc stuff is used
21309 All users: update apis
21311 2004-12-23 Ben Maurer <bmaurer@ximian.com>
21313 * metadata.c (builtin_types): Make this `const'. Makes this get
21314 put into the shareable section.
21315 (mono_metadata_init): Casts to make gcc happy.
21317 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
21319 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
21321 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
21323 * icall.c: Added an internal call to retrieve the position and length
21324 of assembly-level declarative security attributes (RequestMinimum,
21325 RequestOptional and RequestRefuse). This is used by the Assembly class
21326 to re-create the corresponding permission sets.
21328 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
21330 * marshal.c: fix the stelemref wrapper to be type correct
21333 2004-12-20 Ben Maurer <bmaurer@ximian.com>
21335 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
21336 to do key & 0x7fffffff. Hashtable already does this. It just
21337 results in longer code.
21339 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
21341 * appdomain.c: Bump corlib version.
21342 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
21343 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
21344 * reflection.c|h: Add functions to get declarative security infos
21345 (blob position and length) for assemblies, classes and methods.
21347 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
21349 * reflection.c: sort the constant table (bug #70693).
21351 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
21353 * object-internals.h, threads.c, domain.c: add accessors for
21354 the MonoThread and MonoDomain tls keys.
21356 2004-12-18 Martin Baulig <martin@ximian.com>
21358 * class.c (inflate_generic_type): If we're inflating a generic
21359 instance, set `ngclass->context->container = context->container';
21360 ie. the container we inflated into.
21362 * metadata.c (mono_metadata_parse_generic_param): Reflect above
21363 inflate_generic_type() changes.
21365 2004-12-17 Martin Baulig <martin@ximian.com>
21367 * class-internals.h
21368 (MonoGenericClass): Replaced `MonoType *generic_type' with
21369 `MonoClass *generic_class'. Removed `dynamic_info'; if
21370 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
21371 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
21373 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
21375 * exception.c (mono_exception_from_token): New helper function.
21377 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
21379 * assembly.c (mono_assembly_load_with_partial_name): Call
21380 mono_assembly_loaded before invoking the preload hooks. Fixes
21383 * object-internals.h (MonoThread): Change culture_info and
21384 ui_culture_info into an array.
21386 * threads.c: Cache culture info objects from more than one appdomain.
21388 * threads.c threads-types.h icall.c: Add icalls for manipulating the
21389 current UI culture.
21391 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
21393 * threads.h threads.c appdomain.c: Clear the culture_info field of
21394 all threads during unloading if they point to an object in the dying
21397 2004-12-13 Ben Maurer <bmaurer@ximian.com>
21399 * culture-info.h (TextInfoEntry): New struct
21400 * object-internals.h: sync with managed
21401 * locales.c: fill the `text_info_data' field
21402 * culture-info-tables.h: update
21404 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
21406 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
21409 2004-12-12 Ben Maurer <bmaurer@ximian.com>
21411 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
21412 (ves_icall_ModuleBuilder_getMethodToken): Ditto
21414 2004-12-12 Martin Baulig <martin@ximian.com>
21416 * mono-debug-debugger.c (write_type): If we're an enum and the
21417 builtin types have already been initialized, call mono_class_init().
21419 2004-12-11 Martin Baulig <martin@ximian.com>
21421 * metadata.c (mono_metadata_load_generic_params): Added
21422 `MonoGenericContainer *parent_container' argument; automatically
21423 compute `container->is_method'; pass the correct owner to
21426 * reflection.c (compare_genericparam): Sort the GenericParam table
21427 according to increasing owners.
21429 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
21431 * profiler.c: allow disabling the default profiler.
21433 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
21435 * decimal.c, icall.c: allow disabling System.Decimal support.
21437 2004-12-09 Marek Safar <marek.safar@seznam.cz>
21439 * reflection.c: Add support for null attribute arguments.
21441 2004-12-09 Martin Baulig <martin@ximian.com>
21443 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
21444 names to get rid of compiler warnings.
21446 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
21448 * marshal.c (mono_marshal_get_struct_to_ptr): Call
21449 mono_marshal_load_type_info (). Fixes #69625.
21450 (mono_marshal_get_ptr_to_struct): Likewise.
21452 2004-12-08 Martin Baulig <martin@ximian.com>
21454 * mono-debug.h: Bumped version number to 47.
21456 * mono-debug-debugger.c
21457 (mono_debugger_event_handler, mono_debugger_event): Take two
21458 guint64 arguments insteed of a gpointer and a guint32.
21460 2004-12-08 Martin Baulig <martin@ximian.com>
21462 * debug-mono-symfile.h
21463 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
21464 `address' to `native_offset'.
21466 2004-12-08 Martin Baulig <martin@ximian.com>
21468 * class.c (mono_class_create_from_typespec): Only inflate if we
21469 either have `context->gclass' or `context->gmethod'.
21471 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
21473 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
21475 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
21477 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
21479 * reflection.c (mono_assembly_get_object): Remove the workaround put
21480 in for the release.
21482 * appdomain.c: Use the corlib_internal field from MonoAssembly.
21484 * appdomain.c: Bump corlib version.
21486 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
21487 be visible in other appdomains.
21489 2004-12-07 Ben Maurer <bmaurer@ximian.com>
21491 * threads.c: Interlocked inc and dec for longs were messed up,
21492 use a KISS based impl for this. Fixes 70234
21494 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
21496 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
21498 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
21500 * icall.c: fix to follow policy not to allow struct
21501 arguments in icalls.
21503 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21505 * process.c: make the patch that handles spaces in file paths work
21506 on mono/windows too.
21508 2004-12-06 Martin Baulig <martin@ximian.com>
21510 * class.c (mono_class_create_generic): Call
21511 mono_class_setup_supertypes() if we're dynamic.
21512 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
21514 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
21516 * object-internals.h: Add new fields to MonoThread.
21518 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21520 * icall.c threads-types.h threads.c: Add new icalls.
21522 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
21524 * object-internals.h (MonoReflectionAssembly): Sync object layout with
21527 * appdomain.c: Bump corlib version.
21529 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
21530 internal assemblies. Fixes #69181.
21532 2004-12-05 Martin Baulig <martin@ximian.com>
21534 * class.c (mono_class_inflate_generic_signature): Make this a
21535 no-op if `context' is NULL or we don't have any type parameters;
21536 also copy `sentinelpos'.
21538 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
21540 * image.c: Add unbox_wrapper_cache.
21542 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
21544 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
21545 function generator.
21547 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
21550 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
21552 2004-12-04 Martin Baulig <martin@ximian.com>
21554 * loader.c (mono_method_get_signature_full): New public function;
21555 like mono_method_get_signature(), but with an additional
21556 `MonoGenericContext *' argument.
21558 * class.c (mono_class_inflate_generic_signature): Formerly known
21559 as inflate_generic_signature(); make this public.
21561 2004-12-04 Martin Baulig <martin@ximian.com>
21564 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
21565 instead of a `MonoGenericContainer *'.
21566 (mono_metadata_parse_array_full): Likewise.
21567 (mono_metadata_parse_signature_full): Likewise.
21568 (mono_metadata_parse_method_signature_full): Likewise.
21569 (mono_metadata_parse_generic_inst): Likewise.
21570 (mono_metadata_parse_generic_param): Likewise.
21571 (mono_metadata_parse_mh_full): Likewise.
21572 (mono_type_create_from_typespec_full): Likewise.
21574 2004-12-03 Martin Baulig <martin@ximian.com>
21576 * class-internals.h (MonoGenericContainer): Replaced the
21577 `MonoGenericContext * pointer with a `MonoGenericContext'
21578 structure and made it the first element.
21580 2004-12-03 Martin Baulig <martin@ximian.com>
21583 (inflate_generic_type): Set the `context->container' when creating
21584 a new MonoGenericContext.
21585 (mono_class_inflate_generic_method): Likewise.
21586 (mono_class_create_from_typespec): Just use `context->container'
21587 to get the container.
21589 * loader.c (method_from_methodspec): Set `context->parent' from
21590 `context->container' - and if that's a method container, use its
21591 parent. Also set the `context->container' when creating a new
21592 MonoGenericContext.
21593 (mono_get_method_from_token): Use just `context->container' to get
21596 * metadata.c (do_mono_metadata_parse_generic_class): Also set
21597 `gclass->context->container'.
21599 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
21600 the `context->container' when creating a new MonoGenericContext.
21602 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
21604 * reflection.c (compare_genericparam): Sort params with identical
21605 owner by their number. Fixes gen-111 on sparc.
21607 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
21609 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
21610 around the domain changes.
21612 * appdomain.c (mono_domain_unload): Handle the case when the thread
21613 calling Unload is itself being aborted during unloading. Fixes #70022.
21615 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
21617 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
21618 checkpoint_func as an icall so it gets a wrapper.
21619 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
21620 in the cross-appdomain wrappers too.
21622 * threads.c (mono_thread_has_appdomain_ref): Make this public.
21624 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
21626 * reflection.c: Fix some memory leaks.
21628 2004-12-02 Martin Baulig <martin@ximian.com>
21630 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
21632 * metadata.c (generic_class_cache): New static hashtable.
21633 (mono_metadata_lookup_generic_class): New public method.
21635 2004-12-02 Martin Baulig <martin@ximian.com>
21637 * class.c (mono_class_create_from_typedef): Call
21638 mono_class_setup_parent() and mono_class_create_mono_type() before
21639 parsing the interfaces.
21641 2004-12-02 Martin Baulig <martin@ximian.com>
21643 * metadata.c (generic_inst_cache): New static hashtable.
21644 (mono_metadata_lookup_generic_inst): New public function.
21645 (mono_metadata_inflate_generic_inst): New public function.
21646 (mono_metadata_parse_generic_inst): New public function.
21647 (do_mono_metadata_parse_generic_class): Use the new
21648 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
21649 since this'll also use the cache.
21651 * reflection.c (mono_reflection_bind_generic_method_parameters):
21652 Use mono_metadata_lookup_generic_inst() to use the new cache.
21654 * class.c (inflate_mono_type): Use
21655 mono_metadata_inflate_generic_inst() to inflate a generic
21656 instance; this'll also use the new cache.
21658 * loader.c (method_from_methodspec): Use
21659 mono_metadata_parse_generic_inst() and
21660 mono_metadata_inflate_generic_inst() rather than parsing it
21661 manually, so we can use the new cache.
21663 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
21665 * threads.c (wait_for_tids): Do not incorrectly free threads when
21666 the wait times out.
21668 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21670 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
21671 iter->args based on whether parameters are passed in registers (i.e.
21672 MONO_ARCH_REGPARMS is defined)
21674 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
21676 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
21677 the exception message. Fixes #70070.
21678 (method_from_methodspec): Fix warnings.
21680 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21682 * process.c: (complete_path) return the path quoted
21684 2004-12-01 Martin Baulig <martin@ximian.com>
21686 * class-internals.h (MonoGenericInst): New structure.
21687 (MonoGenericClass): Replaced `type_argc', `type_argv' and
21688 `is_open' with `MonoGenericInst *inst'.
21689 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
21690 `is_open' with `MonoGenericInst *inst'.
21692 2004-11-30 Martin Baulig <martin@ximian.com>
21694 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
21696 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
21697 to `generic_class_cache'.
21700 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
21701 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
21702 (mono_generic_inst_is_valuetype): Renamed to
21703 mono_generic_class_is_valuetype().
21705 * class-internals.h
21706 (MonoGenericInst): Renamed to MonoGenericClass.
21707 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
21708 (MonoClass): Renamed `generic_inst' to `generic_class'.
21709 (MonoGenericContext): Renamed `ginst' to `gclass'.
21711 * object-internals.h
21712 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
21714 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
21715 mono_reflection_generic_class_initialize().
21717 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
21718 now known as "System.Reflection.MonoGenericClass".
21719 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
21721 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
21723 * class-internals.h: Added a flag field to MonoClass to cache the
21724 declarative security attributes actions associated with the class.
21725 * domain-internals.h: Added booleans to MonoJitInfo to cache the
21726 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
21727 applicable to the JITted method.
21728 * reflection.c|h: Added functions to extract (as flags) which security
21729 actions are available (declaratively) for a method, class or assembly.
21730 * metadata.c|h: Added functions to search the declarative security
21731 table in the metadata.
21733 2004-11-29 Ben Maurer <bmaurer@ximian.com>
21735 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
21736 EXPORTEDTYPES are already in the class name cache, so there is no
21737 need to add extra code here to look at them. Just removes a bit of
21740 (ves_icall_System_Environment_get_TickCount): No need for #if
21741 WINDOWS. We already have the code in io-layer.
21743 2004-11-28 Martin Baulig <martin@ximian.com>
21746 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
21749 2004-11-27 Miguel de Icaza <miguel@ximian.com>
21751 * assembly.c (do_mono_assembly_open): Instead of having a
21752 conditional WITH_BUNDLE, incorporate support for bundles here, by
21753 having a global `bundles' variable holding a pointer to the actual
21756 (mono_register_bundled_assemblies): New API call used by the
21759 See mkbundle.1 for details.
21761 2004-11-27 Martin Baulig <martin@ximian.com>
21763 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
21764 the vtable for generic methods.
21766 2004-11-26 Martin Baulig <martin@ximian.com>
21769 (mono_metadata_generic_method_hash): New public function.
21770 (mono_metadata_generic_method_equal): Likewise.
21772 * class-internals.h
21773 (MonoGenericContainer): Added `GHashTable *method_hash'.
21775 * reflection.c (ReflectionMethodBuilder): Added
21776 `MonoGenericContainer *generic_container'.
21777 (reflection_methodbuilder_to_mono_method): Don't create a new
21778 MonoGenericContainer each time we're called.
21779 (mono_reflection_bind_generic_method_parameters): Use
21780 `container->method_hash' to cache the results so we don't create a
21781 different method if we're called several times with the same
21784 * loader.c (method_from_methodspec): Use the new
21785 `container->method_hash' here, too.
21787 2004-11-26 Martin Baulig <martin@ximian.com>
21789 * class.c (inflate_generic_signature): Correctly compute
21790 `res->has_type_parameters'.
21791 (mono_class_vtable): Use the `has_type_parameters' flag to
21792 determine whether we're a generic method.
21794 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
21796 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
21798 * object.c (mono_runtime_run_main): Fix a small memory leak.
21800 2004-11-25 Martin Baulig <martin@ximian.com>
21802 * class.c (set_generic_param_owner): Fixed the loop.
21804 2004-11-25 Martin Baulig <martin@ximian.com>
21806 * object.c (mono_class_vtable): Don't create any JIT wrappers for
21809 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
21811 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
21812 names. Fixes #69787.
21814 2004-11-24 Martin Baulig <martin@ximian.com>
21816 * class.c (mono_class_create_generic_2): If we don't have a
21817 `ginst->parent', inflate `gklass->parent' to get our parent.
21819 2004-11-24 Martin Baulig <martin@ximian.com>
21821 * reflection.c (compare_genericparam): Correctly sort the
21822 GenericParam table; fixes #69779.
21824 2004-11-23 Ben Maurer <bmaurer@ximian.com>
21826 * reflection.c: When writing a PE file, don't create a huge
21827 buffer in memory. Just write the arrays we have to the file.
21828 This reduces memory usage.
21830 * metadata-internals.h: MonoDynamicStream pefile is no longer used
21833 2004-11-17 Martin Baulig <martin@ximian.com>
21835 * class.c (mono_class_init): Don't setup `class->parent' for
21836 dynamic instances; moved this to mono_class_generic_2().
21837 (mono_class_create_generic): Also set `klass->inited' for dynamic
21839 (mono_class_create_generic_2): Don't do anything for dynamic
21840 generic instances. Set `klass->parent' here and also call
21841 mono_class_setup_parent() here.
21843 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
21844 `MonoType *parent' argument; set `ginst->parent' before calling
21845 mono_class_create_generic_2(), so we set the correct parent.
21847 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
21849 * reflection.c: allow getting attributes from ModuleBuilder
21852 2004-11-17 Martin Baulig <martin@ximian.com>
21854 * class.c (mono_class_create_from_typedef): If a type parameter is
21855 inherited from an outer class, set its owner to that class.
21857 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
21859 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
21860 for (int*) written size. This fixes bug #69592.
21862 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
21864 * icall.c: Added IsAuthenticodePresnet internal call.
21865 * image.c|h: New function that check a MonoImage for an Authenticode
21866 signature in the certificate PE data directory.
21867 * security.c|h: New internal call to ask the runtime if an
21868 Authenticode signature seems referenced in the PE header.
21870 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
21872 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
21874 * reflection.c (mono_image_create_pefile): Free the assembly streams
21875 after writing out the assembly file.
21877 * object.c (mono_runtime_run_main): Fix small memory leak.
21879 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
21880 property access modifiers. Fixes #69389.
21882 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21884 * domain.c, object.c, object-internals.h, domain-internals.h,
21885 object.h, marshal.c: keep dynamic code info per domain.
21887 2004-11-15 Martin Baulig <martin@ximian.com>
21889 * class.c (mono_type_get_name_recurse): Put type arguments in
21890 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
21893 2004-11-15 Martin Baulig <martin@ximian.com>
21895 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
21896 (mono_class_setup_vtable): When computing `the_cname' for a
21897 generic instance, don't include the namespace since we'd otherwise
21900 2004-11-15 Martin Baulig <martin@ximian.com>
21902 * class.c (mono_class_create_generic): Changed return type to void.
21903 (mono_class_create_generic_2): New public function; setup
21904 `class->method', `class->field' and `class->interfaces' here
21905 instead of in mono_class_init().
21907 * class.h (mono_class_create_generic): Moved to class-internals.h.
21909 2004-11-14 Ben Maurer <bmaurer@ximian.com>
21911 * reflection.c (mono_image_create_pefile): take a file HANDLE.
21912 rather than writing to memory, write to this file. Right now,
21913 we are just writting into a buffer, and copying that. However
21914 we can avoid the buffer later.
21916 (mono_dynamic_stream_reset): new function
21918 * icall.c, object-internals.h: update for the above.
21920 2004-11-13 Ben Maurer <bmaurer@ximian.com>
21922 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
21923 have been using gc'd memory. First it is slower, unlikely
21924 the comment in the source code said, secondly, it increases
21925 our footprint to do it in the gc.
21927 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
21928 the method so that it does not have to copy to managed code.
21930 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
21932 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
21934 2004-11-12 Martin Baulig <martin@localhost>
21936 * reflection.c (mono_image_create_token): Allow generic method
21937 definitions here, since they may appear in an `.override'; see
21938 gen-98/gen-99 for an example.
21940 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
21942 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
21945 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
21948 2004-11-11 Martin Baulig <martin@ximian.com>
21950 * class.c (mono_class_setup_vtable): In an explicit interface
21951 implementation, the method name now includes the arity.
21953 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
21955 * object.c (mono_array_full_copy): Fix warning.
21957 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
21959 * appdomain.c: Removed look_for_method_by_name(). Use the new method
21960 mono_class_get_method_from_name() instead.
21962 * class-internals.h: Added two new types of wrappers.
21963 Added MonoRemotingTarget enum. Added new trampoline function type, which
21964 takes an additional MonoRemotingTarget value as parameter, so it is
21965 possible to request a trampoline for a specific target.
21967 * class.c: Added new mono_class_get_method_from_name() method.
21969 * class.h: In MonoRemoteClass, we can have now to vtables, one for
21970 general remoting sinks and one specific for cross domain calls.
21972 * debug-helpers.c: Added new wrapper names.
21974 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
21977 * image.c: Porperly delete value objects form the remoting invoke hashtable.
21979 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
21980 with several other methods (mono_marshal_get_xappdomain_dispatch,
21981 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
21982 and others) can generate a fast remoting wrapper for cross domain calls.
21983 More information can be found in docs/remoting.
21984 Other changes: Removed mono_find_method_by_name, and used
21985 mono_class_get_method_from_name instead.
21986 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
21987 is stored in the remoting invoke hashtable.
21989 * marshal.h: published the new method for getting the xdomain wrapper,
21990 and also added a method for getting the adequate wrapper for a given
21993 * object-internals.h, object.c: Added a couple of methods for capying and
21995 Modified mono_install_remoting_trampoline, which takes the new remoting
21996 trampoline that has a remoting target as parameter.
21997 mono_class_proxy_vtable now also takes a remoting target as parameter, and
21998 will return the most suitable vtable for the target.
21999 Added mono_remote_class_vtable, which returns the vtable of a remote class
22000 (which can be the normal remoting vtable or the xdomain vtable).
22002 * threads.c: the xdomain invoke and dispatch wrappers must also be
22003 protected against interruptions.
22005 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22007 * icall.c: use memmove in BlockCopyInternal when the source and
22008 destination arrays are the same.
22010 2004-11-09 Martin Baulig <martin@ximian.com>
22012 * class-internals.h (MonoGenericContainer): Removed `method' and
22013 `signature', replaced them with `is_method' and `is_signature'
22014 flags. Added `context'.
22016 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
22017 instead of a `MonoGenericContainer *'.
22019 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
22020 for dynamic type parameters.
22021 (mono_metadata_load_generic_params): Setup `container->context'.
22023 * reflection.c (mono_reflection_setup_generic_class): Setup
22024 `tb->generic_container->context'.
22025 (do_mono_reflection_bind_generic_parameters): Use
22026 mono_class_inflate_generic_type() to correctly inflate types,
22027 rather than using our own hack just for MONO_TYPE_VAR.
22029 2004-11-09 Martin Baulig <martin@ximian.com>
22031 * class.c (mono_class_inflate_generic_method): Small fix; don't
22035 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
22036 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
22037 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
22038 (ves_icall_Type_BindGenericParameters): Likewise.
22039 (ves_icall_Type_get_IsGenericInstance): Likewise.
22040 (ves_icall_Type_GetGenericParameterPosition): Likewise.
22041 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
22042 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
22043 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
22045 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
22047 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
22048 assembly versions and public key tokens. Fixes #69113.
22050 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
22052 * metadata.c: fix bug introduced with the type cache changes
22055 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
22057 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
22058 the MonoClass pointer instead of the token in exception clauses.
22059 * reflection.c: updates for the above and make the code not depend
22060 on the structure of MonoExceptionClause.
22062 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
22064 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22065 Add support for dynamic assemblies. Fixes #69114.
22067 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
22069 2004-11-07 Ben Maurer <bmaurer@ximian.com>
22071 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
22072 since most only those methods use it. the code member of
22073 MonoMethodPInvoke was dead, so that can be removed too. Also,
22074 remove inline_count (again, not used), and move slot so that it
22075 can share bits with some other flags. This saves 8 bytes in the
22076 structure and gives us about 50 kb back for mcs helloworld.cs
22078 * *.[ch]: Do naming changes for the above.
22080 * loader.c (mono_method_get_header): Lazily init the header
22082 (mono_get_method_from_token): don't init the header here
22083 (mono_free_method): the header may never be allocated
22085 Overall, this saves 150 kb of unmanaged allocations
22086 for mcs helloworld.cs. That accounts for 10% of the unmanaged
22089 * loader.c, loader.h (mono_method_get_header): new accessor.
22091 * *.[ch]: use the above method. Prepares us to lazily load
22094 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
22095 three warnings, which are actual bugs (see 69206).
22097 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
22098 unused. Saves a cool 4 bytes / method.
22100 2004-11-06 Ben Maurer <bmaurer@ximian.com>
22102 * metadata.c (builtin_types): Add types for System.Object here.
22103 (mono_metadata_parse_type_full): Cache MonoType*'s that are
22104 for a class or valuetype from klass->this_arg or klass->byval_arg.
22106 On mcs for a hello world, this gets us down from 21836 MonoType's
22109 (mono_metadata_free_type): Account for the above change.
22111 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
22113 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
22114 exception instead of asserting if name is null.
22115 (ves_icall_System_AppDomain_GetData): Ditto.
22117 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
22119 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
22122 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
22123 Return NULL when the domain does not have entry_assembly set.
22125 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
22126 Add a 'resource_modules' argument.
22127 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
22129 * reflection.c (mono_reflection_create_runtime_class): Move setting
22130 of wastypebuilder here, so mono_get_type_object () returns a MonoType
22133 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
22134 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
22135 Throw an ArgumentNullException if 'ptr' is null.
22137 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
22138 assemblies here. Fixes #69020.
22140 2004-11-05 Geoff Norton <gnorton@customerdna.com>
22142 * reflection.c (build_compressed_metadata): Fix the previous patch for
22143 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
22146 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
22148 * assembly.c (mono_assembly_names_equal): Allow a match if one of
22149 the cultures is false. Fixes #69090.
22151 * reflection.c (build_compressed_metadata): Fix invalid memory read
22152 detected by valgrind.
22154 * reflection.c (mono_reflection_get_type): Avoid triggering a
22155 TypeResolve multiple times for the same type. Fixes #65577.
22157 2004-11-04 Ben Maurer <bmaurer@ximian.com>
22159 * marshal.c: Avoid using ldftn to call managed functions. It is
22160 much slower than just a call.
22162 * reflection.c (mono_module_get_object): free the basename we
22163 allocate here from glib.
22165 * reflection.c (ensure_runtime_vtable): make sure to free
22166 overrides. Also, we were allocating an array of MonoMethod not an
22167 array of MonoMethod*.
22169 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
22171 * image.c (mono_image_close): free image->guid here.
22173 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
22175 * reflection.c: Fix some spec conformance issues with the PE file
22176 structures so mcs compiled apps run on the Net 2.0 beta.
22178 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
22180 * string-icalls.c (ves_icall_System_String_ctor_encoding):
22181 Implement this. Fixes #67264.
22183 * debug-helpers.h debug-helpers.c marshal.c: Move
22184 mono_find_method_by_name to debug-helpers.c.
22186 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
22188 * object.c (mono_release_type_locks): type_initialization_hash is
22191 * reflection.c object.c object-internals.h: Fix warnings.
22193 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
22194 without accessors. Fixes #61561.
22196 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
22197 application base from the root domain if not set. Fixes #65641.
22198 (mono_runtime_init): Fix warning.
22200 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22202 * appdomain.c: call mono_thread_pool_init.
22203 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
22204 of worker threads based on the number of CPUs and the environment
22205 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
22206 for non-windows (windows) systems.
22208 2004-10-27 Chris Toshok <toshok@ximian.com>
22210 * mono-debug-debugger.c (write_class): don't call mono_class_init
22211 here, as even with the check for (!klass->init_pending), we get
22212 into a situation where we're hitting cycles in class
22213 initialization. Fixes #68816.
22215 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
22217 * image.c: Avoid overwriting values in the loaded_images_hash when an
22218 assembly is loaded multiple times. Fixes #61152.
22220 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
22221 so multiple satellite assemblies for the same name can be loaded.
22224 * mono_domain_assembly_preload: Actually return the loaded assembly,
22227 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
22228 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
22230 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
22231 pending finalizers are not invoked after the appdomain has been
22232 unloaded. Fixes #67862.
22234 2004-10-22 Martin Baulig <martin@ximian.com>
22236 * mono-debug-debugger.c
22237 (mono_debugger_runtime_invoke): Don't box valuetypes.
22239 2004-10-22 Chris Toshok <toshok@ximian.com>
22241 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
22242 don't hide private methods.
22244 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
22246 * icall.c: Allows the runtime to "share" (when known) the public key
22247 token of an assembly. This avoid the need to recalculate the token
22248 (from the public key) in managed code.
22250 2004-10-21 Chris Toshok <toshok@ximian.com>
22252 * debug-helpers.c (append_class_name): argh, revert last patch.
22254 2004-10-21 Chris Toshok <toshok@ximian.com>
22256 * debug-helpers.c (append_class_name): use '+' as the delimiter,
22257 not '/', so that it matches what the debugger uses to look up
22260 2004-10-21 Martin Baulig <martin@ximian.com>
22262 * mono-debug-debugger.c (mono_debugger_throw_exception): New
22263 public method; this is called each time an exception is thrown and
22264 allows the debugger to use exception catch points.
22266 2004-10-21 Martin Baulig <martin@ximian.com>
22268 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
22269 the stack pointer and the exception object in some struct and pass
22270 that to the debugger.
22272 2004-10-21 Chris Toshok <toshok@ximian.com>
22274 * mono-debug-debugger.c (do_write_class): add instance/static
22275 event support. We don't expose "raise" or "other" yet.
22276 (event_is_static): new method.
22278 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
22280 * mono-debug-debugger.c
22281 (mono_debugger_handle_exception): Remove
22282 bogus return value for fussy compilers.
22284 2004-10-20 Martin Baulig <martin@ximian.com>
22286 * mono-debug-debugger.c
22287 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
22288 (mono_debugger_handled_exception): Likewise.
22290 2004-10-20 Martin Baulig <martin@ximian.com>
22292 * mono-debug-debugger.h (MonoDebuggerEvent): Added
22293 MONO_DEBUGGER_EVENT_EXCEPTION.
22295 * mono-debug-debugger.c (mono_debugger_handle_exception): New
22296 public function to send the debugger a notification for an
22297 exception and inform it about a catch/finally clause.
22299 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
22301 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
22302 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
22305 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
22307 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
22309 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
22310 marshalled as [In,Out]. Fixes #58325.
22312 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
22314 * reflection.c (mono_method_body_get_object): Implement some fields.
22316 2004-10-12 Martin Baulig <martin@ximian.com>
22318 * reflection.c (mono_reflection_bind_generic_parameters): Small
22319 fix, correctly retrieve our parent from a generic instance.
22321 2004-10-12 Martin Baulig <martin@ximian.com>
22323 * metadata.c (mono_metadata_generic_param_equal): We always have
22327 (mono_class_from_generic_parameter): We need to have an owner.
22328 (my_mono_class_from_generic_parameter): Likewise.
22330 * reflection.c (mono_reflection_setup_generic_class): Renamed to
22331 mono_reflection_create_generic_class() and added a new
22332 mono_reflection_setup_generic_class().
22333 (mono_reflection_initialize_generic_param): If we're a nested
22334 generic type and inherited from the containing class, set our
22335 owner to the outer class.
22337 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
22339 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
22341 * reflection.c (mono_method_body_get_object): New function to create
22342 a MethodBody object.
22344 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
22346 2004-10-11 Martin Baulig <martin@ximian.com>
22348 * metadata.c (_mono_metadata_type_equal): Renamed to
22349 do_mono_metadata_type_equal() and made static.
22351 2004-10-11 Martin Baulig <martin@ximian.com>
22353 * appdomain.c: Bump corlib version number to 28.
22355 2004-10-10 Martin Baulig <martin@ximian.com>
22357 * class-internals.h
22358 (MonoGenericInst): Added `MonoGenericContainer *container'.
22359 (MonoGenericMethod): Likewise.
22360 (MonoGenericContext): Likewise.
22361 (MonoGenericParam): Added `MonoGenericContainer *owner'.
22364 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
22365 (do_mono_metadata_parse_generic_inst): Likewise.
22366 (mono_metadata_parse_type_full): New public method. This is the actual
22367 mono_metadata_parse_type() implementation - with an additional
22368 `MonoGenericContainer *' argument.
22369 (mono_metadata_parse_array_full): Likewise.
22370 (mono_metadata_parse_signature_full): Likewise.
22371 (mono_metadata_parse_method_signature_full): Likewise.
22372 (mono_metadata_parse_mh_full): Likewise.
22373 (mono_type_create_from_typespec): Likewise.
22374 (mono_metadata_interfaces_from_typedef_full): New public method;
22375 this is similar to the other _full() methods, but we take a
22376 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
22377 (mono_metadata_parse_generic_param): Take an additional
22378 `MonoGenericContainer *' argument and lookup the MonoGenericParam
22379 from that container.
22380 (mono_metadata_generic_param_equal): New static method to compare
22381 two type parameters.
22382 (_mono_metadata_type_equal): New static method; takes an
22383 additional `gboolean signature_only' argument - if true, we don't
22384 compare the owners of generic parameters.
22385 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
22386 with a TRUE argument - do a signature-only comparision.
22388 * loader.c: Use the new _full() methods and pass the
22389 MonoGenericContainer to them.
22391 * object-internals.h (MonoReflectionTypeBuilder): Added
22392 `MonoGenericContainer *generic_container' field.
22393 (MonoReflectionMethodBuilder): Likewise.
22395 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
22397 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
22398 case initial images of dynamic assemblies.
22400 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
22402 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
22404 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
22405 length of event->other array.
22406 (typebuilder_setup_events): Ditto.
22408 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
22409 'assembly_by_name' and add an 'assemblies' list.
22411 * assembly.h assembly.c: Add a new search hook for determining whenever
22412 an assembly is already loaded. Use this instead of searching in the
22413 loaded_assemblies list.
22415 * domain.c appdomain.c: Implement the new search hook so loaded
22416 assemblies are now scoped by appdomain. Fixes #67727.
22418 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
22420 * threads.c (mono_thread_attach): Initialize synch_lock field so
22421 mono_thread_detach works again.
22423 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
22424 'lib' too. Fixes #63130.
22426 2004-10-06 Jackson Harper <jackson@ximian.com>
22428 * culture-info-tables.h: regenerated.
22430 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
22432 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
22433 implemented by other interfaces in the result. Fixes #65764.
22435 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22436 Handle unloadable modules without crashing.
22438 * image.c (load_modules): Revert the previous patch since modules must
22439 have a fixed index inside the array.
22441 * image.c (load_modules): Don't include native modules in the modules
22444 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
22446 * reflection.h: Add param_defaults field.
22448 * reflection.c: Add support for parameter defaults in dynamic methods.
22451 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
22452 an empty string when a type has no namespace. Fixes #64230.
22454 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
22456 * tabledefs.h: Added "internal" security actions to support non-CAS
22457 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
22458 Note: they do not seems to be used anymore in 2.0 (new metadata format)
22460 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
22462 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
22463 constructor of abstract class. Fixes #61689.
22465 2004-10-04 Martin Baulig <martin@ximian.com>
22467 * class-internals.h (MonoGenericContainer): New type.
22468 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
22469 `MonoGenericContainer *generic_container'.
22470 (MonoClass): Replaced `gen_params' and `num_gen_params' with
22471 `MonoGenericContainer *generic_container'.
22473 * metadata.c (mono_metadata_load_generic_params): Return a
22474 `MonoGenericContainer *' instead of a `MonoGenericParam *';
22475 removed the `num' argument.
22477 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
22479 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
22480 for dynamic images.
22482 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
22485 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
22487 * reflection.c: Save pe_kind and machine values into the generated
22490 * appdomain.c: Bump corlib version number.
22492 * object-internals.h: Reorganize layout of LocalBuilder.
22494 * class-internals.h class.c (mono_class_get_implemented_interfaces):
22495 New helper function.
22497 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
22498 created MonoType for dynamic types. Fixes #66180.
22500 2004-10-02 Ben Maurer <bmaurer@ximian.com>
22502 * threadpool.c: the ares hashtable needs a critical section around it.
22503 this prevents some nasty segfaults
22505 2004-10-02 Massimiliano Mantione <massi@ximian.com>
22507 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
22508 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
22511 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
22513 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
22515 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
22517 * image.c: Always canonicalize image file names, to avoid loading
22518 the same assembly twice when referenced using a relative path.
22520 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
22522 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
22524 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
22526 * marshal.c: Fix warnings.
22528 2004-09-29 Geoff Norton <gnorton@customerdna.com>
22530 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
22531 attempting to marshal the delegate_trampoline as the method_addr.
22532 This patch has a static hashtable of marshalled delegates so that
22533 we can map delegate_trampoline addresses back to delegates. This
22534 allows a delegate passed to managed code to be passed back into native
22537 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
22539 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
22541 * reflection.c (method_encode_code): Align method headers properly.
22544 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
22546 * marshal.c: In the runtime invoke wrapper, reset the abort
22547 exception if it is cached. This avoids the automatic rethrowal of
22548 the exception after the catch of the wrapper. Also check for pending
22549 interruptions before calling the managed method. This is done using
22550 the new method emit_thread_force_interrupt_checkpoint, since the
22551 normal checkpoint method is ignored when running the invoke wrapper.
22552 * object.c: If the abort exception is rethrown, set the abort_exc
22553 field of the thread, so it will be rethrown aftere every catch.
22554 * threadpool.c: Only run an interruption checkpoint if what has been
22555 requested is a stop of the thread (aborts will be ignored).
22556 * threads.c: By default, a thread will now never be interrumped while
22557 running the runtime invoke wrapper (this ensures that runtime_invoke
22558 will always return to the caller if an exception pointer is provided).
22559 There is a new special method mono_thread_force_interruption_checkpoint()
22560 to force an interruption checkpoint even if running a protected
22561 wrapper, which is used by the same runtime invoke wrapper to do a check
22564 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
22566 * object.c, object-internals.h: Implemented mono_release_type_locks,
22567 which releases the cctor locks held by a thread.
22568 * threads.c, threads.h: In thread_cleanup, release cctor locks held
22569 by a thread. Added mono_thread_exit() method to be used to safely stop
22572 2004-09-28 Raja R Harinath <rharinath@novell.com>
22574 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22575 Move null check before dereference. Avoid indexing beyond the end
22576 of the 'modules' array.
22578 2004-09-28 Raja R Harinath <rharinath@novell.com>
22580 * metadata-internals.h (MonoImage): Add module_count field.
22581 * image.c (load_modules): Set image->module_count.
22582 (mono_image_load_file_for_image): Use image->module_count.
22583 * reflection.c (mono_image_load_module): Append to image->modules array
22584 of dynamic assembly.
22585 (mono_module_get_object): Fix loop to actually increment index.
22586 Use image->module_count.
22587 * assembly.c (mono_assembly_load_references): Use image->module_count.
22588 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22591 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
22593 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
22594 Avoid assert on generic types.
22596 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
22598 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
22600 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
22602 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
22603 function to convert a MarshalSpec structure to its managed counterpart.
22605 * reflection.c: Fix warnings.
22607 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
22610 * icall.c (mono_create_icall_signature): Fix build.
22612 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
22614 * icall.c: Add MakePointType icall.
22616 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
22619 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22621 * threadpool.c: reuse allocated slots in the queue.
22623 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
22625 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
22627 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
22629 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
22632 * tabledefs.h: Add constants for pinvoke attributes BestFit and
22633 ThrowOnUnmappableChar.
22635 * icall.c (ves_icall_Type_GetPacking): New icall.
22637 2004-09-24 Martin Baulig <martin@ximian.com>
22639 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
22641 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22644 (mono_domain_set): allow setting a domain that is being unloaded.
22645 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
22648 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
22650 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
22651 the GetCustomAttributes icall.
22653 2004-09-23 Martin Baulig <martin@ximian.com>
22655 * object-internals.h (MonoReflectionGenericParam): Replaced
22656 'has_ctor_constraint', `has_reference_type' and `has_value_type'
22657 with `guint32 attrs'.
22659 2004-09-23 Martin Baulig <martin@ximian.com>
22661 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
22663 2004-09-23 Martin Baulig <martin@ximian.com>
22665 * object-internals.h (GenericParameterAttributes): New enum.
22667 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
22669 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
22671 * class.c (init_events): Fill out event->other field.
22673 * class.c: Fix warnings.
22675 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
22677 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
22679 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
22680 walk which doesn't supply the IL offset.
22682 2004-09-22 Martin Baulig <martin@ximian.com>
22684 * reflection.c (mono_reflection_setup_internal_class): If we're
22685 System.ValueType, System.Object or System.Enum, set
22686 `klass->instance_size' and create the vtable.
22687 (mono_reflection_create_internal_class): If we're an enum type,
22688 get the base class from our current corlib.
22690 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
22692 * reflection.h (MonoResolveTokenError): New type.
22694 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
22697 * icall.c: Add an 'error' argument to the ResolveToken icalls.
22699 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
22701 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
22702 Support also calling constructors, but only for already allocated objects.
22704 2004-09-17 Geoff Norton <gnorton@customerdna.com>
22706 * reflection.c (type_get_qualified_name): If the klass is null
22707 return the typename to avoid a NullRefEx.
22708 (encode_cattr_value): Get the qualified name of the boxed type,
22709 not the underlying enumtype. Fixes #62984.
22711 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
22713 * marshal.c: Fix problems with previous checkin.
22715 2004-09-21 <vargaz@freemail.hu>
22717 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
22718 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
22720 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
22722 2004-09-21 Geoff Norton <gnorton@customerdna.com>
22724 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
22725 should only return a type for pointers, arrays, and passbyref types.
22728 2004-09-21 Martin Baulig <martin@ximian.com>
22730 * domain.c (mono_debugger_check_runtime_version): New public
22733 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
22735 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
22737 * reflection.c: Added missing sort to the declarative security
22738 attributes table. MS implementation stops seeing the attributes if the
22739 token number regress in the table (as shown by ildasm and permview).
22741 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
22743 * object-internals.h (MonoReflectionModule): Add 'token' field.
22745 * reflection.c (mono_reflection_get_token): Add support for Module
22747 (mono_module_get_object): Set 'token' field.
22748 (mono_module_file_get_object): Set 'token' field.
22750 * icall.c: Add new Assembly and Module icalls.
22752 * appdomain.c: Bump corlib version.
22754 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
22756 * loader.h loader.c class.h class.c: Add helper functions for obtaining
22757 tokens of metadata objects.
22759 * reflection.h reflection.c (mono_reflection_get_token): New function
22760 to obtain the token of a metadata object.
22762 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
22764 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
22766 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
22768 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
22770 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
22772 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
22773 * object-internals.h: Added 3 MonoArray* members to MonoReflection
22774 AssemblyBuilder to access the permissions set in the class lib.
22775 * reflection.c: Added security attributes encoding step in
22776 mono_image_build_metadata.
22777 * tabledefs.h: Added new security actions defined in 2.0:
22778 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
22780 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
22782 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
22785 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
22787 * locales.c: nullify the ICU_collator member of CompareInfo when it is
22788 finalized. There where random SIGSEVs at program termination, when
22789 an object being finalized was trying to do a string comparison and
22790 the current culture was already finalized.
22792 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22794 * threads.c: call thread_cleanup before finishing the thread if we get
22797 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
22799 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
22800 assemblies from the parent. Fixes #65665.
22802 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
22804 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
22807 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
22809 * reflection.h: add prototype for mono_get_dbnull_object
22810 * reflection.c: add prototypes for get_default_param_value_blobs
22811 and mono_get_object_from_blob for fussier compilers
22813 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
22815 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
22816 false deadlock checks in class initialization.
22818 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
22820 * image.c (mono_image_addref): Fix comment.
22822 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
22825 2004-09-12 Jambunathan K <kjambunathan@novell.com>
22827 * reflection.c (mono_param_get_objects): Modified to return
22828 ParameterInfo.DefaultValue object.
22830 (get_default_param_value_blobs):
22831 (mono_get_object_from_blob):
22832 (mono_get_dbnull_object): New helper routines.
22834 * object.c (mono_get_constant_value_from_blob): New helper routine
22835 carved out from get_default_field_value ()
22837 * object-internals.h (mono_get_constant_value_from_blob): Added
22838 function declaration.
22840 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
22842 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
22843 referenced assemblies. Fixes #62135.
22845 * exception.h exception.c (mono_get_exception_file_not_found2): New
22848 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
22850 * class.h class.c: Add mono_type_get_underlying_type ().
22852 2004-09-09 Geoff Norton <gnorton@customerndna.com>
22854 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
22855 Fix GetTypes() to support dynamically created assemblies.
22857 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
22859 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
22861 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
22864 * reflection.h reflection.c loader.c: Allow dynamic construction of
22865 pinvoke methods. Fixes #65571.
22867 * reflection.c (mono_reflection_get_type): Revert previous change since
22868 it causes regressions.
22870 2004-09-08 Martin Baulig <martin@ximian.com>
22872 * class.c (class_compute_field_layout): Don't call
22873 mono_class_layout_fields() for open generic instances.
22875 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
22876 * threads.c appdomain.c: fix typo in GC macro
22878 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22880 * threads.c: don't call mono_thread_detach() in start_wrapper(),
22881 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
22883 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
22885 * image.c (mono_image_close): Applied patch from
22886 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
22887 assembly is loaded multiple times from data.
22889 * image.c (mono_image_open): Fix warning.
22891 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22893 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
22894 once. Fixes #58334.
22896 * reflection.c (mono_reflection_create_runtime_class): Initialize
22897 klass->nested_classes. Fixes #61224.
22899 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22901 * threads.c: sched_yield() on exit, to allow threads to quit.
22903 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22905 * object.c (mono_unhandled_exception): Remove leftover debug code.
22907 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
22909 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
22911 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22913 * marshal.c (emit_marshal_array): Really null terminate string arrays.
22915 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
22917 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22919 * marshal.c (emit_marshal_array): Null terminate string arrays.
22921 * marshal.c (raise_auto_layout_exception): Fix warning.
22923 * reflection.c (mono_param_get_objects): Initialize the default value
22924 with DBNull.Value, not null. Fixes #62123.
22926 2004-09-01 Miguel de Icaza <miguel@ximian.com>
22928 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
22929 throw an exception with a cute explanation.
22931 2004-09-06 Dick Porter <dick@ximian.com>
22933 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
22934 Close the new process's thread handle, as we don't use it. The
22935 handle stays around forever otherwise.
22937 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22939 * object.c (arith_overflow): Fix warning.
22941 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
22942 calling conventions in method refs. Fixes #65352.
22944 * reflection.c: Fix warnings.
22946 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22948 * icall.c: Add a new icall for Array.Clear
22950 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22952 * object.c: When allocating an array, we have to throw
22953 an overflow exception if any of the lengths are < 0.
22955 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22957 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
22958 properly. Also move implementation of string array marshalling to
22959 managed code. Fixes #42316.
22961 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22963 * assembly.c: provide more information when loading an assembly fails.
22965 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22967 * filewatcher.c: don't expect the development fam package to be
22970 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
22972 * marshal.c: Make a copy of the signature cookie since it will be
22973 freed by the caller.
22975 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
22977 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
22979 * metadata.c (mono_metadata_free_marshal_spec): New function to free
22982 * marshal.c: More refactoring.
22984 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
22987 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
22989 * object.c: In mono_message_invoke, fill the output parameter array after
22990 calling the managed method (it was done before the call). This fixes
22993 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22995 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
22998 2004-09-02 Martin Baulig <martin@ximian.com>
23000 * class.c (mono_class_instance_size): Don't allow generic type
23001 definitions or open generic instances.
23002 (mono_class_array_element_size): If we're a value type, call
23003 mono_class_instance_size() on the original class.
23005 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
23006 handle generic instances.
23008 * mono-debug-debugger.c (write_type): Handle generic instances
23011 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
23013 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
23014 the allocation request fails. Fixes #65089.
23016 * object.c (mono_runtime_free_method): Do not call mono_free_method.
23018 * object.c (mono_runtime_free_method): New function to free a dynamic
23021 * marshal.c (mono_delegate_free_ftnptr): New function to free the
23022 delegate trampoline.
23024 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
23025 with hasthis as dynamic,
23027 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
23029 * domain.c (mono_jit_info_table_remove): New function to remove an
23030 entry from the jit info table.
23032 * class-internals.h (MonoMethod): Add 'dynamic' field.
23034 * loader.c: Fix warnings.
23036 2004-09-01 Martin Baulig <martin@ximian.com>
23038 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
23039 instead of mono_debugger_lock() because the latter one is a no-op
23040 unless running in the debugger.
23042 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
23044 * class.c (class_compute_field_layout): Classes with auto-layout or
23045 reference fields are not blittable.
23047 2004-09-01 Dick Porter <dick@ximian.com>
23049 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
23050 mono_image_get_filename() to get the assembly location.
23053 * metadata.h: Fix compile warnings
23055 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
23057 * class.c (class_compute_field_layout): System.Object is blittable.
23059 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
23060 as in/out. Fixes #59909.
23062 2004-09-01 Martin Baulig <martin@ximian.com>
23064 * metadata.h (MONO_TYPE_ISREFERENCE): Call
23065 mono_metadata_generic_inst_is_valuetype() if we're a generic
23066 instance to check whether our underlying type is a reference type.
23068 2004-09-01 Martin Baulig <martin@ximian.com>
23070 * metadata.c (mono_type_size): If we're a generic instance, call
23071 mono_class_value_size() for value types.
23073 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
23075 * marshal.c: Implement more custom marshalling functionality. Fixes
23078 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23080 * mono-debug.c, debug-mono-symfile.c: add some locking love.
23082 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
23084 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
23086 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
23088 * icall.c: Fix some warnings.
23090 * threads.c (abort_appdomain_thread): Fix unref errors.
23091 (mono_thread_current): Fix THREAD_DEBUG define.
23093 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
23095 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
23097 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
23099 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
23101 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
23104 2004-08-28 Martin Baulig <martin@ximian.com>
23107 (mono_metadata_generic_inst_is_valuetype): New public function.
23109 * metadata.h (MONO_TYPE_ISSTRUCT): Call
23110 mono_metadata_generic_inst_is_valuetype() if we're a generic
23111 instance to check whether our underlying type is a valuetype.
23113 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
23115 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
23118 2004-08-25 Martin Baulig <martin@ximian.com>
23120 * loader.c (mono_get_method_from_token): Abstract methods can also
23121 be generic and thus have type parameters.
23123 * metadata-internals.h
23124 (MonoDynamicImage): Added `GPtrArray *gen_params'.
23126 * reflection.c (mono_image_get_generic_param_info): Don't create a
23127 metadata row, just add an entry to the `gen_params' array.
23128 (build_compressed_metadata): Sort the `gen_params' array and then
23129 actually create the metadata.
23131 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23133 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
23135 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
23137 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
23139 2004-08-24 Martin Baulig <martin@ximian.com>
23141 * class.cs (mono_class_is_subclass_of): Like an interface, a
23142 generic instance also derives from System.Object.
23144 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
23146 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
23147 custom modifiers to be in any order. Fixes #61990.
23149 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
23151 * object.c: Register mono_object_new_fast icall.
23153 * object.c (mono_class_get_allocation_ftn): Return to calling
23154 mono_object_new_fast, since it seems faster to compute the object
23155 size in unmanaged code than passing it as a parameter.
23157 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
23159 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
23160 this function with Boehm as the oom handler, so we don't have to check
23161 the result of GC_malloc.
23163 * object.c: Remove checks for oom.
23165 * object.h object.c (mono_class_get_allocation_ftn): New function to
23166 return the icall which can be used to allocate an instance of a given
23169 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
23171 * class-internals.h: Add 'enabled' field.
23173 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
23175 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
23177 2004-08-18 Jambunathan K <kjambunathan@novell.com>
23178 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
23181 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
23183 * appdomain.c: use the Tls function for appdomain too,
23184 at Zoltan's request. Actually return in mono_context_get
23186 * appdomain.c, profiler.c, threads.c: use __thread
23188 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
23190 * appdomain.c threads.c: Call GC_CreateThread on windows.
23192 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
23193 multiple libraries since this don't work on windows.
23195 2004-08-18 Martin Baulig <martin@ximian.com>
23197 * class-internals.h
23198 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
23201 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
23202 MonoMethodNormal since we also need it for abstract and interface
23206 (build_compressed_metadata): Sort the GenericParam table.
23207 (mono_image_create_token): Added `gboolean create_methodspec'
23208 argument; this is false when generating a MethodImpl token.
23209 (reflection_methodbuilder_to_mono_method): Abstract and interface
23210 methods may also have generic parameters.
23212 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
23214 * appdomain.c: thread local alloc
23216 2004-08-17 Martin Baulig <martin@ximian.com>
23218 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
23221 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
23224 * class.c (mono_type_get_full_name): New public function.
23225 (mono_type_get_name): Don't include the type arguments.
23227 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
23229 * Makefile.am: Build static versions of libmetadata and libmonoruntime
23230 for inclusion into the mono executable.
23232 2004-08-16 Martin Baulig <martin@ximian.com>
23234 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
23235 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
23237 2004-08-14 Martin Baulig <martin@ximian.com>
23239 * class.c (dup_type): Also copy the `byref' field.
23241 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
23243 * reflection.c (create_dynamic_mono_image): Revert the last change
23244 since it breaks bootstrap.
23246 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
23248 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
23250 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
23251 not free them with g_free.
23253 2004-08-11 Martin Baulig <martin@ximian.com>
23255 * reflection.c (mono_reflection_setup_internal_class): Also call
23256 mono_class_setup_mono_type() if we already have a `tb->type.type'.
23258 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
23260 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
23261 called during default (first) AppDomain creation. Keep track of
23262 Evidence when loading assemblies.
23264 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23266 * opcodes.c, opcodes.h: reduce runtime relocations.
23268 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
23270 * culture-info.h, locales.c: fixes and chages to sue the new
23271 optimized format of the locale data.
23272 * culture-info-tables.h: regenerated.
23274 2004-08-06 Geoff Norton <gnorton@customerdna.com>
23276 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
23278 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
23280 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
23281 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
23282 * domain-internals.h: icall declaration.
23283 * icall.c: icall registration.
23284 * object-internals.h: New fields in MonoAssembly for CAS.
23286 2004-08-05 Duncan Mak <duncan@ximian.com>
23288 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
23291 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23293 * reflection.c: fix to deal with object[] arrays in custom ctors
23296 2004-08-05 Martin Baulig <martin@ximian.com>
23298 * class.c (mono_class_array_element_size): Added support for
23299 generic instances and correctly handle "recursive" types.
23301 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
23303 * assembly.c: Fix warnings.
23305 2004-08-04 Martin Baulig <martin@ximian.com>
23308 (mono_type_get_name_recurse): Added `gboolean include_arity'
23309 argument specifying whether or not we should include the generic
23310 arity in the type name.
23311 (_mono_type_get_name): New static function.
23312 (mono_class_setup_vtable): If we're a generic instance, don't
23313 include the generic arity in the names of explicit method
23316 2004-08-03 Martin Baulig <martin@ximian.com>
23318 * class.c (mono_type_get_name_recurse): Enclose the generic type
23319 arguments in `<', '>'.
23321 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23323 * gc.c: make GC warning messages use the trace API, they are just
23324 noise to most of the users.
23326 2004-08-03 Martin Baulig <martin@ximian.com>
23328 * debug-mono-symfile.c (read_string): Correctly read the string.
23330 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
23332 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
23334 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
23336 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
23338 2004-07-30 Martin Baulig <martin@ximian.com>
23340 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
23341 Reflect latest symbol writer changes.
23343 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
23345 * object.c: always create an object if null is passed
23346 to Invoke() where a valuetype is expected.
23348 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
23350 * marshal.c (mono_marshal_init): make managed
23351 signatures match native ones better for 64bits.
23353 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23355 * appdomain.c: hack to build correctly the private bin path on windows.
23358 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
23360 * assembly.c: Load mscorlib from the correct framework directory
23361 (mono/<version>/mscorlib.dll).
23362 * appdomain.h: Added prototypes for new functions.
23363 * internals.h: Added some prototypes.
23364 * domain.c: When initializing the runtime, get from the executable and
23365 the configuration files the runtime version that the app supports.
23366 Added support methods for reading app.exe.config. Added list of versions
23367 supported by the JIT. Added two new methods: mono_init_from_assembly,
23368 which initializes the runtime and determines the required version from
23369 the provided exe file, and mono_init_version, which initializes
23370 the runtime using the provided version.
23371 * icall.c: Get machine.config from version-specific directory.
23372 * reflection.c: When generating an image, embed the version number
23373 of the current runtime.
23375 2004-07-28 Dick Porter <dick@ximian.com>
23378 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
23379 returned sockaddr size before creating the remote address object.
23380 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
23383 2004-07-28 Dick Porter <dick@ximian.com>
23385 * locales.c (string_invariant_compare_char): Fix invariant char
23386 compares between upper and lower cases. Fixes bug 61458.
23388 2004-07-27 Ben Maurer <bmaurer@ximain.com>
23390 * marshal.c: actually cache stelem.ref wrappers.
23392 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
23394 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
23395 sections and remove the mono_cli_rva_map () function.
23397 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23399 * debug-mono-symfile.c: fix one more endianess issue, from a patch
23400 by Geoff Norton (<gnorton@customerdna.com>).
23402 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23404 * class.c: fix class loads for pointer types (typeof(int) !=
23407 2004-07-27 Martin Baulig <martin@ximian.com>
23409 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
23410 reading the debugging information from an external ".mdb" file.
23412 2004-07-24 Martin Baulig <martin@ximian.com>
23414 * reflection.c (mono_image_get_type_info): Only write a class
23415 layout entry if we actually have a size or a packing size.
23417 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
23419 * reflection.c (type_get_fully_qualified_name):
23420 insert cast to get type checking of ?: with non-gcc compilers
23422 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
23424 * rand.c: use g_getenv for both lookups of
23427 2004-07-17 Martin Baulig <martin@ximian.com>
23429 * reflection.c (mono_reflection_bind_generic_method_parameters):
23430 Set `gmethod->reflection_info'.
23432 2004-07-17 Martin Baulig <martin@ximian.com>
23434 * class.c (mono_class_create_from_typedef): Insert the newly
23435 created class into the hash table before computing the interfaces
23436 since we could be called recursively.
23438 2004-07-16 Ben Maurer <bmaurer@ximain.com>
23440 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
23441 function to implement stelem.ref in managed code
23442 * class-internals.h, debug-helpers.c: a new wrapper type
23445 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
23447 * gc.c: allow GC handles to work even when no GC is compiled in.
23448 Fix part of bug #61134 (GetAddrOfPinnedObject).
23450 2004-07-13 Peter Williams <peter@newton.cx>
23452 * process.c (complete_path): Make sure we don't attempt to execute
23455 2004-07-12 Geoff Norton <gnorton@customerdna.com>
23457 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
23458 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
23459 and will add/subtract the hour if needed
23461 2004-07-12 Martin Baulig <martin@ximian.com>
23463 * reflection.c (mono_field_get_object): If we have
23464 `field->generic_info', take the attributes from
23465 `field->generic_info->generic_type'.
23467 2004-07-12 Martin Baulig <martin@ximian.com>
23469 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
23470 This function must be called before initializing the runtime.
23471 (mono_debug_init_1): New function; call this after initializing
23472 the runtime, but before loading the assembly. It tells the
23473 debugger to load corlib and the builtin types.
23475 * mono-debug-debugger.c: Did some larger changes in the debugging
23476 code; support recursive class declarations, make sure we actually
23479 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23481 * debug-helpers.c: undo my previous patch and fixed the real issue in
23482 ../mini/exceptions-x86.c
23484 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23486 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
23487 when no HOME env. variable was set and a NullRef was thrown in a .cctor
23488 called from other .cctors.
23490 2004-07-09 Miguel de Icaza <miguel@ximian.com>
23492 * loader.c: Removed the mono_loader_wine_init hack now that we are
23493 doing a managed version of Windows.Forms.
23495 2004-07-09 Ben Maurer <bmaurer@ximian.com>
23497 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
23498 threadpool.c, threads.c: remove static data from rootset.
23500 2004-07-09 Dick Porter <dick@ximian.com>
23502 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
23503 Don't do any more processing if the matched length was 0. It was
23504 increasing the size of the string before. Fixes bug 61167.
23506 2004-07-09 Dick Porter <dick@ximian.com>
23510 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
23511 Add support for SO_PEERCRED if its available.
23513 2004-07-09 Peter Bartok <pbartok@novell.com>
23514 * loader.c: winelib.exe.so error message is now only displayed if
23515 MONO_DEBUG is set. To help us avoid questions when people are trying
23516 out the new Managed.Windows.Forms.
23518 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
23520 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
23521 for isinst and castclass wrappers.
23523 * class-internals.h icall.c: Move registration and lookup of JIT icalls
23524 to libmetadata from the JIT, so they could be used by the marshalling
23525 code and the interpreter.
23527 * marshal.c: Register marshalling related JIT icalls here instead of
23528 in mini.c. Use CEE_MONO_ICALL instead of the family of
23529 CEE_MONO_PROC<x> opcodes to call marshalling functions.
23531 * metadata.h: Remove unneeded marshalling conversions.
23533 * opcodes.c: Update for new opcodes.
23535 2004-07-08 Martin Baulig <martin@ximian.com>
23537 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
23538 (mono_debug_get_domain_data): Make this function static.
23540 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23542 * gc.c, object.h: add nice GC handle API for embedders.
23544 2004-07-06 Ben Maurer <bmaurer@ximian.com>
23546 * reflection.c: more changes for the new api
23548 * object.c: When we reflect on a field w/ a constant value, it
23549 will not have a memory location, so we must access metadata. Also,
23550 allow easier reading of strings so that we can read them from
23553 * class.c (mono_class_layout_fields): no need for literal fields here.
23555 * class-internals.h: api changes for const fields
23557 * icall.c (ves_icall_get_enum_info): use new apis for const fields
23559 2004-07-06 Martin Baulig <martin@ximian.com>
23561 * mono-debug.h: Increment version number to 44.
23563 * mono-debug.c (mono_debug_add_wrapper): The second argument is
23564 now a gpointer, rewrote this whole method.
23566 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
23567 function. Add information about the wrapper in a new "misc table".
23569 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
23570 for the new misc table.
23572 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
23574 * metadata-internals.h image.c: Add a cache for helper signatures.
23576 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
23578 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
23580 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
23581 delegates from a delegate. Fixes #61033.
23583 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
23584 marshalling of stringbuilder arrays. Fixes #59900.
23586 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
23588 * icall.c: Add EnumBuilder:setup_enum_type icall.
23590 2004-06-30 Ben Maurer <bmaurer@ximian.com>
23592 * icall.c: Added a new icall for the property version of
23593 OffsetOfStringData.
23595 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
23597 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
23598 it has a constant size across platforms.
23600 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
23603 2004-06-29 Martin Baulig <martin@ximian.com>
23605 * mono-debug.c (mono_debug_add_method): Protect the whole function
23606 in mono_debugger_lock(), not just parts of it.
23608 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
23610 * reflection.c: make sure padding bytes in heaps are zeroed.
23612 2004-06-24 David Waite <mass@akuma.org>
23614 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
23615 image.c, loader.c, locales.c, marshal.c, metadata.c,
23616 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
23617 string-icalls.c, threads.c: change to C90-style comments from C99 /
23620 2004-06-24 Dick Porter <dick@ximian.com>
23623 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
23624 return createdNew. Fixes bug 60412.
23627 * icall.c: Add createdNew parameter to CreateMutex icall
23629 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23631 * reflection.c, object-internals.h: save default value in params.
23633 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23635 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
23636 no need to build a new path combining that with the application base.
23639 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
23641 * reflection.c: fixed minor standard compliance issues.
23643 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23645 * reflection.c: fixed issue with encoding some custom attributes
23646 (arrays in properties and fields, bug #60411).
23648 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23650 * reflection.c: fix start address when copying the public key token.
23652 2004-06-23 Martin Baulig <martin@ximian.com>
23654 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
23655 the `exc' object in a static object to put it into the GC's root set.
23657 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
23659 * reflection.c: make mono_reflection_setup_internal_class ()
23660 callable a second time to setup a new parent class.
23662 2004-06-23 Dick Porter <dick@ximian.com>
23664 * threads.c: Check for WAIT_IO_COMPLETION return values.
23666 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
23668 * appdomain.c: Removed the g_free on the public key token. Now copy
23669 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
23670 * assembly.c: Added public key token string value when loading
23671 assemblies. Fix bug #60439.
23672 * icall.c: Added missing informations (like public key) in
23673 GetReferencedAssemblies. Fix #60519.
23674 * image.h: Changed definition for public key token from const char*
23675 public_tok_value to guchar public_key_token [17];
23676 * reflection.c: Updated for changes to public key token.
23678 2004-06-22 Lluis Sanchez Gual
23680 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
23681 for the field in base classes.
23683 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23685 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
23686 mark headers as not supported, they are installed only for use by the
23689 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
23691 * *.c, *.h: avoid namespace pollution in public headers.
23693 2004-06-21 Martin Baulig <martin@ximian.com>
23695 * exception.c (mono_get_exception_security): It's in
23696 "System.Security", not in "System".
23698 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
23699 the exception classes.
23701 2004-06-21 Martin Baulig <martin@ximian.com>
23703 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
23704 Protect the exception object from being finalized.
23706 2004-06-21 Martin Baulig <martin@ximian.com>
23708 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
23711 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
23713 * reflection.c: Load the assembly in mono_reflection_type_from_name,
23714 if it was not loaded before. Fix parts of #60439.
23716 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
23718 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
23719 code that was broken since Ben's change: wrappers are now
23720 dependent on the method signature only again.
23722 2004-06-21 Martin Baulig <martin@ximian.com>
23724 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
23725 added interface support.
23727 2004-06-21 Martin Baulig <martin@ximian.com>
23729 * class.c (mono_vtable_get_static_field_data): New public method.
23731 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
23733 * filewatcher.c : Windows build fix to be compliant with API changes.
23735 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23737 * class.h, class.c: more accessors.
23738 * metadata.h, metadata.c: prepare for hiding MonoType and
23739 MonoMethodSignature: people should use the accessors from now on
23740 outside of the tree.
23742 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23744 * *.c, *.h: more API cleanups.
23746 2004-06-18 Jackson Harper <jackson@ximian.com>
23748 * assembly.c: Trace loading assemblies.
23749 * loader.c: Trace loading native libraries.
23750 * mono-config.c: Trace loading config files.
23752 2004-06-18 Dick Porter <dick@ximian.com>
23754 * locales.c: Tell ICU the lengths of strings, it can cope with
23755 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
23757 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
23759 * image.c: swapped name/filename;
23761 2004-06-18 Martin Baulig <martin@ximian.com>
23763 * mono-debug-debugger.c (write_class): Write the parent class at
23764 the end of the header.
23766 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23768 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
23770 2004-06-17 Raja R Harinath <rharinath@novell.com>
23772 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
23773 (bundle_obj): New conditional define.
23774 (BUILT_SOURCES): Remove.
23775 ($(bundle_srcs)): Make parallel-make safe.
23776 (libmonoruntime_la_LIBADD): Make unconditional.
23777 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
23778 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
23780 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
23782 * culture-info-tables.h: It was inconsistent with the latest
23785 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
23787 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
23790 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
23793 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23795 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
23796 cleaned up public header threads.h.
23798 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23800 * Makefile.am, *.c, *.h: more API cleanups.
23802 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23804 * Makefile.am: removed monosn from compilation.
23805 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
23806 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
23807 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
23808 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
23809 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
23810 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
23812 2004-06-15 Jackson Harper <jackson@ximian.com>
23814 * assembly.c: Make locales lower case when searching the GAC for
23815 assemblies. gacutil will always make locales lowercase when
23816 installing so this effectively makes them case insensitive.
23818 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
23820 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
23821 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
23822 parameter which allows to choose whether the wait can be interrupted or
23823 not. Also added the method mono_monitor_enter(), which locks the monitor
23824 using an infinite wait and without allowing interruption.
23825 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
23827 * object.h: Added new fields in MonoThread. suspend_event holds the event
23828 used to susped/resume the thread. synch_lock is the lock object to use for
23829 modifying the thread state.
23830 * threads.c: Use the new synch_lock object for locking, instead of "this",
23831 which can generate deadlocks.
23832 Moved thread state change in Thread.Sleep and Thread.Join from managed
23833 to unmanaged code. This avoids a deadlock when the thread was suspended
23834 just after acquiring the thread lock.
23835 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
23836 Implemented Thread.Suspend using an event instead of ThreadSuspend,
23837 which is not fully implemented in the io-layer.
23838 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
23840 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
23842 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
23843 threads-types.h: more API cleanups.
23845 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23847 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
23848 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
23849 threadpool.c, threads.c: first pass at the exported API cleanup.
23851 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23853 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
23855 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23857 * icall.c: added internalGetHome.
23859 2004-06-14 Dick Porter <dick@ximian.com>
23861 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
23862 possible to return successfully when '.' or '..' were the only
23863 entries in a directory, but were skipped. The MonoIOStat was not
23864 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
23867 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23869 * reflection.c: make binaries run on .Net 1.1 by default.
23871 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
23873 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
23875 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
23877 * marshal.c: keep track of struct size with explicit layout
23880 2004-06-12 Martin Baulig <martin@ximian.com>
23882 * mono-debug-debugger.c: Comment out a debugging g_message().
23884 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23886 * reflection.c, reflection.h: do not free custom attrs that are cached.
23887 * icall.c: use braces to make code clearer.
23889 2004-06-11 Martin Baulig <martin@ximian.com>
23891 * class.h (MonoInflatedField): New type.
23892 (MonoClassField): Replaced `MonoType *generic_type' with
23893 `MonoInflatedField *generic_info'.
23896 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
23898 2004-06-11 Martin Baulig <martin@ximian.com>
23900 * reflection.c (mono_image_create_method_token): Correctly encode
23903 2004-06-11 Martin Baulig <martin@ximian.com>
23905 * metadata.c (mono_metadata_parse_method_signature): When parsing
23906 a MethodDef which has VarArgs, also set sentinelpos if we don't
23907 have any parameters.
23909 2004-06-11 Martin Baulig <martin@ximian.com>
23911 * verify.c (mono_method_verify): In CEE_CALL, use
23912 mono_method_get_signature() to get the method's signature, unless
23913 we're a PInvoke method.
23915 2004-06-10 Jackson Harper <jackson@ximian.com>
23917 * assembly.c: Use <path>/lib/mono/gac for the extra paths
23918 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
23919 logical name as the supplied path is just a prefix to the gac not
23920 the direct path to it.
23922 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
23924 * reflection.c: make the token for a created method match
23925 the token of the MethodBuilder it was created from
23926 (IKVM requires this behaviour now).
23928 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
23930 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
23931 reflection.c, socket-io.c: leak fixes.
23933 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23935 * icall.c: handle sentinel pos in vararg methods in position different
23938 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23940 * culture-info-tables.h: freshly generated.
23942 2004-06-09 Martin Baulig <martin@ximian.com>
23944 * loader.c (mono_get_method_constrained): Call `mono_class_init
23945 (constrained_class)'.
23947 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
23949 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
23950 any methods. Fixes #59629.
23952 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23954 * culture-info-tables.h: reflecting locale-builder updates.
23956 2004-06-08 Dick Porter <dick@ximian.com>
23959 * locales.c: Fixed compile warnings, including a real bug in
23960 CompareInfo_internal_compare.
23962 2004-06-08 Dick Porter <dick@ximian.com>
23965 (ves_icall_System_Globalization_CompareInfo_internal_index):
23966 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23967 Double-check the resuls of usearches, because ICU currently
23968 ignores most of the collator settings here. Fixes bug 59720.
23970 2004-06-08 Dick Porter <dick@ximian.com>
23973 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23974 Fix memory leak and segfault-causing typo. No idea how this one
23975 lasted so long without being noticed.
23977 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
23979 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
23980 any methods. Fixes #59629.
23982 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23985 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
23986 own the critical section before). Removed dead code (that's done
23987 in the preload hook).
23989 (mono_assembly_load_with_partial_name): call the preload hook.
23991 2004-06-08 Martin Baulig <martin@ximian.com>
23993 * metadata.c (mono_metadata_signature_alloc): Default
23994 `sentinelpos' to -1.
23996 * reflection.c (mono_image_get_array_token): Likewise.
23998 2004-06-08 Martin Baulig <martin@ximian.com>
24000 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
24002 * metadata.c (mono_metadata_parse_method_signature): When parsing
24003 a MethodDef which has VarArgs, set sentinelpos.
24005 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
24006 `gint16' since we're using -1 for non-varargs methods.
24009 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
24010 (method_encode_signature): Added varargs support.
24011 (method_builder_encode_signature): Likewise.
24012 (mono_image_get_varargs_method_token): New static method.
24013 (mono_image_create_method_token): New public method; this is
24014 called via an icall instead of mono_image_create_token() when
24015 calling a varargs method.
24017 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
24019 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
24021 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
24023 * culture-info-tables.h : Reflecting the latest locale-builder that
24024 fixed empty array representation ({} to {0}).
24026 2004-06-07 Jackson Harper <jackson@ximian.com>
24028 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
24029 looking up extra gac paths. This allows MONO_GAC_PATH to act
24030 exactly like a prefix.
24032 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
24034 * reflection.c (mono_reflection_type_from_name): Make a copy of the
24035 type name before modifying it. Fixes #59405.
24037 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
24039 * culture-info.h: added fields for "all datetime patterns".
24040 * locales.c: ( ves_icall_System_Globalization_CultureInfo
24041 _construct_datetime_format ()): fill xxx_patterns fields.
24042 * object.h: added fields for "all datetime patterns" to
24043 MonoDateTimeFormatInfo.
24044 * culture-info-tables.h: reflecting locale-builder updates.
24046 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
24048 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
24049 the event has no add and remove methods. Fixes #59629.
24051 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
24053 * object.c: Fixed possible integer overflow when allocating large
24056 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
24058 * culture-info-tables.h: reflecting locale-builder updates.
24060 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
24062 * culture-info-tables.h: reflecting locale-builder updates.
24064 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
24066 * culture-info-tables.h: reflecting locale-builder updates.
24068 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
24070 * threads.c: Made Thread.Sleep abortable.
24072 2004-06-02 Martin Baulig <martin@ximian.com>
24074 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
24076 * debug-mono-symfile.h: Bumped symbol file version number to 37.
24078 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
24080 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
24082 2004-05-30 Jackson Harper <jackson@ximian.com>
24084 * reflection.c: Do not hardcode assembly versions or public key
24085 tokens anymore. All of this except the corlib section was dead
24088 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
24090 * object.c (mono_runtime_invoke_array): Automatically create boxed
24091 objects for byref valuetypes if needed. Fixes #59300.
24093 * object.c (mono_method_return_message_restore): Handle
24094 MONO_TYPE_OBJECT as well.
24096 2004-05-28 Jackson Harper <jackson@ximian.com>
24098 * reflection.c: The modified type encoding was causing build
24099 problems. Reverted for now.
24101 2004-05-28 Jackson Harper <jackson@ximian.com>
24103 * reflection.c/h: Take an assembly ref so that we dont create
24104 fully qualified names when encoding types in the same assembly as
24105 the custom attribute being emitted.
24106 * appdomain.c: Increment version number.
24108 2004-05-26 Duncan Mak <duncan@ximian.com>
24111 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
24112 Set the full version number (major, minor, build, revision).
24114 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
24116 * marshal.c (emit_struct_conv): increment src/dst after blit
24117 (mono_marshal_get_managed_wrapper,
24118 mono_marshal_get_native_wrapper): make sure we have marshalling
24119 info before marshalling params (info computation affects
24122 * class.c (class_compute_field_layout): correctly deal with
24124 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
24125 value types (as per what windows dows by default)
24126 (mono_class_setup_mono_type): System.ValueType is blittable
24127 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
24130 * marshal.c (mono_marshal_load_type_info): flag types as
24131 non-blittable if the native layout doesn't match the managed
24134 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24136 * appdomain.c: don't add stuff in the private search path that is
24137 above the application base. If application base is not set, there's
24138 no private search path.
24140 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
24142 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
24143 byref struct arguments in native->managed marshalling.
24145 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
24147 * marshal.c (mono_marshal_get_runtime_invoke): correctly
24148 cache methods using signature (special case for methods
24149 that are value type or string class)
24151 * image.c (mono_image_close): clean up allocated GSList's
24152 in runtime_invoke_cache.
24154 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24156 * mono-config.c: set the correct path for mono_cfg_dir on windows when
24157 there's no MONO_CFG_DIR environment variable defined.
24159 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24161 * threads.c: windows version must be >= 0x0500 to include OpenThread.
24163 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
24165 * threadpool.c: Really wait for 500ms after the async call, even if the wait
24167 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
24168 before waiting for it, and call CloseHandle after the wait to unref it.
24169 This will make sure that handles are not disposed too early.
24171 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24176 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
24179 * object.c: se the application_base only for the domain that runs
24180 Main. Fixes bug #59216,
24182 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24185 * object.c: only the domain in which Main is run have
24186 SetupInformation.ConfigurationFile set, so moved a few lines from
24187 appdomain.c to object.c.
24189 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24191 * appdomain.c: we tried to load [name].(dll|exe), but according
24192 to bug #57710, we must also try [culture]/[name].(dll|exe) and
24193 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
24194 There's a test case attached to bug #58922.
24196 2004-05-27 Dick Porter <dick@ximian.com>
24199 * file-io.c: Implemented icalls for locking and unlocking regions
24201 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
24202 FALSE on error (fixes both compiler warning and real bug.)
24204 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
24206 * culture-info-tables.h: reflecting locale-builder updates.
24208 (Added missing ChangeLog entry for 05/26)
24210 2004-05-27 Jackson Harper <jackson@ximian.com>
24212 * locales.c: Fix some cut and paste errors.
24214 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24216 * mono-config.c: set the correct path for config. directory on windows.
24218 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
24220 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
24223 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
24225 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
24226 from pinvoke functions.
24228 * marshal.c (mono_ftnptr_to_delegate): Implement this.
24230 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
24232 * culture-info-tables.h: reflecting locale-builder updates.
24234 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
24236 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
24239 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
24241 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
24242 * icall.c: Modified icalls for RNG.
24243 * rand.c|h: Changed RNG interface to allow thread-safe usage under
24244 Windows (CryptoAPI).
24246 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
24248 * locales.c: Fix build.
24250 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
24252 * culture-info-tables.h: reflecting locale-builder updates.
24254 2004-05-25 Jackson Harper <jackson@ximian.com>
24256 * locales.c: When creating the current culture use the $LANGs
24257 specific culture. So DateTimeFormat and NumberFormat entries are created.
24259 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
24261 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
24262 a char array as parameter.
24264 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
24266 * image.c: In mono_image_open(), always use an absolute path name to
24267 look for already loaded images.
24269 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
24271 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
24272 missing in the windows build (like older cygwin include files).
24274 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
24276 * icall.c: Fixed check for possible integer overflow in Buffer_
24277 BlockCopy icall. Replaced comments style // by /* */.
24279 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
24281 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
24283 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
24284 check after MONO_VTADDR. Fixes pinvoke2.exe.
24286 * marshal.h marshal.c metadata.h: Add beginnings of support for
24287 ftnptr -> delegate marshalling.
24289 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
24291 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
24292 * threads.c: Fix warnings.
24294 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
24296 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
24297 * icall.c: Registered icalls for Suspend and Resume.
24298 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
24300 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
24301 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
24302 * process.c: Use WaitForSingleObjectEx.
24303 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
24305 * threads.c, threads.h: Make use of new Ex wait methods. Improved
24306 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
24307 for Suspend and Resume. Added new mono_thread_stop, used for stoping
24308 background threads. Added basic support for Abort in Windows.
24309 Start new threads using a managed delegate invoke wrapper. This wrapper
24310 has an interruption checkpoint that is needed since an interruption
24311 can be requested before the thread leaves the unmanaged code that starts
24313 * marshal.c: Added interruption checkpoint after every native call, and
24314 also before managed calls for wrappers called from unmanaged code to
24315 go into managed code.
24316 * object.h: Added new field in MonoThread to keep track of interruption
24319 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
24321 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
24324 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24331 * rand.c: getenv -> g_getenv (windows!)
24333 * process.c: complete_path is also used on non-windows platforms.
24335 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24337 * icall.c: new signature for Process_Start.
24339 * process.[ch]: new signature for Process_Start. If we're on windows
24340 and UseShellExecute is false, we have to search for the program by
24341 ourselves if we don't get a full path.
24343 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
24345 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
24346 marshalling and call CleanUpNativeData if needed. Fixes #58646.
24348 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24350 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
24353 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24355 * process.c: use double quotes to quote program name and arguments on
24356 windows. Fixes bug #58575.
24358 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24360 * file-io.c: don't return "." and ".." when using windows Find*File.
24362 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
24364 * marshal.c: Don't pass wrappers to message init because method
24365 addressed used to lookup metadata. part of remoting[2|3] fix.
24367 2004-05-15 Jackson Harper <jackson@ximian.com>
24369 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
24370 path is essentially the same as MONO_PATH except that it points to
24371 GACs instead of lib directories.
24372 * loader.h: The user gac is gone so we dont need function to
24374 * mono-config.c: user gac option is now gone.
24376 2004-05-15 Jackson Harper <jackson@ximian.com>
24378 * culture-info.h: Make defines more consistent, add calendar data
24379 to the culture info table.
24380 * culture-info-tables.h: Add basic calendar data. Basically
24381 everyone gets default gregorian until all the data is
24383 * locales.c: Use the new consistent defines. Set calendar data for
24384 culture info objects.
24385 * object.h: add a field for calendar data to CultureInfo
24387 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
24389 * image.c: image->runtime_invoke_cache is keyed on signatures now.
24390 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
24392 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
24393 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
24394 an extra param that is the pointer of the method to invoke. The IL for
24395 the invoke method is no longer specific to the method, but to the
24396 signature of the method. Thus, we can share the same code for multiple
24397 methods. This reduces the number of methods that have to be compiled.
24399 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
24401 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
24403 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
24405 * icall.c: Optimize Buffer.BlockCopy.
24407 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24409 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
24410 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
24411 quote). Changed them to "MMMM yyyy".
24413 2004-05-12 Miguel de Icaza <miguel@ximian.com>
24416 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
24418 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
24420 * reflection.h: Updated after changes to managed structures.
24422 * appdomain.c: Bump corlib version.
24424 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24426 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
24429 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24431 * Makefile.am: link to ../os/libmonoos.la on windows.
24434 -If MONO_DEBUG, warn about non-existing directories in
24436 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
24437 compile time variable.
24438 -Removed init_default_path and call mono_set_rootdir from
24439 libmonoos.a instead (windows only).
24441 * assembly.h: declare mono_assembly_getrootdir().
24444 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
24446 * loader.c: s/getenv/g_getenv/
24448 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
24450 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
24452 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
24454 * metadata.h: Add new marshalling conversions.
24456 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
24459 * reflection.c (mono_reflection_get_type): Lookup the type in all
24460 modules of a multi-module assembly. Fixes #58291.
24462 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
24464 * threads.c: Before aborting a background, set the StopRequested
24465 state. This avoids throwing the Abort exception.
24466 In mono_thread_manage, don't continue with the shutdown until all
24467 aborted threads have actually stopped.
24469 2004-05-10 Jackson Harper <jackson@ximian.com>
24471 * locales.c: Remove the modifier from culture names.
24473 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24475 * Makefile.am: monosn is not installed any more. It has been deprecated
24478 2004-05-07 Jackson Harper <jackson@ximian.com>
24481 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
24482 Fix array construction, add bailout if the length is 0.
24484 2004-05-07 Dick Porter <dick@ximian.com>
24486 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
24487 machine doesn't have a DNS entry. Patch by Urs Muff
24488 (umuff@quark.com), fixes bug 57928.
24490 2004-05-06 Jackson Harper <jackson@ximian.com>
24492 * reflection.c: Handle null PublicTokens properly. alloc mem for
24493 assembly names culture so we dont crash when freeing it.
24495 2004-05-06 Jackson Harper <jackson@ximian.com>
24497 * assembly.c: Check the usergac when loading with partial names.
24499 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
24501 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
24502 does nothing for now (not required for Linux/Windows) but the class
24503 library can call it (and a newer or modified runtime could need it).
24504 * icall.c: Registred icall.
24506 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24508 * loader.c: prints a message on module loading error we set MONO_DEBUG
24509 environment variable.
24511 2004-05-05 Jackson Harper <jackson@ximian.com>
24513 * appdomain.c: Handle PublicKeyToken=null properly.
24515 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
24517 * environment.c|h: Added icall ves_icall_System_Environment_
24518 GetOSVersionString to get the current OS version as a string.
24519 * icall.c: Registred icall.
24521 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
24523 * object.c: in mono_object_get_virtual_method(), take into account that
24524 non-virtual methods don't have a slot in the vtable. Check needed when
24525 the object is a proxy.
24527 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
24529 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
24530 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
24532 * object.c (mono_class_compute_gc_descriptor): Fix warning.
24534 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
24535 passed when a valuetype is expected.
24537 * object.c (mono_unhandled_exception): Only set the exit code if the
24538 exception happens in the main thread. Fixes thread5.exe.
24540 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
24541 invalid names. Fixes #58047.
24543 2004-05-03 Jackson Harper <jackson@ximian.com>
24545 * assembly.c: This line was committed accidently and is unneeded.
24547 2004-05-03 Jackson Harper <jackson@ximian.com>
24549 * icall.c: Add new icall for Assembly::LoadWithPartialName
24550 * assembly.c/.h: new function that probes the GAC to load partial
24551 assembly names by Paolo Molaro.
24553 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24555 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
24556 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
24557 (type_get_fully_qualified_name): Added PublicKeyToken when building a
24560 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24562 * appdomain.c: fixed check for 'neutral' culture and removed warning.
24563 * reflection.c: fix bug when parsing a full type name and Version is not
24564 the last thing in the string.
24566 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
24568 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
24569 crashes when it is freed.
24571 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24573 * assembly.c: print the compat warning to stderr.
24575 2004-05-01 Miguel de Icaza <miguel@ximian.com>
24577 * assembly.c (mono_assembly_load_references): Add a compatibility
24578 hack to run old applications that might be still referencing the
24579 3300-based assemblies, only do this for System.xxx.
24581 2004-05-01 Jackson Harper <jackson@ximian.com>
24583 * appdomain.c: If the culture is neutral we set it to "".
24585 2004-04-29 Jackson Harper <jackson@ximian.com>
24587 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
24589 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
24591 * string-icalls.c: added low overhead function for copying chars
24592 * icall.c: added needed icall for the above function
24594 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24596 * icall.c: fix return value of get_global_assembly_cache. Implemented
24597 Environment.GetLogicalDrives.
24599 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
24601 * rand.c: try and talk to egd or prngd
24602 for random bytes if opening devices fail.
24604 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
24606 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
24607 alignment for the type using the native alignment of its members
24608 instead of using klass->min_align.
24610 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
24612 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24615 * socket-io.c: added check for sys/aio.h.
24617 2004-04-28 Dick Porter <dick@ximian.com>
24619 * threads.c: Don't abort a thread thats already aborting, when
24620 terminating everything.
24622 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24624 * icall.c: added 2 new async calls for Socket.
24626 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
24627 IO on *nix systems.
24629 * threadpool.c: removed unused variable.
24631 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
24633 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
24635 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
24637 * locales.c: put back string_invariant_tolower () and
24638 string_invariant_toupper ().
24640 2004-04-26 David Waite <mass@akuma.org>
24645 * unicode.h: remove comma from end of enumeration declarations
24647 2004-04-26 David Waite <mass@akuma.org>
24649 * debug-mono-symfile.h:
24652 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
24655 2004-04-26 Jackson Harper <jackson@ximian.com>
24657 * appdomain.c: Increment version number.
24659 2004-04-26 Jackson Harper <jackson@ximian.com>
24661 * appdomain.c: Set assembly references public token value when
24662 PublicKeyToken is specified, not the hash_value. Free public token
24663 values when free assembly name data. Previously the public key
24664 token was hex decoded, however we are using hex encoded public key
24665 tokens, so this is not neccasary.
24666 * assembly.c: Lookup assemblies in the gac if their public token
24667 value is set. Add function to allow enabling user gac
24668 lookups. Specify whether or not the assembly was loaded from the
24669 GAC. Compare full assembly names when checking the cache for
24670 assemblies (Temporarily disabled see comment in code). Remove
24671 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
24672 specifies trace-loader they get extra info to stdout on the
24673 loading of assemblies.
24674 * image.h: Add a field for an assembly references public token
24675 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
24676 whether an assembly has been loaded from the GAC.
24677 * image.c: Remove a corlib -> mscorlib name mapping.
24678 * loader.h: Add function to enable/disable the user gac.
24679 * mono-config.c: Check if the usergac is enabled in the config
24681 * icall.c: New icall to determine whether or not an assembly has
24682 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
24683 * tabldefs.h: Add constant for assemblyref flag that specifies a
24684 full public key is used instead of a public token.
24685 * reflection.c: Remove mscorlib -> corlib mappings. Set
24686 PublicTokenValue instead of hash value. This value is a hex
24687 string so it does not need to be expanded.
24689 2004-04-26 Martin Baulig <martin@ximian.com>
24691 * mono-debug-debugger.c (mono_debugger_initialize): Set
24692 `mono_debugger_initialized' before calling mono_debug_lock().
24694 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
24696 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
24697 InternalToUpper/InternalToLower.
24698 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
24699 removed invariant culture shortcut. This is now done in managed code.
24700 * locales.c: (string_invariant_toupper/tolower) removed.
24702 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24704 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
24705 Added Poll internal call.
24707 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
24708 call for Poll. Select was too heavy for polling a single socket.
24710 * threadpool.[ch]: added mono_threadpool_cleanup.
24711 * threads.c: use it. Don't use Thread_Abort on windows.
24713 2004-04-23 Martin Baulig <martin@ximian.com>
24715 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
24717 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
24719 * icall.c: Registred new icalls for key pair protection and added an
24720 icall for Environment.GetFolderPath on Windows.
24721 * security.c|h: Added new icalls for key pair protection.
24723 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24725 * socket-io.c: don't display the non-supported family warning for known
24726 families. Now this is not displayed on windows when checking support
24729 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24731 * class.c: don't display the layout warning for static fields.
24733 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
24735 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
24736 * locales.c, locales.h: Added new icalls for culture-specific
24737 Char.ToLower and Char.ToUpper.
24739 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24741 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
24744 2004-04-20 Martin Baulig <martin@ximian.com>
24746 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
24747 of the type name before passing it to mono_reflection_type_from_name().
24749 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
24751 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
24752 encodings here. Fixes #56965.
24754 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
24756 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24757 fix test on strstr result not that I can see anything that
24758 relies on the result.
24760 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
24762 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
24765 * marshal.c (mono_marshal_get_string_encoding): New helper function.
24767 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
24768 function to determine which marshalling to use for strings. Fixes
24771 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
24773 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
24775 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
24777 * icall.c: #include mono-config.h
24779 2004-04-15 Jackson Harper <jackson@ximian.com>
24781 * culture-info-tables.h: Fix date formats for en-US culture.
24783 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
24785 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
24786 ThreadPool.SetMinThreads.
24787 * threadpool.c: Implemented ThreadPool.GetMinThreads and
24788 ThreadPool.SetMinThreads.
24790 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
24792 * mono-config.c: also load the .config file in the directory
24793 where the assembly was found.
24795 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
24797 * assembly.c: load per-assembly config files.
24798 * icall.c: decrapified code to get the config dir and moved to
24800 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
24801 per-assembly config files. When doing a dll map lookup give precedence
24802 to the per-assembly data.
24804 2004-04-14 Martin Baulig <martin@ximian.com>
24806 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
24807 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
24808 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
24810 * mono-debugger-debugger.c: While the debugger is locked, remember
24811 whether the symbol tables have changes and send one single
24812 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
24814 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
24816 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
24818 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
24821 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
24822 account when marshalling string arrays. Fixes #56965.
24824 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
24826 * icall.c: Add new icalls mapping for security.
24827 * security.c|h: Add internal calls for WindowsIdentity,
24828 WindowsImpersonationContext and WindowsPrincipal.
24830 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
24832 * class.c: Added comment to ensure the System.MonoDummy class
24833 is removed when no longer necessary
24835 2004-04-13 Miguel de Icaza <miguel@ximian.com>
24837 * appdomain.c: Pass arguments to the bootstraping exceptions to
24838 minimize JITed methods at boot
24840 * metadata.c (mono_exception_from_name_two_strings): Allow for the
24841 second string to be null.
24843 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24844 Change the protocol to minimize the JIT methods at startup. Now
24845 it Returns the internal codepage, if the value of "int_code_page"
24846 is 1 at entry, and we can not compute a suitable code page
24847 number, returns the code page as a string.
24849 2004-04-13 Jackson Harper <jackson@ximian.com>
24851 * culture-info-tables.h: Fix number of decimal digits for all
24854 2004-04-13 Jackson Harper <jackson@ximian.com>
24856 * icall.c: Clairfy out of sync error message. It is not always
24857 your corlib that is out of sync.
24859 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
24861 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
24862 properties when only the set accessor is overriden. Fixes #55874.
24864 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
24866 * assembly.c (mono_assembly_load_references): Make this thread safe.
24869 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
24871 * monosn.c: Add missing initialization calls.
24873 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
24876 ves_icall_System_Globalization_CultureInfo_construct_number_format
24877 Fix g_assert so it compiles on fussier compilers re int/ptr
24880 2004-04-08 Dick Porter <dick@ximian.com>
24883 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
24884 53992. Also rearrange the code so that the internal calls return
24885 an error value and exceptions are thrown from managed code.
24887 * icall.c: Add type info to the socket icalls.
24889 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24891 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
24894 2004-04-07 Martin Baulig <martin@ximian.com>
24896 * class.c (mono_class_from_generic_parameter): Don't default
24897 `klass->parent' to `mono_defaults.object_type'.
24899 2004-04-07 Martin Baulig <martin@ximian.com>
24901 * reflection.c (mono_reflection_initialize_generic_parameter): Set
24902 `param->pklass->reflection_info'.
24904 2004-04-07 Jackson Harper <jackson@ximian.com>
24906 * culture-info-tables.h: Fix date separator symbol.
24908 2004-04-07 Martin Baulig <martin@ximian.com>
24910 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
24911 from System.Type to System.MonoType.
24913 2004-04-07 Martin Baulig <martin@ximian.com>
24916 (MonoReflectionGenericParam): Added `has_reference_type' and
24917 `has_value_type' fields.
24919 * reflection.c (mono_image_get_generic_param_info): Encode the
24920 correct flags if we have the `class' or `struct' constraint.
24922 2004-04-07 Martin Baulig <martin@ximian.com>
24925 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
24927 2004-04-07 Jackson Harper <jackson@ximian.com>
24929 * appdomain.c: Revert extra patches, just wanted to bump the
24932 2004-04-07 Jackson Harper <jackson@ximian.com>
24934 * Makefile.am: Add culture-info private headers.
24935 * icall.c: Add new icalls for contructing locales.
24936 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
24937 * locales.h: Declare new culture info construction methods.
24938 * object.h: Add new fields used to avoid the CultureMap to
24940 * culture-info.h: Definition of structs used in the culture info
24942 * culture-info-tables.h: Autogenerated tables that contain culture
24943 info data. This file was generated with the locale-builder tool.
24944 * appdomain.c: Incement corlib version number.
24946 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
24948 * appdomain.c: (mono_runtime_init) move mono_thread_init
24949 to before mono_object_new calls so critical sections
24950 are initialized before use.
24952 2004-04-07 Martin Baulig <martin@ximian.com>
24955 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
24956 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
24957 (ves_icall_MonoGenericParam_initialize): Removed.
24958 (monogenericparam_icalls): Removed.
24959 (generictypeparambuilder_icalls): Added new table for
24960 System.Reflection.Emit.GenericTypeParameterBuilder.
24963 (mono_reflection_define_generic_parameter): Removed.
24964 (mono_reflection_initialize_generic_parameter): This is now called
24965 from GenericTypeParameterBuilder's .ctor.
24967 2004-04-06 Martin Baulig <martin@ximian.com>
24969 * class.c (mono_class_init): Don't inflate nested classes in a
24971 (mono_type_get_name_recurse): Include the generic arguments for
24972 generic instances and generic type declarations.
24973 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
24974 (_mono_class_get_instantiation_name): Removed.
24975 (mono_class_create_generic): Always use `gklass->name' as our name.
24977 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
24979 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
24980 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
24981 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
24982 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
24983 closed generic methods here.
24986 (mono_reflection_generic_inst_get_nested_types): Removed.
24987 (inflate_mono_method): Copy the generic parameters from the
24988 MonoMethodHeader into out MonoGenericMethod.
24990 2004-04-06 Martin Baulig <martin@ximian.com>
24993 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
24995 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
24997 * reflection.c (build_compressed_metadata): If we have any entries
24998 in the GenericParam, MethodSpec or GenericParamConstraint tables,
24999 set the header version to 1.1.
25001 2004-04-06 Martin Baulig <martin@ximian.com>
25003 * class.c (mono_class_init): If we're a generic instance,
25004 initialize our nested classes, too.
25005 (_mono_class_get_instantiation_name): Deal with the new `!%d'
25008 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25010 * process.c: quote the argument passed to the shell on windows.
25012 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
25014 * threads.c (mono_alloc_special_static_data): Allow this to be
25015 called during startup.
25017 2004-04-02 Martin Baulig <martin@ximian.com>
25020 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
25022 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
25024 * icall.c: Fix build.
25026 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
25028 * Makefile.am: Added security.c|h.
25029 * icall.c: Added icall for get_UserName;
25030 * security.c: New file for security related icalls. Added function
25031 get_UserName for System.Environment (fix #56144).
25032 * security.h: New. Header file for security.c
25034 2004-04-02 Dick Porter <dick@ximian.com>
25036 * icall.c: Deleted the icalls that were obsoleted some time ago
25037 by the ICU string code, and which were mixed into the icall
25038 rearranging. Fixes bug 55969.
25041 * string-icalls.c: Deleted the code that those icalls reference.
25043 2004-04-01 Martin Baulig <martin@ximian.com>
25045 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
25047 * class.c (mono_class_from_generic_parameter): Don't set
25048 TYPE_ATTRIBUTE_INTERFACE.
25049 (my_mono_class_from_generic_parameter): Likewise.
25051 2004-04-01 Martin Baulig <martin@ximian.com>
25053 * loader.c (find_method): Added an optional `MonoClass *ic'
25054 argument to search in a specific interface.
25055 (mono_get_method_constrained): New public function.
25057 2004-04-01 Martin Baulig <martin@ximian.com>
25059 * reflection.c (mono_image_get_generic_field_token): Use the
25060 `handleref' cache here.
25062 2004-04-01 Martin Baulig <martin@ximian.com>
25064 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
25066 * reflection.c (create_generic_typespec): Use the `typespec' hash
25067 here, not the `typeref' one.
25069 2004-04-01 Martin Baulig <martin@ximian.com>
25071 * class.c (mono_class_inflate_generic_type): Moved the
25072 functionality into a new static inflate_generic_type() which
25073 returns NULL if it didn't do anything. Only increment the
25074 `mono_stats.inflated_type_count' if we actually inflated
25076 (mono_class_get_full): Check the classes type to see whether we
25077 need to inflate it; also inflate MONO_TYPE_(M)VAR.
25079 2004-04-01 Jackson Harper <jackson@ximian.com>
25081 * reflection.c: Set culture for assembly references.
25083 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
25085 * reflection.[ch], icall.[ch], Fix support for pinning variables.
25087 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25090 (do_mono_assembly_open): the critical section also covers
25091 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
25093 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25096 (mono_manage_threads): abort the background threads when finishing.
25099 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25101 * gc.c: only close the done_event handle if there was no timeout.
25104 2004-03-30 Martin Baulig <martin@ximian.com>
25106 * icall.c (icall_entries): It's called "System.Activator", not
25107 "System.Activation".
25109 2004-03-30 Martin Baulig <martin@ximian.com>
25111 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
25112 (mono_class_create_from_typespec): Likewise.
25114 2004-03-30 Martin Baulig <martin@ximian.com>
25116 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
25117 `has_ctor_constraint' and `initialized'.
25119 2004-03-30 Martin Baulig <martin@ximian.com>
25121 * reflection.c (encode_new_constraint): New static function to add
25122 the constructor constraint attribute to a type parameter.
25123 (encode_constraints): Call encode_new_constraint() if necessary.
25126 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
25128 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
25130 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
25132 * reflection.c, icall.c: add support for pinning variables.
25134 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
25136 * marshal.c (mono_marshal_get_managed_wrapper):
25137 init bool local with zero rather than null.
25139 2004-03-29 Martin Baulig <martin@ximian.com>
25141 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
25142 the "official" behavior here.
25143 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
25145 2004-03-29 Martin Baulig <martin@ximian.com>
25147 * icall.c: Reflect latest API changes.
25149 2004-03-29 Martin Baulig <martin@ximian.com>
25151 * loader.c (mono_get_method_from_token): Also call
25152 mono_metadata_load_generic_params () for abstract and interface
25153 methods; replace the type arguments in the method signature with
25154 the ones which are loaded from the metadata.
25156 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
25158 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
25159 of the lock is not the current thread. MS.NET don't do it, in spite of
25160 what the documentation says. See bug #56157.
25162 2004-03-28 Martin Baulig <martin@ximian.com>
25164 * class.c (mono_class_init): Don't call init_properties() and
25165 init_events() for generic instances; set `prop->parent' when
25166 inflating properties.
25168 * reflection.c (mono_generic_inst_get_object): Call
25169 `mono_class_init (ginst->klass)'.
25170 (mono_type_get_object): Only create a MonoGenericInst if your
25171 generic type is a TypeBuilder.
25172 (do_mono_reflection_bind_generic_parameters): Only set
25173 `ginst->is_dynamic' if our generic type is a TypeBuilder.
25175 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
25177 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
25180 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25182 * icall.c: added Kill_internal icall.
25183 * process.[ch]: added Kill_internal icall.
25185 2004-03-25 Martin Baulig <martin@ximian.com>
25187 * class.h (MonoStats): Added `generic_instance_count',
25188 `inflated_method_count', `inflated_type_count' and
25189 `generics_metadata_size'.
25191 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25193 * reflection.c: no warnings now.
25195 2004-03-25 Martin Baulig <martin@ximian.com>
25197 * class.c (mono_class_get_full): New public function; does a
25198 mono_class_get(), but also takes a `MonoGenericContext *'.
25200 * loader.c (mono_field_from_memberref): Renamed to
25201 `field_from_memberref', made static and added `MonoGenericContext *'
25203 (mono_field_from_token): Added `MonoGenericInst *' argument.
25204 (method_from_memberef): Likewise.
25205 (mono_get_method_from_token): Likewise.
25206 (mono_get_method_full): New public function; does a
25207 mono_get_method(), but also takes a `MonoGenericContext *'.
25209 * verify.c (mono_method_verify): Get the method's generic context
25210 and pass it to mono_field_from_token(), mono_get_method_full() and
25211 mono_class_get_full().
25213 2004-03-25 Martin Baulig <martin@ximian.com>
25215 * class.c (mono_class_inflate_generic_type): Take a
25216 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
25217 `MonoGenericMethod *'.
25219 2004-03-25 Martin Baulig <martin@ximian.com>
25221 * loader.h (MonoMethodInflated): Store the MonoGenericContext
25222 instead of the MonoGenericMethod here.
25224 2004-03-25 Martin Baulig <martin@ximian.com>
25226 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
25227 each time we create a new MonoGenericInst, we also create a new
25228 context which points back to us.
25230 * class.c (inflate_method): Use `ginst->context' instead of
25231 creating a new context.
25233 * loader.c (method_from_memberref): Use
25234 `klass->generic_inst->context' instead of creating a new context.
25236 2004-03-25 Martin Baulig <martin@ximian.com>
25238 * class.h (MonoGenericContext): New struct.
25239 (MonoGenericMethod): Removed `generic_inst'.
25241 * class.c (mono_class_inflate_generic_method): Take a
25242 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
25244 2004-03-25 Martin Baulig <martin@ximian.com>
25246 * loader.h (MonoMethodInflated): New typedef.
25248 * metadata.h (MonoMethodSignature): Removed `gen_method', make
25249 `generic_param_count' consume just 30 bits, added `is_inflated'
25250 and `has_type_parameters' flags (one bit each).
25252 * class.c (mono_class_inflate_generic_method): Create a
25253 MonoMethodInflated instead of a MonoMethodNormal and set
25254 `is_inflated' in the method signature.
25256 * class.h (MonoGenericMethod): Removed `generic_method'.
25258 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
25260 * image.c: Make sure the name of a MonoImage is always an absolute path.
25261 This fixes bug #54415.
25263 2004-03-24 Martin Baulig <martin@ximian.com>
25265 * class.c (mono_class_setup_vtable): If we're a generic instance,
25266 use our generic type's vtable size.
25268 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
25270 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
25271 MONO_NO_UNLOAD env var as a temporary workaround for unloading
25274 2004-03-23 Martin Baulig <martin@ximian.com>
25276 * class.h (MonoDynamicGenericInst): Added `int count_events' and
25277 `MonoEvent *events'.
25279 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
25280 (typebuilder_icalls): Added "get_event_info"; calls
25281 mono_reflection_event_builder_get_event_info().
25283 * reflection.c (mono_reflection_generic_inst_initialize): Added
25284 `MonoArray *events'.
25285 (mono_reflection_event_builder_get_event_info): New function.
25287 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
25289 * object.h: add mono_type_initialization_init
25291 * object.c (mono_runtime_class_init):
25292 implement class constructor synchronization rules
25293 to cope with threading issues.
25294 add mono_type_initialization_init
25296 * appdomain.c (mono_runtime_init): call
25297 mono_type_initialization_init
25299 * class.h: removing initializing field from MonoVTable
25301 2004-03-23 Martin Baulig <martin@ximian.com>
25303 * class.c (my_mono_class_from_generic_parameter): Use
25304 `param->name' if it's not NULL.
25306 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
25308 * class.c: do not insert non-virtual methods in the vtable.
25309 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
25310 that means the method is non-virtual. This never would have
25313 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
25315 * profiler.c: Added lock for accessing coverage_hash.
25317 2004-03-22 Martin Baulig <martin@ximian.com>
25319 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
25320 `method->method->signature->generic_param_count != 0' to make it
25321 work for interface methods.
25323 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25325 * process.c: quote the string passed to the shell using g_shell_quote.
25327 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25330 (mono_threads_manage): don't remove the finalizer thread and self
25331 from the threads hash table so that mono_thread_manage can be called
25334 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25336 * process.c: quote the arguments when UseShellExecute is true. Fixes
25339 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25341 * threads.c: set mono_thread_detach as a cleanup routine for every
25342 thread. This way it's always executed upon thread termination, either
25343 aborted or finished normally. No more xsp hangs!
25345 2004-03-17 Martin Baulig <martin@ximian.com>
25347 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
25348 `int count_nested' and a `MonoType **nested'.
25350 * reflection.c (mono_reflection_bind_generic_parameters): Moved
25351 most of the functionality into a new static
25352 do_mono_reflection_bind_generic_parameters() and don't take a
25353 `MonoType *nested_in' argument any more. Don't compute nested
25355 (mono_reflection_generic_inst_get_nested_types): New public method
25356 to get nested types.
25358 * class.c (mono_class_create_generic): Set `klass->nested_in' if
25359 we're a nested class.
25361 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
25362 mono_reflection_generic_inst_get_nested_types() to compute the
25365 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
25367 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
25368 descriptive error message under windows.
25370 2004-03-17 Martin Baulig <martin@ximian.com>
25372 * class.c (dup_type): Added `const MonoType *original' argument;
25373 copy the attrs from the original type.
25375 2004-03-17 Martin Baulig <martin@ximian.com>
25377 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
25378 `m->generic_inst_cache' here.
25380 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
25382 * exception.h exception.c: Add stack_overflow_exception.
25384 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25387 (overlapped_callback): call SetEvent *after* invoking the callback.
25388 No need to call CloseHandle.
25390 2004-03-16 Martin Baulig <martin@ximian.com>
25392 * reflection.c (mono_image_get_fieldref_token): Take a
25393 `MonoReflectionField *' instead of a `MonoClassField *' and a
25394 `MonoClass *'; store the `MonoReflectionField *' in the hash.
25396 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25398 * appdomain.c: don't add the culture to the filename we're looking for
25399 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
25401 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25403 * locales.c: don't ignore symbols when doing case insensitive compares.
25404 Thanks Dick! Fixes bug #54046.
25406 * threads.c: surround 'threads' usage with enter/leave in
25407 mono_thread_manage.
25409 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
25411 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
25412 implicitly marshalled as [Out]. Fixes #55450.
25414 (mono_marshal_get_runtime_invoke): Zero out the result if there is
25417 2004-03-16 Martin Baulig <martin@ximian.com>
25419 * class.c (mono_class_from_generic_parameter): Use the actual
25422 2004-03-16 Martin Baulig <martin@ximian.com>
25424 * reflection.c (type_get_signature_size): New static function.
25425 Compues the size of the type in a method signature.
25426 (method_get_signature_size): New static function; calls
25427 type_get_signature_size() to compute the actual size of the
25428 method's signature.
25429 (method_encode_signature): Use method_get_signature_size() to get
25430 the signature's size rather than using `nparams * 10'.
25432 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25434 * file-io.h: define here WapiOverlapped on windows. I don't want the
25435 regular OVERLAPPED one.
25438 * threadpool.c: somehow, BindIoCompletionCallback is not found.
25439 Disabling AIO on windows.
25441 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25443 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
25446 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25448 * appdomain.c: upgraded corlib version.
25450 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
25451 and BeginWrite. Allow opening files for asynchrnous operations.
25453 * file-io.h: new struct that maps FileStreamAsyncResult.
25454 * icall.c: added new icalls.
25455 * process.[ch]: support setting child process environment variables
25456 and use the SHELL or COMSPEC when UseShellExecute is true.
25458 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
25459 callback for async. IO is here and also BindHandle.
25461 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
25464 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
25466 * reflection.c (create_custom_attr): Allow len == 0.
25468 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
25469 computation on big-endian machines.
25471 2004-03-13 Martin Baulig <martin@ximian.com>
25473 * class.h (MonoGenericInst): Added `int count_ifaces'.
25475 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
25476 `ginst->count_ifaces' instead `klass->interface_count' since we
25477 may get called before the vtable is created.
25479 * loader.c (mono_method_get_param_names): If we're a generic
25480 instance, return and don't initialize the class.
25482 * reflection.c (mono_reflection_setup_generic_class): Don't call
25483 ensure_runtime_vtable().
25484 (mono_reflection_bind_generic_parameters): Set
25485 `ginst->count_ifaces'.
25487 2004-03-11 Jackson Harper <jackson@ximian.com>
25491 * unicode.h: Remove unused System.Char icalls.
25493 2004-03-11 Miguel de Icaza <miguel@ximian.com>
25495 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
25496 code when we P/Invoke the first library in Windows.Forms, instead
25497 of when we first open the assembly.
25499 * assembly.c: Drop the lookup from here.
25501 2004-03-10 Martin Baulig <martin@ximian.com>
25503 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
25504 class for properties, fields and events. Finally fixes #54945.
25506 2004-03-10 Martin Baulig <martin@ximian.com>
25508 * metadata.c (mono_metadata_class_equal): New static function;
25509 checks whether two generic instances or two generic parameters are
25511 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
25514 2004-03-10 Martin Baulig <martin@ximian.com>
25516 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
25518 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
25519 argument and write it into the `reflection_info' field.
25522 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
25523 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
25525 2004-03-09 Jackson Harper <jackson@ximian.com>
25527 * char-conversions.h: use 8 bits for numeric data its all we need
25528 * icall.c: numeric data is only 8 bits now.
25530 2004-03-09 Martin Baulig <martin@ximian.com>
25532 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
25534 * class.c (init_properties, init_events): Initialize the new
25537 * reflection.c (typebuilder_setup_properties): Likewise.
25538 (typebuilder_setup_events): Likewise.
25540 * reflection.h (MonoEventInfo): Replaced `parent with
25541 `declaring_type' and `reflected_type'.
25543 * icall.c (ves_icall_get_property_info): Distinguish between
25544 declaring and reflected type.
25545 (ves_icall_get_event_info): Likewise.
25547 2004-03-09 Martin Baulig <martin@ximian.com>
25549 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
25550 (ves_icall_Type_GetField): Correctly set field->klass.
25552 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
25554 * loader.h: Fix warning.
25556 2004-03-08 Miguel de Icaza <miguel@ximian.com>
25558 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
25559 library routine if present. Notice that it will still continue
25560 executing even if its missing, for those working on the Gtk#
25561 edition of Windows.Forms.
25563 * assembly.c (do_mono_assembly_open): If loading the
25564 System.Windows.Forms call mono_loader_wini_init.
25566 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
25568 * class.h: Added MonoRemoteClass struct.
25569 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
25570 function for MonoStrings.
25571 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
25572 Added internal call for getting the proxy type.
25573 * marshal.c: Get the type of transparent proxies from its remote_class.
25574 Added methods that generate the IL for type checks and casts:
25575 mono_marshal_get_isinst, mono_marshal_get_castclass,
25576 mono_marshal_get_proxy_cancast.
25577 * marshal.h: Declaration of the previous new methods.
25578 * object.c: Added new moethods for creating and updating MonoRemoteClass
25579 instances: mono_remote_class, mono_upgrade_remote_class,
25580 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
25581 * verify.c: FIx transparent_proxy_fields layout.
25582 * appdomain.c: Bump corlib version.
25584 2004-03-04 Jackson Harper <jackson@ximian.com>
25586 * icall.c: Add icall to access char conversion tables.
25587 * char-conversions.h: Character conversion tables.
25588 * Makefile.am: Add char-conversions.h private header file.
25590 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
25592 * appdomain.c (unload_thread_main): Increase unloading timeout to
25593 10 sec as a temporary workaround for Nant problems.
25595 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
25597 * gc.c: Add checks for GC_enable and GC_disable.
25599 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
25600 (jaak@zd.com.pl). Fix memory corruption in String.Replace
25603 2004-02-27 Martin Baulig <martin@ximian.com>
25605 * reflection.c (mono_reflection_bind_generic_parameters): Take a
25606 `MonoReflectionType *' instead of a `MonoType *'.
25608 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
25610 * gc.c (run_finalize): Avoid finalizing the object representing the
25612 (finalizer_thread): Fix warning.
25614 2004-02-25 Martin Baulig <martin@ximian.com>
25616 * class.c (_mono_class_get_instantiation_name): Added `int offset'
25617 argument for nested types.
25618 (mono_class_create_generic): Added support for nested generictypes.
25620 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
25623 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
25625 * reflection.c (method_encode_signature): Increase the minimum
25626 value of `size' from 10 to 11.
25627 (mono_reflection_bind_generic_parameters): Take `int type_argc'
25628 and `MonoType **types' arguments instead of the `MonoArray
25629 *types'; added `MonoType *nested_in'. Recursively instantiate
25632 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
25634 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
25635 stack_overflow_ex members which are used by exception handling.
25637 * appdomain.c (mono_runtime_init): Initialize the new members.
25639 * gc.c (mono_gc_enable): New helper function.
25640 * gc.c (mono_gc_disable): New helper function.
25642 2004-02-23 Martin Baulig <martin@ximian.com>
25644 * icall.c: I must have been really stupid - make it actually work
25647 2004-02-23 Martin Baulig <martin@ximian.com>
25649 * loader.c (method_from_memberref): Only inflate the method if
25650 it's in another klass.
25652 2004-02-23 Martin Baulig <martin@ximian.com>
25654 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
25655 (mono_class_init): If we're a generic instance and an interface,
25656 compute `class->interface_id'; also create `class->interfaces'
25657 here and inflate them.
25659 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
25661 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
25663 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
25665 2004-02-15 Miguel de Icaza <miguel@ximian.com>
25667 * reflection.c (method_encode_code): Improved the error message
25668 generated by the exception.
25670 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25672 * icall.c: Martin did not do what he said in the ChangeLog for
25673 2004-02-18, but put back the changes for properties and events.
25674 Commenting those changes out again and adding comment to bug #54518.
25676 * process.c: removed warning.
25678 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
25680 * marshal.c (emit_struct_conv): Print an error message instead of
25681 asserting when a type does not have the StructLayout attribute.
25683 2004-02-20 Martin Baulig <martin@ximian.com>
25685 * reflection.c (mono_type_get_object): Also use the cache for
25687 (mono_reflection_bind_generic_parameters): Always compute
25690 2004-02-20 Martin Baulig <martin@ximian.com>
25692 * class.h (MonoGenericMethod): Removed `klass'.
25694 * class.c (mono_class_inflate_generic_method): Added `MonoClass
25697 2004-02-20 Martin Baulig <martin@ximian.com>
25699 * reflection.c (method_encode_methodspec): Actually use the
25700 uninflated signature for the memberref.
25702 2004-02-20 Martin Baulig <martin@ximian.com>
25704 * class.h (MonoGenericMethod): Removed `declaring'.
25706 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
25707 is NULL, compute it here.
25709 2004-02-20 Martin Baulig <martin@ximian.com>
25711 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
25713 * metadata.c (mono_metadata_generic_inst_hash): New method.
25714 (mono_metadata_generic_inst_equal): New method.
25716 * reflection.c (mono_reflection_bind_generic_parameters): Use the
25717 `klass->image->generic_inst_cache' cache to avoid creating
25718 duplicate MonoGenericInst's.
25720 * class.c (mono_class_inflate_generic_type): Use the cache.
25722 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
25724 * object.c: fixed gc descriptor calculation for embedded valuetypes.
25726 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25728 * icall.c: added Socket.WSAIoctl icall.
25730 * socket-io.[ch]: implemented
25731 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
25733 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
25735 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
25737 2004-02-18 Urs C Muff <umuff@quark.com>
25739 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
25740 this work on PPC and other big-endian architectures.
25742 * debug-mono-symfile.h: Prepended the names of all the `guint32'
25743 fields with an underscore to make sure they're only accessed by
25744 the read32() macro.
25746 2004-02-18 Martin Baulig <martin@ximian.com>
25748 * icall.c: Put the klass->refclass changes back for methods and
25749 fields, but not for properties and events. We're currently not
25750 distinguishing between DeclaringType and ReflectedType for
25751 properties and events, that's what caused the regressions.
25753 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25756 (mono_async_result_new): the handle can be NULL.
25758 * threadpool.c: Use an event instead of a semaphore, don't initialize
25759 it until needed. This saves quite a few semaphores from being created
25760 when using the threadpool.
25762 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
25764 * object.c (mono_string_is_interned_lookup): Fix interning of long
25765 strings. Fixes #54473.
25767 * domain.c (ldstr_equal): Optimize if the two strings are equal.
25769 * icall.c: Revert the klass->refclass changes since they introduce
25770 regressions (bug #54518).
25772 2004-02-18 Martin Baulig <martin@ximian.com>
25774 * class.c (mono_class_init): If we're a generic instance and don't
25775 come from a TypeBuilder, inflate our members here.
25776 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
25777 (mono_class_create_generic): New public method.
25778 (mono_class_initialize_generic): Removed.
25779 (get_instantiation_name): Renamed to
25780 _mono_class_get_instantiation_name() and made it public.
25782 2004-02-18 Martin Baulig <martin@ximian.com>
25784 * class.c (mono_class_inflate_generic_type): Clear the new
25785 instance's `nginst->klass' when inflating a generic instance.
25786 (mono_class_is_subclass_of): Added (basic) support for generic
25789 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
25791 * appdomain.h, domain.c: use a MonoCodeManager instead of a
25792 MonoMempool to hold compiled native code.
25794 2004-02-17 Martin Baulig <martin@ximian.com>
25796 * class.h (MonoDynamicGenericInst): Added `count_properties' and
25799 * reflection.c (mono_reflection_generic_inst_initialize): Added
25800 `MonoArray *properties' argument.
25802 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
25804 2004-02-17 Martin Baulig <martin@ximian.com>
25806 * icall.c (ves_icall_Type_GetFields): Renamed to
25807 ves_icall_Type_GetFields_internal() and added a
25808 `MonoReflectionType *rtype' argument; pass it to
25809 mono_field_get_object() to set the field's "reflected" type.
25810 (ves_icall_Type_GetConstructors): Likewise.
25811 (ves_icall_Type_GetEvents): Likewise.
25812 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
25813 argument; pass it to mono_method_get_object() to set the method's
25816 2004-02-17 Martin Baulig <martin@ximian.com>
25818 * class.h (MonoDynamicGenericInst): New type.
25819 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
25821 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
25822 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
25823 (ves_icall_MonoGenericInst_GetFields): New interncall.
25825 * class.c (mono_class_from_generic): Don't call
25826 mono_class_initialize_generic() if this is a dynamic instance;
25827 ie. it's being created from a TypeBuilder.
25828 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
25829 `class->byval_arg.type'.
25831 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
25832 to `inflate_method' and made static.
25833 (mono_reflection_inflate_field): Removed.
25834 (mono_reflection_generic_inst_initialize): New public method.
25836 * reflection.h (MonoReflectionGenericInst): Removed `methods',
25837 `ctors' and `fields'; added `initialized'.
25839 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
25841 * debug-helpers.c (mono_method_full_name): Fix output for empty
25844 2004-02-12 Martin Baulig <martin@ximian.com>
25846 * class.h (MonoClassField): Added `MonoType *generic_type'.
25848 * reflection.c (mono_image_get_fieldref_token): Added support for
25849 instantiated generic types.
25850 (field_encode_inflated_field): Removed.
25851 (mono_image_get_inflated_field_token): Removed.
25852 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
25854 * reflection.h (MonoReflectionInflatedField): Removed.
25856 2004-02-12 Martin Baulig <martin@ximian.com>
25858 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
25859 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
25861 * reflection.c (mono_image_get_methodspec_token): Take a
25862 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
25863 (mono_image_create_token): Check whether we have a
25864 `method->signature->gen_method' and call
25865 mono_image_get_methodspec_token() if appropriate.
25866 (inflated_method_get_object): Removed.
25867 (mono_reflection_bind_generic_method_parameters): Return a
25868 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
25869 (mono_reflection_inflate_method_or_ctor): Likewise.
25871 * reflection.h (MonoReflectionInflatedMethod): Removed.
25873 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
25875 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
25876 for custom valuetype marshalling.
25878 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
25880 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25882 * icall.c: fixed WSAGetLastError_internal name.
25884 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
25886 * threads.c (mono_thread_attach): Allow this to be called multiple
25887 times for a thread.
25889 * threads.c (build_wait_tids): Do not wait for ourselves.
25891 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
25892 appdomain list is empty.
25894 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
25895 memory returned by mono_string_builder_to_utf16, since it points into
25896 managed memory. Thanks to Bernie Solomon for noticing this.
25898 * icall.c: Add AppDomainSetup icalls.
25900 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
25902 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
25905 * reflection.c (reflection_methodbuilder_to_mono_method): Save
25906 custom attributes to the method_aux struct. Also fix array indexes etc.
25908 * loader.c (mono_method_get_param_names): Make dynamic case work again.
25910 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
25912 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
25913 (both static and runtime) and reduce startup time.
25915 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
25917 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
25918 AsAny marshalling conversion instead of crashing.
25920 * marshal.c: Fix warnings.
25922 2004-02-09 Martin Baulig <martin@ximian.com>
25924 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
25926 * reflection.h (MonoReflectionInflatedMethod): Removed the
25927 `declaring' field, it's now in the unmanaged MonoGenericMethod.
25929 * reflection.c (method_encode_methodspec): Removed the `method'
25930 argument; we get it from `gmethod->declaring'.
25931 (inflated_method_get_object): Removed the `declaring' argument.
25933 2004-02-09 Martin Baulig <martin@ximian.com>
25935 * class.h (MonoGenericMethod): New type.
25936 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
25939 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
25940 a `MonoGenericMethod *gen_method' one.
25942 * class.c (mono_class_inflate_generic_type): Take an additional
25943 `MonoGenericMethod * argument. This is only non-NULL if we're
25944 inflating types for a generic method.
25945 (mono_class_inflate_generic_signature): Renamed to
25946 inflate_generic_signature() and made static; take a
25947 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25948 (inflate_generic_header): Take a `MonoGenericMethod *' argument
25949 instead of a `MonoGenericInst *' one.
25950 (mono_class_inflate_generic_method): Likewise.
25952 * reflection.c (encode_generic_method_sig): Take a
25953 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25954 (method_encode_methodspec): Likewise.
25955 (inflated_method_get_object): Likewise.
25957 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
25958 field with a `MonoGenericMethod *gmethod' one.
25960 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
25962 * class.h (mono_class_has_parent): add parens to expansion
25965 2004-02-08 Martin Baulig <martin@ximian.com>
25967 * image.h (MonoImage): Removed `generics_cache'.
25969 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
25970 instead of a `MonoType *' argument; removed the `inflate_methods'
25971 argument. Don't inflate methods here.
25973 * loader.c (find_method): If it's a generic instance, call
25974 mono_class_init() on the `sclass->generic_inst->generic_type'.
25976 * metadata.c (mono_type_size): Make this work on uninitialized
25977 generic instances; call it on the `ginst->generic_type's class.
25979 * reflection.c (mono_reflection_bind_generic_parameters): Call
25980 mono_class_from_generic() to create the `ginst->klass'.
25982 2004-02-08 Martin Baulig <martin@ximian.com>
25984 * class.h (MonoClass): Changed type of `generic_inst' from
25985 `MonoType *' to `MonoGenericInst *'.
25987 2004-02-08 Martin Baulig <martin@ximian.com>
25989 * icall.c (ves_icall_Type_BindGenericParameters): Just call
25990 mono_type_get_object(), this is now creating a `MonoGenericInst'
25991 for MONO_TYPE_GENERICINST.
25992 (ves_icall_MonoGenericInst_GetParentType): Likewise.
25993 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25995 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
25996 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
25997 (inflated_method_get_object): Added `MonoClass *refclass' argument.
25998 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
25999 and reflected type.
26001 * reflection.h (MonoReflectionInflatedMethod): Removed
26002 `declaring_type' and `reflected_type'.
26004 2004-02-08 Martin Baulig <martin@ximian.com>
26006 * class.h (MonoGenericInst): Added `MonoType *parent' and
26007 `MonoType **ifaces'.
26009 * reflection.h (MonoReflectionGenericInst): Removed `klass',
26010 `parent' and `interfaces'.
26012 * reflection.c (mono_reflection_bind_generic_parameters): Take a
26013 `MonoType *' argument and return a `MonoType *'.
26016 (ves_icall_MonoGenericInst_GetParentType): New interncall.
26017 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
26019 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
26021 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
26022 valuetype marshalling.
26024 2004-02-06 Martin Baulig <martin@ximian.com>
26027 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
26028 (my_mono_class_from_generic_parameter): Likewise.
26030 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
26032 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
26033 contents of the symbol files lazily.
26035 * object.h (MonoThread): Add 'name' and 'name_len' fields.
26037 * threads.h threads.c icall.c: New icalls for getting and setting the
26040 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
26042 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
26043 Raise an exception when the domain is not found.
26045 2004-02-03 Martin Baulig <martin@ximian.com>
26047 * reflection.c (mono_image_get_methodspec_token): Use the
26048 uninflated signature; fixes gen-33.
26050 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
26052 * gc.c threads.c: Make the finalizer thread a normal managed thread so
26053 the finalizer code can use thread functionality.
26055 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
26056 the finalizer thread.
26058 * threads.c: Make some functions more robust.
26060 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
26062 * metadata.h: Add new marshalling conventions.
26064 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
26065 stringbuilder marshalling. Fixes #53700.
26067 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
26069 * reflection.c (mono_image_get_type_info): Save declarative security
26072 * reflection.c (mono_image_get_field_info): Handle uninitialized
26073 unmanaged fields as well.
26075 * appdomain.c: Bump corlib version.
26077 2004-02-01 Martin Baulig <martin@ximian.com>
26079 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
26080 method type arguments.
26082 2004-01-30 Duncan Mak <duncan@ximian.com>
26084 * marshal.h: Add prototype for
26085 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
26087 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
26090 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
26092 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
26093 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
26095 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
26097 * marshal.c (mono_marshal_get_native_wrapper): Add support for
26098 custom marshalling of valuetypes.
26100 * marshal.c: Fix some warnings.
26102 2004-01-29 Martin Baulig <martin@ximian.com>
26104 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
26105 for generic method parameters.
26107 * reflection.c (method_encode_methodspec): Write the uninflated
26108 signature into the methodspec table.
26109 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
26110 is always the uninflated method.
26111 (reflection_methodbuilder_to_mono_method): Copy the generic
26112 parameters from the MethodBuilder into `header->gen_params'.
26114 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
26116 * class.c (mono_class_from_generic_parameter): Fix warning.
26118 2004-01-27 Martin Baulig <martin@ximian.com>
26120 * class.c (mono_class_from_generic_parameter): Don't create
26121 `klass->methods' here.
26123 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
26125 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
26126 extension since it does not work with libraries named lib<FOO>.dll.so.
26128 2004-01-25 Martin Baulig <martin@ximian.com>
26130 * class.c (mono_class_inflate_generic_type): Added support for
26131 MONO_TYPE_GENERICINST.
26133 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
26134 inflate methods on open constructed types.
26136 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26138 * object.c: fire ProcessExit event in the root AppDomain after running
26139 Main. Fixes bug #53299.
26141 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
26143 * socket-io.c: include the new socket-wrappers.h header.
26144 Use the wrappers instead of the unix socket functions to make the code
26147 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
26149 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
26151 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
26154 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
26156 * reflection.c (mono_image_create_pefile): Handle the case when the
26157 entry point is not a MethodBuilder.
26159 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
26160 field to ReflectionMethod since it is not allways a builder.
26162 * reflection.c (type_get_fully_qualified_name): New helper function to
26163 return the fully qualified name of a type.
26165 * reflection.c (encode_marshal_blob): Always emit the fully qualified
26166 type name for custom marshallers.
26168 * reflection.c (mono_marshal_spec_from_builder): Ditto.
26170 * class.c (mono_class_setup_vtable): If a parent class already
26171 implements an interface, use the implementing methods from that class.
26174 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26176 * threadpool.c: just return instead of ExitThread to allow for thread
26179 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
26181 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
26182 when closing resource modules.
26184 * reflection.c (mono_image_create_pefile): Handle the case when the
26185 entry point is not a MethodBuilder.
26187 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
26188 field to ReflectionMethod since it is not allways a builder.
26190 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
26192 * marshal.c (mono_marshal_get_managed_wrapper):
26193 mono_marshal_alloc takes native int so CONV_I
26194 the arg for 64bits.
26196 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
26198 * reflection.c (fixup_cattrs): New function to fixup the methoddef
26199 tokens in the cattr table. Fixes #53108.
26201 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26203 * loader.c: don't trim ".dll" before looking up in the config file.
26204 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
26206 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
26208 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
26209 Return the module which contains the resource as well.
26210 (ves_icall_System_Reflection_Module_Close): New icall.
26212 * appdomain.c: Bump corlib version number.
26214 * image.c (mono_image_addref): New public function.
26216 * assembly.c: Call mono_image_addref.
26218 * reflection.c (mono_module_get_object): Increase reference count of
26221 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
26224 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
26225 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
26226 proper exceptions on DllImport problems.
26228 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
26230 * class.c, metadata.c: eliminate CSIZE macro.
26232 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
26234 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
26235 * object.h: Added async_callback field in MonoAsyncResult.
26236 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
26237 * verify.c: Added async_callback in MonoAsyncResult layout.
26239 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
26241 * reflection.c (mono_reflection_get_custom_attrs): Add support
26244 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
26246 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
26248 (mono_marshal_method_from_wrapper): Add null pointer check.
26250 2004-01-16 Martin Baulig <martin@ximian.com>
26252 * debug-mono-symfile.h: Set version number to 36 and reflect
26253 latest symbol writer changes.
26255 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
26257 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
26258 multi-dimensional arrays.
26259 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
26260 (mono_class_from_mono_type): Use bounded_array_class_get.
26262 * class.c (mono_bounded_array_class_get): New function which takes
26263 a 'bounded' bool argument to distinguish vectors from one dimensional
26266 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
26267 bounded_array_class_get if the array has bounds.
26269 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26270 Search modules loaded using AssemblyBuilder:AddModule as well.
26272 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26274 * appdomain.c: increased corlib version.
26275 * filewatcher.c: removed g_print.
26277 (get_property_info): only allocate what is actually requested.
26278 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
26280 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26282 * Makefile.am: added filewatcher.[ch]
26283 * filewatcher.[ch]: FileSystemWatcher runtime support.
26284 * icall.c: added new FSW icalls.
26286 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
26288 * string-icalls.c: fix stringbuilder regression as suggested by
26289 Iain McCoy <iain@mccoy.id.au>.
26291 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
26293 * process.c (process_read_stringtable_block): Recognize '007f' as
26294 a language neutral stringtable block.
26296 2004-01-12 Patrik Torstensson
26298 * object.h (MonoStringBuilder) : Changed layout to support our
26299 new stringbuilder class.
26300 * marshal.c: Change marshalling to support the new layout of
26302 * appdomain.c: increased version number because new layout of
26305 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
26307 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
26308 assembly name as an string instead of an AssemblyName, since it is
26309 easier to extract info from it.
26311 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
26312 the culture subdirectories too. Fixes #52231.
26314 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26316 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
26317 It takes 2 new parameters with an optional name for the method to look
26318 for and case ignoring info.
26320 * threadpool.c: removed unused variable.
26322 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26324 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
26325 It takes 2 new parameters with an optional name for the property to look
26326 for and case ignoring info.
26329 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
26331 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
26334 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26337 * assembly.c: escape the uri before passing it to g_filename_from_uri.
26340 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
26342 * reflection.c: Add support for more than one unmanaged resource.
26344 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
26345 in field->def_value, as done in all other cases.
26347 * reflection.c (mono_reflection_get_custom_attrs): Add support for
26350 * reflection.c (mono_reflection_create_runtime_class): Remove
26351 errorneous assignment to klass->element_class, since it is already
26352 done in mono_reflection_setup_internal_class.
26354 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26356 * gc.c: added missing LeaveCriticalSection.
26357 * icall.c: indented a couple of lines.
26358 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
26359 if we call EndInvoke inside a callback. Fixes bug #52601.
26361 2004-01-07 Martin Baulig <martin@ximian.com>
26363 * mono-debug-debugger.h
26364 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
26366 2004-01-06 Miguel de Icaza <miguel@ximian.com>
26368 * appdomain.c: Use messages in NotImplementedException.
26370 * exception.c (mono_get_exception_not_implemented): Now this takes
26371 a message argument.
26373 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
26374 exception instead of g_asserting an aborting when something is not
26377 Add some inline docs.
26379 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
26381 * reflection.h: Update after changes to object layout.
26383 * reflection.c: Implement saving of unmanaged aka win32 resources.
26385 * appdomain.c: Bump version number.
26387 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
26388 Handle missing domains gracefully.
26390 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
26392 * file-io.c : On Windows, there are much more invalid_path_chars.
26394 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
26396 * class.h, object.c: prepare for GetType () speedup.
26398 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
26400 * profiler.c: workaround for --profile null reference exception on
26401 cygwin. Patch by Patrik Torstensson.
26403 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
26405 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
26406 make work for unaligned access.
26408 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
26410 * class.c: small cleanup (class->fields [i] -> field).
26411 * image.c: check address of metadata is valid.
26413 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
26415 * assembly.h assembly.c (mono_assembly_loaded): New public function to
26416 search the list of loaded assemblies.
26418 * reflection.c (mono_reflection_type_from_name): Use
26419 mono_assembly_loaded instead of mono_image_loaded.
26421 * reflection.c: Fix warnings.
26423 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
26425 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
26426 is dynamic. This is needed since an assembly can contain both dynamic and
26427 non-dynamic images.
26429 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
26432 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
26434 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
26435 to store modules loaded using AddModule.
26437 * reflection.c (mono_image_fill_file_table): Generalize this so it works
26440 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
26442 * reflection.c (mono_image_fill_export_table_from_module): New function to
26443 fill out the EXPORTEDTYPES table from a module.
26445 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
26446 into a separate function. Also handle loaded non-dynamic modules.
26448 * reflection.c (mono_image_basic_init): Fix memory allocation.
26450 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26452 * assembly.c (mono_assembly_load_references): Make this public.
26454 2003-12-19 Martin Baulig <martin@ximian.com>
26456 * class.c (mono_class_initialize_generic): Made this static, take
26457 a `MonoGenericInst *' instead of a `MonoClass *'.
26458 (mono_class_from_generic): Call mono_class_initialize_generic()
26459 unless we're already initialized or being called from
26460 do_mono_metadata_parse_generic_inst().
26462 * class.h (MonoGenericInst): Added `initialized' and
26463 `init_pending' flags.
26465 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
26466 `mono_class_init (gklass)' or mono_class_initialize_generic()
26467 here; set `generic_inst->init_pending' while parsing the
26470 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
26472 * locales.c: include string.h for memxxx prototypes
26474 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
26476 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
26477 constructor when accessing literal fields.
26479 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
26481 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26483 * reflection.c (assembly_add_resource_manifest): New function to fill
26484 the MANIFESTRESOURCE table.
26486 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
26488 * reflection.h: Update to changes in class layout.
26490 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
26491 Reenable call to mono_runtime_is_shutting_down ().
26493 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
26494 determine if the runtime is shutting down.
26496 2003-12-16 Jackson Harper <jackson@ximian.com>
26498 * icall.c: comment out call to mono_runtime_is_shutting_down to
26501 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
26503 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
26504 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
26506 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
26508 * reflection.c: move definition of swap_with_size
26509 to before its first call
26511 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
26513 * appdomain.c (mono_runtime_is_shutting_down): New public function.
26515 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
26518 * object.c: Fix warnings.
26520 * icall.c (ves_icall_Type_Get...): Only consider inherited static
26521 members if FlattenHierarchy is set.
26523 * reflection.c (mono_image_add_decl_security): New function to emit
26524 declarative security.
26526 * reflection.h reflection.c: Add support for declarative security.
26528 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
26530 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
26532 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
26534 * appdomain.c verify.c: Moved corlib version checking into its own
26535 function in appdomain.c since it needs to create vtables etc.
26537 2003-12-13 Patrik Torstensson <p@rxc.se>
26539 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
26540 instead of unwrapped server.
26542 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
26544 * verify.c (check_corlib): Fix field index.
26546 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
26548 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
26551 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
26553 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
26554 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
26555 cope with sizeof(size_t) != sizeof(guint32).
26557 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26559 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
26560 in case of failure.
26562 2003-12-10 Mark Crichton <crichton@gimp.org>
26564 * icall.c: removed the GetNonZeroBytes. We now handle this case
26567 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
26569 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
26571 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
26574 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
26576 * verify.c (check_corlib): Handle the case when the version field is
26577 initialized by a static constructor.
26579 2003-12-08 Patrik Torstensson <p@rxc.se>
26581 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
26583 2003-12-08 Martin Baulig <martin@ximian.com>
26585 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
26586 a MonoReflectionGenericParameter, also take the parameter index
26587 and name as arguments.
26588 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
26589 (ves_icall_MonoGenericParam_initialize): New interncall.
26590 (ves_icall_Type_make_byref_type): New interncall.
26592 * reflection.h (MonoReflectionGenericParam): Derive from
26593 MonoReflectionType, not just from MonoObject. Added `refobj' and
26596 * reflection.c (mono_reflection_define_generic_parameter): Create
26597 and return a new MonoReflectionGenericParam; don't initialize the
26599 (mono_reflection_initialize_generic_parameter): New public method;
26600 initializes the constraints and creates the `param->pklass'.
26602 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
26604 * reflection.h reflection.c: Use the new fields 'num_types',
26605 'num_fields' and 'num_methods' to track the number of types etc.
26607 * verify.c (check_corlib): Check corlib version number.
26609 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
26611 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
26612 function works on all methods.
26614 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
26616 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
26617 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
26618 the custom_type_info flag of the transparent proxy.
26619 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
26620 objects that supports IRemotingTypeInfo.
26621 * object.h: Added custom_type_info field in transparent proxy.
26623 2003-12-06 Martin Baulig <martin@ximian.com>
26625 * class.c (mono_class_create_from_generic): Removed.
26626 (mono_class_from_generic): Check `ginst->klass' before doing
26627 anything else. This is important to fully support "recursive"
26630 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
26631 empty `generic_inst->klass' before doing anything else.
26633 2003-12-06 Dick Porter <dick@ximian.com>
26638 * locales.c: Use C structs to access class fields. Don't do a
26639 conversion between MonoString and UChar because both are
26640 platform-endian UTF-16. Compare now takes startindex and count
26641 parameters. Add a char overload for IndexOf. Speed up the
26642 invariant string IndexOf.
26644 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
26646 * Makefile.am (monosn_LDADD): Fix parallel build.
26648 2003-12-04 Martin Baulig <martin@ximian.com>
26651 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26652 (ves_icall_Type_make_array_type): New interncall.
26654 2003-12-04 Martin Baulig <martin@ximian.com>
26656 * locales.c: also change it in the !HAVE_ICU case.
26658 2003-12-04 Dick Porter <dick@ximian.com>
26661 * locales.c: construct_compareinfo is now in CompareInfo, not
26664 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
26666 * image.c (mono_image_load_file_for_image): Cache loaded images in the
26667 image->files array.
26669 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
26672 * assembly.c (mono_assembly_load_references): Only load references
26675 * class.c (mono_class_from_name): Avoid linear search of the
26676 EXPORTEDTYPE table.
26678 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
26680 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
26682 * image.h (MonoImage): Add 'field_cache' field.
26684 * loader.c (mono_field_from_token): Cache field lookups.
26686 * reflection.c (mono_module_get_object): Fix name property.
26688 * icall.c (ves_icall_get_enum_info): Update after changes to
26689 mono_metadata_get_constant_index ().
26691 * icall.c: Get rid of get_type_info icall, use a separate icall for
26692 each type property to avoid needless memory allocations. Fixes #51514.
26694 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
26695 to avoid needless binary searches.
26697 * class.c (class_compute_field_layout): Move the initialization of
26698 field->def_value to mono_class_vtable ().
26700 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
26703 * object.c (mono_object_allocate): Make it inline.
26705 * object.c (mono_object_allocate_spec): Make it inline.
26707 2003-12-02 Dick Porter <dick@ximian.com>
26709 * locales.c (create_NumberFormat): NumberFormatInfo construction.
26710 Patch by Mohammad DAMT (mdamt@cdl2000.com).
26712 2003-12-01 Dick Porter <dick@ximian.com>
26714 * threads.c: Fix signature and call in CreateMutex and
26717 2003-12-01 Dick Porter <dick@ximian.com>
26720 * locales.c: Implement string compares and searching
26722 * object.h: Add extra Thread field
26724 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
26726 * reflection.c (fixup_method): Add support for MonoCMethod.
26728 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
26730 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
26732 * reflection.c (assembly_name_to_aname): Allow extra characters in
26733 assembly names. Fixes #51468.
26735 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
26737 * exception.c (mono_exception_from_name_domain): New helper function.
26739 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
26740 exception object in the correct domain.
26742 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
26743 formatting + make a copy a the input data.
26745 * loader.c (mono_get_method_from_token): Methods which contain
26746 native code do not have entries in the ImplMap.
26748 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
26749 Thanks to Gonzalo for spotting this.
26751 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
26752 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
26754 * assembly.h (mono_assembly_load_from): Split the second part of
26755 assembly loading into a new public function.
26757 * exception.h (mono_get_exception_bad_image_format): New function.
26759 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
26761 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26762 Enumerate all modules inside a dynamic assembly. Fixes #51293.
26764 * icall.c: Add new icall for creating dynamic methods.
26766 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
26768 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
26770 * reflection.c (mono_reflection_create_dynamic_method): New icall to
26771 create a dynamic method.
26773 * reflection.c (resolve_object): New helper function.
26775 * reflection.c: Generalize ReflectionMethodBuilder and the functions
26776 which manipulate it so they can also work on dynamic methods.
26778 * reflection.c (reflection_method_builder_to_mono_method): Avoid
26779 creating the MonoReflectionMethodAux structure if it is not needed.
26781 * reflection.h verify.c: Update after changes to object layout.
26783 * reflection.c (method_builder_encode_signature): Fix compilation on
26786 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
26788 * appdomain.h: Added support for context static fields. Added static_data
26789 field to MonoAppContext and renamed thread_static_fields to a more
26790 generic special_static_fields in MonoAppDomain, since it can now contain
26791 context static fields.
26792 * domain.c: Updated hashtable name.
26793 * object.c: Replaced field_is_thread_static() for a more generic
26794 field_is_special_static() which also checks for context static attribute.
26795 In mono_class_vtable(), added support for static context fields.
26796 * threads.c: Changed methods that manage thread static fields to more
26797 generic methods so they can be reused both for thread and context static
26799 * threads.h: Declared some new methods.
26801 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
26803 * reflection.h: Update after changes to the managed types.
26805 * reflection.c (encode_custom_modifiers): New helper function.
26807 * reflection.c (method_encode_signature): Emit custom modifiers.
26809 * reflection.c (field_encode_signature): Emit custom modifiers.
26811 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
26813 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
26815 * icall.c (ves_icall_System_ValueType_Equals): New optimized
26818 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
26821 * object.c (mono_field_get_value_object): New function.
26823 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
26826 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
26828 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
26829 return a preallocated out-of-memory exception instance.
26831 * object.c (out_of_memory): Use the new function.
26833 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
26834 flag is before the custom modifiers. Fixes #49802.
26836 2003-11-16 Martin Baulig <martin@ximian.com>
26838 * class.c (mono_class_is_open_constructed_type): Implemented the
26839 MONO_TYPE_GENERICINST case.
26841 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
26843 * assembly.c (mono_assembly_fill_assembly_name): New function to
26844 fill out the MonoAssemblyName structure.
26845 (mono_assembly_open): Use the new function.
26847 * icall.c (fill_reflection_assembly_name): New helper function.
26849 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
26852 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
26854 2003-11-15 Martin Baulig <martin@ximian.com>
26856 * class.c (mono_class_is_open_constructed_type): New public
26857 function; checks whether a type is an open constructed type,
26858 ie. whether it still contains type parameters.
26859 (mono_class_inflate_generic_type): If we're a type parameter and
26860 the inflated type is also a MONO_TYPE_(M)VAR, return the original
26863 * class.h (MonoGenericInst): Added `guint32 is_open'.
26865 * loader.c (method_from_methodspec): Check whether we're an open
26866 or closed constructed type and set `ginst->is_open'.
26868 * reflection.c (mono_reflection_bind_generic_parameters): Check
26869 whether we're an open or closed constructed type and set
26871 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
26872 from open constructed types.
26874 2003-11-15 Martin Baulig <martin@ximian.com>
26876 * reflection.c (mono_reflection_bind_generic_parameters): If we're
26877 a generic instance (instead of a generic type declaration) with
26878 unbound generic parameters, bind them to our actual types.
26880 2003-11-14 Martin Baulig <martin@ximian.com>
26882 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
26884 * reflection.c (mono_reflection_bind_generic_parameters): If we're
26885 an interface type, populate `res->interfaces' with instantiated
26886 versions of all the interfaces we inherit.
26888 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
26890 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
26891 when MONO_PATH is set but doesn't contain the install dir.
26893 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26896 (ves_icall_Type_GetInterfaces): don't return an interface twice when
26897 it's also implemented in base classes. Fixes bug #50927.
26899 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
26901 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
26902 if this method is called from a finalizer. Fixes #50913.
26904 2003-11-12 Miguel de Icaza <miguel@ximian.com>
26906 * threads.c: Implement VolatileRead/VolatileWrite
26908 * icall.c: Add new icalls for VolatileRead/VolatileWrite
26910 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26912 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
26913 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
26916 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
26917 from Peter Ross (pro@missioncriticalit.com).
26919 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
26921 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
26923 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26925 * assembly.c (mono_assembly_load_references): Disable check because it
26926 triggers on older corlibs which lots of people have.
26928 2003-11-12 Jackson Harper <jackson@ximian.com>
26930 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
26931 load corlib.dll if mscorlib.dll is not found.
26932 * assembly.h: Remove corlib name define.
26935 * image.c: Change corlib name to mscorlib.
26937 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26939 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
26941 2003-11-11 Miguel de Icaza <miguel@ximian.com>
26943 * appdomain.h: Added loader_optimization here to sync with the C#
26944 code, and add disallow_binding_redirects field.
26946 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26948 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
26950 * reflection.c (mono_image_build_metadata): Fix crash on modules
26953 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
26955 * icall.c (ves_icall_get_method_info): Return callingConvention as
26958 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
26959 namespaces from the EXPORTEDTYPE table as well.
26961 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
26962 from all modules inside the assembly.
26964 2003-11-11 Martin Baulig <martin@ximian.com>
26966 * reflection.c (mono_reflection_bind_generic_parameters): Make
26967 this work for interfaces.
26969 2003-11-11 Martin Baulig <martin@ximian.com>
26971 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
26973 2003-11-11 Martin Baulig <martin@ximian.com>
26975 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
26976 "MonoInflatedMethod" and "MonoInflatedCtor".
26978 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26980 * reflection.c (resolution_scope_from_image): Use the assembly table
26981 from the manifest module, since other modules don't have it.
26983 * debug-helpers.c (mono_type_full_name): New helper function.
26985 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
26987 * image.c (mono_image_load_file_for_image): New public function which
26988 is a replacement for the load_file_for_image in class.c.
26990 * assembly.c (mono_assembly_load_module): A wrapper for the function
26991 above which does assembly association and reference loading too.
26993 * class.c (mono_class_from_name): Call mono_assembly_load_module.
26995 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26997 * appdomain.c: not all of the attributes for the full assembly name
26998 are required and the order doesn't matter. Fixes bug #50787.
27000 2003-11-10 Dick Porter <dick@ximian.com>
27002 * locales.c: Use platform-endian UTF16
27004 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
27006 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
27008 2003-11-10 Martin Baulig <martin@ximian.com>
27011 (mono_metadata_load_generic_params): Make this actually work.
27013 * reflection.c (mono_reflection_bind_generic_parameters): If our
27014 parent is a generic instance, pass all the `types' to it, no
27015 matter whether it has the same number of type parameters or not.
27017 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
27019 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
27021 * assembly.c (mono_assembly_load_references): Move the image<->assembly
27022 assignment code to this function so it gets called recursively for all
27025 * image.c (load_modules): Remove the assembly assignment since it is
27026 now done by mono_assembly_load_references.
27028 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
27029 Add 'module' argument.
27030 (mono_module_get_types): New helper function.
27031 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
27033 2003-11-08 Martin Baulig <martin@ximian.com>
27035 * class.c (mono_class_inflate_generic_method): Interface method
27036 don't have a header.
27038 * reflection.c (mono_image_get_methodspec_token): Take an
27039 additional `MonoGenericInst *' argument instead of reading it from
27040 the header; this is necessary to support interfaces.
27041 (mono_image_create_token): Pass the `MonoGenericInst *' from the
27042 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
27043 (inflated_method_get_object): Take an additional `MonoGenericInst *'
27046 * reflection.h (MonoReflectionInflatedMethod): Added
27047 `MonoGenericInst *ginst'.
27049 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
27051 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
27053 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
27055 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
27057 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
27060 (reflection_methodbuilder_from_method_builder):
27061 (reflection_methodbuilder_from_ctor_builder): New helper functions to
27062 initialize a ReflectionMethodBuilder structure.
27063 (mono_image_get_methodbuilder_token):
27064 (mono_image_get_ctorbuilder_token): New functions to emit memberref
27065 tokens which point to types in another module inside the same assembly.
27067 * reflection.c: Use the new helper functions.
27069 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
27071 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
27072 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
27074 * reflection.c (resolution_scope_from_image): Emit a moduleref if
27077 * reflection.c (mono_image_build_metadata): Emit metadata only for the
27078 current module. Emit the manifest only for the main module.
27080 * reflection.c (mono_image_create_token): Add assertion when a
27081 memberref needs to be created.
27083 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
27085 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
27086 larger buffer for the custom attribute blob. Fixes #50637.
27088 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27090 * threadpool.c: notify listener on async processing handles after
27091 invoking the async callback. Thanks to Zoltan.
27093 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
27095 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
27096 avoid code duplication.
27098 * reflection.h (MonoDynamicImage): New type which is currently unused,
27099 but will be used through the ref.emit code in place of
27100 MonoDynamicAssembly.
27102 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
27105 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
27106 a MonoDynamicImage instead of just a MonoImage.
27108 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
27109 icalls to ModuleBuilder but keep their semantics, so they will work
27110 with moduleb->assemblyb. This will change later.
27112 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
27114 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
27117 * reflection.c (mono_image_build_metadata): Avoid creation of a default
27118 main module, since it is now done by the managed code.
27120 2003-11-03 Martin Baulig <martin@ximian.com>
27122 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
27123 `ginst->klass' here.
27124 (method_encode_methodspec): Don't use the `ginst->generic_method's
27125 klass if it's a generic instance, use `ginst->klass' in this case.
27127 2003-11-03 Martin Baulig <martin@ximian.com>
27129 * reflection.c (mono_image_get_generic_method_param_info):
27130 Removed, use mono_image_get_generic_param_info() instead.
27131 (mono_image_get_type_info): Write the GenericParam table before
27132 the Method table. This is neccessary because in the GenericParam
27133 table, type parameters of the class (ie. '!0' etc.) must come
27134 before the ones from its generic methods (ie. '!!0' etc).
27136 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
27138 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
27140 2003-11-02 Martin Baulig <martin@ximian.com>
27142 * reflection.c (create_generic_typespec): Take a
27143 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
27144 the generic parameters from it.
27146 2003-11-02 Martin Baulig <martin@ximian.com>
27148 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
27149 instead of a `MonoClassField *' since we just need the type.
27150 (create_generic_typespec): New static function. Creates a
27151 TypeSpec token for a generic type declaration.
27152 (mono_image_get_generic_field_token): New static function.
27153 (mono_image_create_token): If we're a FieldBuilder in a generic
27154 type declaration, call mono_image_get_generic_field_token() to get
27157 2003-11-02 Martin Baulig <martin@ximian.com>
27160 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
27161 `MonoReflectionGenericInst *declaring_type' and
27162 `MonoReflectionGenericInst *reflected_type' fields.
27164 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
27165 `MonoReflectionGenericInst *declaring_type' and a
27166 `MonoReflectionGenericInst *reflected_type' argument instead of a
27167 single `MonoReflectionGenericInst *type' one. Set
27168 `res->declaring_type' and `res->reflected_type' from them.
27169 (mono_reflection_inflate_field): Likewise.
27171 2003-11-02 Martin Baulig <martin@ximian.com>
27173 * class.c (mono_class_setup_vtable): Don't store generic methods
27176 2003-11-02 Martin Baulig <martin@ximian.com>
27178 * reflection.h (MonoReflectionGenericInst): Added
27179 `MonoReflectionType *declaring_type'.
27181 * reflection.c (mono_reflection_bind_generic_parameters): Use
27182 `if (tb->parent)' instead of `klass->parent'.
27184 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
27186 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
27187 with an empty ASSEMBLY table.
27189 * reflection.c (mono_image_build_metadata): Avoid using the same loop
27190 variable in the inner and outer loops.
27192 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
27194 * metadata.h (mono_metadata_make_token): Put parentheses around macro
27197 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
27199 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
27200 icalls. Instead, do everything in managed code. This is needed since
27201 it is hard to restore the original domain etc. in unmanaged code in the
27202 presence of undeniable exceptions.
27204 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
27205 New icalls to push and pop appdomain refs.
27207 2003-10-31 Martin Baulig <martin@ximian.com>
27209 * class.c (inflate_generic_type): Renamed to
27210 mono_class_inflate_generic_type() and made it public.
27212 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
27215 * loader.c (mono_field_from_memberref): Also set the retklass for
27218 * fielder.c (mono_image_get_inflated_field_token): New static
27219 method; creates a metadata token for an inflated field.
27220 (mono_image_create_token, fixup_method): Added support for
27221 "MonoInflatedField".
27222 (fieldbuilder_to_mono_class_field): New static function.
27223 (mono_reflection_inflate_field): New public function.
27226 (MonoReflectionGenericInst): Added `MonoArray *fields'.
27227 (MonoReflectionInflatedField): New typedef.
27229 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
27231 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
27232 for Solaris and other platforms without s6_addr16
27234 2003-10-30 Martin Baulig <martin@ximian.com>
27236 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
27237 argument instead of two.
27238 (mono_class_inflate_generic_signature): Likewise.
27239 (inflate_generic_header): Likewise.
27240 (mono_class_inflate_generic_method): Likewise. In addition, if
27241 `ginst->klass' is set, it becomes the new `method->klass'.
27243 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
27246 * reflection.c (encode_generic_method_sig): Write a 0xa as the
27247 first byte. [FIXME]
27248 (method_encode_methodspec): If we have generic parameters, create
27249 a MethodSpec instead of a MethodRef.
27250 (fixup_method): Added support for "MonoInflatedMethod" and
27251 "MonoInflatedCtor".
27252 (mono_image_create_token): Added support for "MonoInflatedMethod"
27253 and "MonoInflatedCtor".
27254 (inflated_method_get_object): New static function; returns a
27255 managed "System.Reflection.MonoInflatedMethod" object.
27256 (mono_reflection_bind_generic_method_parameters): Return a
27257 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
27258 (mono_reflection_inflate_method_or_ctor): Likewise.
27259 (mono_image_get_generic_method_param_info): Initialize unused
27261 (mono_image_get_generic_param_info): Likewise.
27263 * reflection.h (MonoReflectionInflatedMethod): New public
27264 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
27265 "S.R.MonoInflatedCtor" classes.
27267 * loader.c (method_from_memberref): If we're a TypeSpec and it
27268 resolves to a generic instance, inflate the method.
27270 2003-10-28 Dick Porter <dick@ximian.com>
27272 * object.c (mono_runtime_run_main): Convert command-line arguments
27273 into utf8, falling back to the user's locale encoding to do so.
27275 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
27277 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
27280 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
27282 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
27283 up icalls at method definition time. Partially fixes #33569.
27285 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
27287 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
27288 marshalling of arrays. Fixes #50116.
27290 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
27292 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
27293 points to a vtable in the dying appdomain.
27295 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
27296 listeners into unmanaged code inside the lock.
27298 * object.c (mono_class_vtable): Turn off typed allocation in non-root
27299 domains and add some comments.
27301 2003-10-25 Martin Baulig <martin@ximian.com>
27303 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
27305 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
27307 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
27308 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
27309 currently parsing. Create the generic class and store it in
27310 `generic_inst->klass' before parsing the type arguments. This is
27311 required to support "recursive" definitions; see mcs/tests/gen-23.cs
27313 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
27314 to support recursive typespec entries.
27316 * class.c (mono_class_setup_parent): If our parent is a generic
27317 instance, we may get called before it has its name set.
27318 (mono_class_from_generic): Splitted into
27319 mono_class_create_from_generic() and mono_class_initialize_generic().
27321 2003-10-25 Martin Baulig <martin@ximian.com>
27323 * icall.c (ves_icall_Type_BindGenericParameters): Return a
27324 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
27325 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
27326 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
27328 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
27329 (create_typespec): Likewise.
27330 (mono_reflection_bind_generic_parameters): Return a
27331 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
27332 (mono_reflection_inflate_method_or_ctor): New public function.
27334 * reflection.h (MonoReflectionGenericInst): New typedef.
27336 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
27338 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
27339 inside the domain lock. Fixes #49993.
27341 * object.c (mono_class_vtable): When typed allocation is used,
27342 allocate vtables in the GC heap instead of in the mempool, since the
27343 vtables contain GC descriptors which are used by the collector even
27344 after the domain owning the mempool is unloaded.
27346 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
27348 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
27349 reflect what it does. Also invalidate mempools instead of freeing
27350 them if a define is set.
27352 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
27355 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
27356 hold the finalizable objects in this domain.
27358 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
27361 * appdomain.c (mono_domain_set): New function to set the current
27362 appdomain, but only if it is not being unloaded.
27364 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
27365 appdomain which is being unloaded.
27367 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
27368 unloading of the root appdomain.
27370 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
27371 icall to execute a method in another appdomain. Intended as a
27372 replacement for InternalSetDomain, which can confuse the code
27373 generation in the JIT.
27375 * appdomain.c (mono_domain_is_unloading): New function to determine
27376 whenever an appdomain is unloading.
27378 * appdomain.c (mono_domain_unload): New function to correctly unload
27381 * assembly.c (mono_assembly_load_references): Check that an assembly
27382 does not references itself.
27384 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
27385 domain manually, it asks the finalizer thread to do it, then waits for
27386 the result. Also added a timeout.
27388 * icall.c: Register the new icalls.
27390 * threads.h threads.c: Export the mono_gc_stop_world and
27391 mono_gc_start_world functions.
27393 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
27394 function to fill out the mempool with 0x2a.
27396 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
27398 * reflection.h (MonoReflectionMethodAux): New structure to store
27399 information which is rarely used, thus is not in the MonoMethod
27402 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
27403 store the aux info.
27405 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
27406 and marshalling info into the aux structure.
27408 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
27409 from the aux structure.
27411 * loader.c (mono_method_get_param_names): Retrieve the param names from
27414 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
27416 * exception.h exception.c: Add AppDomainUnloadedException && fix
27419 2003-10-21 Dick Porter <dick@ximian.com>
27422 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
27423 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
27425 2003-10-21 Martin Baulig <martin@ximian.com>
27427 * reflection.c (mono_reflection_bind_generic_parameters):
27428 `klass->parent' is NULL for interfaces.
27430 2003-10-21 Martin Baulig <martin@ximian.com>
27432 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27434 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
27436 * exception.c (mono_exception_from_name_msg): New helper function for
27437 creating exceptions and initializing their message field.
27439 * exception.c: Simplify functions using the new helper.
27441 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
27444 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
27445 mono_raise_exception, since otherwise gcc doesn't generate the function
27446 epilog for raise_exception, confusing the stack unwinding in the JIT.
27449 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
27450 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
27453 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27455 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
27458 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
27460 * icall.c: Removed GetUninitializedObject method because
27461 AllocateUninitializedClassInstance does the same.
27463 2003-10-18 Martin Baulig <martin@ximian.com>
27465 * class.c (inflate_generic_signature): Renamed to
27466 mono_class_inflate_generic_signature() and made it public.
27467 (my_mono_class_from_generic_parameter): New static function; if we
27468 don't already have the generic parameter's MonoClass, create a
27469 very simple one which is just used internally in the runtime and
27470 not passed back to managed code.
27472 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
27474 * metadata.h (MonoMethodSignature): Moved the
27475 `MonoGenericParam *gen_params' to the MonoMethodHeader.
27476 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
27478 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
27479 ves_icall_MonoMethod_GetGenericArguments(); this is now an
27480 interncall on the MonoMethod class, not on MethodInfo.
27481 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
27482 calling mono_reflection_bind_generic_method_parameters() directly.
27484 * loader.c (mono_method_get_signature): If this is a MethodSpec;
27485 return the already computed `method->signature'.
27486 (method_from_methodspec): New static function to load a method
27487 from a MethodSpec entry.
27488 (mono_get_method_from_token): Call the new method_from_methodspec()
27489 for MethodSpec tokens.
27490 (mono_get_method_from_token): If we're a generic method, load the
27493 * reflection.c (mono_image_get_memberref_token): Allow
27494 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
27496 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
27497 (mono_image_create_token): First check whether it's a generic
27498 method (so we'd need to create a MethodSpec), then do the other
27500 (mono_reflection_bind_generic_method_parameters): Return a
27501 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
27502 called directly from the interncall.
27504 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
27506 * reflection.c (load_public_key): Move loading of the public key
27509 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
27511 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
27514 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
27515 culture, hash_alg and public_key. Fixes #49555.
27517 2003-10-17 Martin Baulig <martin@ximian.com>
27519 * class.h (MonoGenericInst): Moved this declaration here and added
27520 `MonoMethod *generic_method'.
27523 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
27524 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
27526 * metadata.c (mono_metadata_type_equal): Two types of
27527 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
27528 index; ie. don't compare the address of the `MonoGenericParam'
27530 (mono_metadata_load_generic_params): Removed the `MonoMethod
27533 * metadata.h (MonoGenericInst): Moved declaration to class.h.
27534 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
27536 * reflection.c (method_encode_signature): Encode the number of
27537 generic parameters.
27538 (encode_generic_method_sig): New static function.
27539 (method_encode_methodspec): New static function; creates an entry
27540 in the MethodSpec table for a generic method.
27541 (mono_image_get_methodspec_token): New static function.
27542 (mono_image_create_token): Call mono_image_get_methodspec_token()
27543 for generic methods.
27544 (mono_reflection_bind_generic_method_parameters): New public
27545 function. Instantiates a generic method.
27547 2003-10-16 Martin Baulig <martin@ximian.com>
27549 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
27550 *gen_params' here from MonoMethodHeader.
27552 * metadata.c (mono_metadata_parse_method_signature): If we have
27553 generic parameters, initialize `method->gen_params' and then set
27554 the correct `type->data.generic_param' in all the parameters.
27556 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
27558 * threads.c (mono_threads_get_default_stacksize): New function to
27559 return the default stacksize.
27561 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
27562 termination of the finalizer thread, since the previous method had
27563 race conditions. Fixes #49628.
27565 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
27566 as for the other managed threads.
27568 2003-10-16 Martin Baulig <martin@ximian.com>
27570 * class.c (inflate_generic_signature): Copy `generic_param_count'
27573 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
27576 * metadata.c (mono_metadata_parse_method_signature): Actually set
27577 the `method->generic_param_count' here.
27578 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
27580 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
27582 * object.h: Add a new field to TypedRef to simplify the implementation
27583 of the REFANY opcodes in the JIT.
27585 * icall.c: Make use of the new field.
27587 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
27590 2003-10-15 Martin Baulig <martin@ximian.com>
27592 * class.c (mono_class_from_gen_param): Renamed to
27593 mono_class_from_generic_parameter() and moved most of the
27594 functionality from mono_reflection_define_generic_parameter()
27595 here; ie. we create a "real" class here.
27596 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
27597 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
27598 previously been called.
27600 * class.h (MonoGenericParam): Moved the declaration of this struct
27601 here from metadata.h and added `MonoMethod *method'.
27603 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
27606 * loader.c (mono_get_method_from_token): If we have any generic
27607 parameters, call mono_metadata_load_generic_params() to read them
27608 from the MONO_TABLE_GENERICPAR.
27610 * metadata.c (mono_metadata_load_generic_params): Added
27611 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
27613 * metadata.h (MonoMethodSignature): Replaced
27614 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
27615 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
27617 * reflection.c (mono_reflection_define_generic_parameter): Moved
27618 most of the functionality into the new
27619 mono_class_from_generic_parameter(); set the `method' field if
27620 we're a method parameter.
27622 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
27624 * marshal.c (emit_struct_conv): if native size is 0
27627 2003-10-14 Martin Baulig <martin@ximian.com>
27629 * icall.c: The generics API has changed in the spec since it was
27630 added to System.Type; these modifications make it match the spec
27632 (ves_icall_Type_GetGenericParameters): Renamed to
27633 `ves_icall_Type_GetGenericArguments'.
27634 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
27635 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
27636 `ves_icall_MonoType_get_HasGenericArguments'.
27637 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
27638 `ves_icall_MonoType_get_IsGenericParameter'.
27639 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
27640 this is no interncall anymore.
27641 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
27642 `ves_icall_TypeBuilder_get_IsGenericParameter'.
27644 2003-10-14 Martin Baulig <martin@ximian.com>
27646 * reflection.c (mono_reflection_bind_generic_parameters): Also
27647 inflate generic methods if we're reading the class from IL.
27649 2003-10-13 Martin Baulig <martin@ximian.com>
27651 * reflection.c (mono_reflection_define_generic_parameter): This
27652 method isn't called directly from the icall anymore; take a
27653 `MonoReflectionAssemblyBuilder *' so we can use this for type and
27654 method generic parameters.
27655 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
27656 (method_builder_encode_signature): Encode generic parameters.
27657 (mono_image_get_method_info): Write generic params to the
27658 MONO_TABLE_GENERICPARAM table.
27660 * reflection.h (MonoReflectionMethodBuilder): Added
27661 `MonoArray *generic_params'.
27663 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
27665 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
27666 wrapper for mono_reflection_define_generic_parameter().
27667 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
27669 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
27671 * marshal.h: Add missing function to fix build.
27673 * marshal.c (mono_marshal_get_native_wrapper): Add support for
27674 the SetLastError pinvoke attribute.
27676 * marshal.c (mono_marshal_set_last_error): New helper function called
27677 by the generated code.
27679 * marshal.c (mono_mb_emit_branch): New helper function.
27681 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
27683 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
27684 classes as parameters and return values of delegates. Fixes #29256.
27686 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
27688 * locales.c: use gint32 in non HAVE_ICU case
27690 2003-10-11 Martin Baulig <martin@ximian.com>
27692 * mono-debug.c (mono_debug_add_method): Added a workaround for
27695 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
27697 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
27698 delegates passed to native code must use the STDCALL calling
27699 convention. Fixes #35987.
27701 2003-10-10 Martin Baulig <martin@ximian.com>
27703 * class.c (inflate_generic_type): If we're inflating for a generic
27704 type instance (and not for a generic method), return
27705 MONO_TYPE_MVAR unchanged.
27707 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27709 * string-icalls.c: Join ignores null strings in the source array.
27710 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
27711 * threads.c: GetAvailableTheads is slightly more accurate.
27713 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
27715 * threads.h threads.c : add mono_threads_set_default_stacksize
27716 and pass default to CreateThread calls.
27718 2003-10-09 Dick Porter <dick@ximian.com>
27722 * locales.c: Internal calls for constructing CultureInfo and
27723 related objects from libicu (if its available.)
27725 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
27727 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
27729 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27731 * threadpool.c: added an argument to async_invoke_thread that is the
27732 item to process, pass the MonoAsyncResult to the thread start function
27733 when creating a new thread. This way we don't need to acquire any lock
27734 when we're creating a new thread. Readded a semaphore for faster
27735 response times (instead of that Sleep i added).
27737 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
27739 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
27740 get daylight change dates better on Windows, fix handling
27741 of platforms without tm_gmtoff.
27743 2003-10-06 Martin Baulig <martin@ximian.com>
27745 * class.c (inflate_generic_method): Renamed to
27746 mono_class_inflate_generic_method() and made public.
27747 (mono_class_init): Don't inflate the generic methods here.
27748 (mono_class_from_generic): Added `gboolean inflate_methods'
27749 argument. Inflate the methods here.
27751 * loader.c (mono_method_get_param_names): Ignore instances of
27752 generic types for the moment.
27754 * reflection.c (fixup_method): Added support for inflated methods.
27755 (mono_image_create_token): Use mono_image_get_methodref_token()
27756 for inflated methods.
27757 (mono_custom_attrs_from_param): Ignore instances of generic types
27759 (mono_reflection_bind_generic_parameters): New public function.
27760 Moved all the functionality from
27761 ves_icall_Type_BindGenericParameters() here and added support for
27763 (mono_reflection_define_generic_parameter): Initialize
27764 `klass->methods' here.
27766 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
27767 functionality into mono_reflection_define_generic_parameter().
27768 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
27769 TypeBuilder, return that TypeBuilder.
27771 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27773 * appdomain.c: removed mono_delegate_semaphore.
27776 (mono_thread_pool_add): moved hash table creation inside and the thread
27777 creation outside of the critical region.
27778 (mono_thread_pool_finish): removed obsolete code.
27779 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
27780 continue or exit the thread depending on the queue.
27782 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
27784 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
27785 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
27786 handle more bool marshalling options
27788 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
27790 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
27791 arrays of structs. Also add a more descriptive error message when
27792 a structure member is marshalled as LPArray.
27794 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
27796 * marshal.c (mono_marshal_get_native_wrapper): Add support for
27797 marshalling arrays of complex types. Fixes #29098. Also remove an
27798 usused and incomplete function.
27800 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27802 * gc.c: report heap_size - free_bytes as total memory allocated
27805 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
27807 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
27808 fix timezone handling problems on Windows.
27810 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
27811 asserts when the year is outside the range handled by ms the functions.
27813 * class.c (setup_interface_offsets): If the class is an interface,
27814 fill out its interface_offsets slot.
27816 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27818 * threadpool.c: mark threadpool threads as background.
27820 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
27822 * decimal.c - define DECINLINE to nothing if not using GCC
27824 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
27826 * assembly.c: More refcount fixes.
27828 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27830 * string-icalls.c: if we're not trimming, return the same string.
27831 When not splitting, don't create a new string.
27833 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27836 (mono_image_open): increment the ref_count inside the critical section.
27838 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
27840 * image.c (mono_image_open): Fix reference counting bug.
27842 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
27844 * marshal.c (mono_marshal_type_size) struct alignment changed for
27845 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
27846 64bits. Avoid leak in mono_marshal_get_native_wrapper when
27847 mono_lookup_pinvoke_call throws.
27849 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
27851 * reflection.c (mono_reflection_parse_type): Fix #49114.
27853 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
27854 temporary workaround for cygwin header problem.
27856 * object.c (mono_object_isinst): Synchronize this with the code
27857 generated by the JIT for casts.
27859 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
27861 * reflection.c (encode_type): Fix #38332.
27863 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
27865 * marshal.c (mono_marshal_method_from_wrapper): New function to return
27866 the original method from the wrapper method.
27868 2003-09-25 Martin Baulig <martin@ximian.com>
27870 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
27871 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
27872 (ves_icall_Type_get_IsGenericInstance): New interncall.
27874 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
27876 * object.c: fix cast warning in big endian code.
27878 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
27880 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
27882 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27884 * assembly.c: don't call check_env from mono_assembly_load. It's
27885 already done once in mono_assemblies_init and may cause headaches when
27886 multiple threads are loading assemblies.
27888 2003-09-19 Martin Baulig <martin@ximian.com>
27890 * reflection.c (mono_reflection_define_generic_parameter): Don't
27891 allocate `klass->methods', set `klass->flags' to
27892 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
27894 2003-09-18 Martin Baulig <martin@ximian.com>
27896 * class.c (mono_class_init): Don't create `class->methods' if it's
27897 already initialized.
27899 * metadata.c (mono_metadata_load_generic_params): Make this
27902 * reflection.c (mono_reflection_define_generic_parameter): Set
27903 parent class and interfaces from the constraints.
27905 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
27906 to keep this struct in sync with the declaration in TypeBuilder.cs.
27908 2003-09-17 Martin Baulig <martin@ximian.com>
27910 * metadata.h (MonoType): Replaced the data's `int type_param'
27911 field with `MonoGenericParam *generic_param'.
27912 (MonoGenericParam): Added `MonoClass *klass'.
27914 * class.c (mono_class_from_gen_param): Removed the
27915 `MonoImage *image' and `int type_num' arguments.
27917 * metadata.c (mono_metadata_parse_generic_param): New static
27918 method; creates a MonoGenericParam which just contains the index.
27919 (do_mono_metadata_parse_type): Call
27920 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
27923 * reflection.c (mono_image_typedef_or_ref): Generic type
27924 parameters may be in the same assembly, but never use a typedef
27926 (mono_reflection_define_generic_parameter): We're now creating a
27927 "real" class for the type parameter; it's now safe to call
27928 mono_class_from_mono_type() on the class'es type, it'll do the
27931 2003-09-16 Martin Baulig <martin@ximian.com>
27933 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
27934 `symfile->range_entry_size' and `symfile->class_entry_size' here;
27935 the `symfile' data structure must be fully initialized before it
27936 gets added to the table.
27938 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
27940 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
27942 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
27943 class init trampolines.
27945 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
27947 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
27948 to the built-in profiler to turn off time and allocation profiling
27951 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
27953 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
27956 * debug-helpers.c (mono_method_full_name): Print the wrapper type
27957 in human readable form.
27959 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
27961 * reflection.c icall.c: Fixed warnings.
27963 * image.c (load_class_names): Use a temporary hash table to hold the
27964 namespaces in order to avoid doing many string comparisons.
27966 * image.h: Fix typo.
27968 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
27969 Pass NULL instead of g_direct_equal to the GHashTable constructor
27970 since the NULL case is short-circuited inside g_hash_table_lookup,
27971 leading to better performance.
27973 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
27974 obtain the first custom attribute for a given index. Depends on the
27975 CustomAttribute table being sorted by the parent field.
27977 * reflection.c (mono_custom_attrs_from_index): Use the new function
27978 for better performance.
27980 2003-09-07 Martin Baulig <martin@ximian.com>
27982 * class.c (mono_class_init): If we're a generic instance, inflate
27983 all our methods instead of loading them from the image.
27984 (mono_class_from_generic): Set `class->methods = gklass->methods'.
27986 2003-09-07 Martin Baulig <martin@ximian.com>
27988 * mono-debug-debugger.c: Added support for constructors.
27990 2003-09-06 Martin Baulig <martin@ximian.com>
27992 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
27995 * reflection.c (mono_reflection_setup_generic_class): Call
27996 ensure_runtime_vtable() to create the vtable.
27998 2003-09-05 Martin Baulig <martin@ximian.com>
28000 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
28003 2003-09-04 Martin Baulig <martin@ximian.com>
28005 * reflection.c (mono_reflection_define_generic_parameter): Generic
28006 parameters start with zero.
28008 2003-09-04 Martin Baulig <martin@ximian.com>
28010 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
28012 * reflection.h (MonoReflectionGenericParam): New typedef.
28013 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
28014 the generic parameters from the managed TypeBuilder.
28016 * reflection.c (mono_reflection_define_generic_parameter): New function.
28017 (mono_reflection_create_runtime_class): Encode generic parameters.
28018 (mono_reflection_setup_generic_class): New function; this is
28019 called after adding adding all generic params to the TypeBuilder.
28020 (encode_type): Added MONO_TYPE_VAR.
28022 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
28024 * class.h class.c (mono_class_needs_cctor_run): Moved this method
28027 * assembly.h assembly.c: Moved the AOT loading code into an assembly
28030 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
28032 * reflection.h reflection.c class.h class.c: Delete duplicate
28033 definition of mono_type_get_name () from reflection.c and export the
28036 * class.c: Class loading fixes from Bernie Solomon
28037 (bernard@ugsolutions.com).
28039 * reflection.c: Endianness fixes from Bernie Solomon
28040 (bernard@ugsolutions.com).
28042 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
28044 * assembly.h assembly.c: Define a file format version for AOT
28047 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
28049 * appdomain.h (MonoJitInfo): New field to determine whenever the
28050 code is domain neutral.
28052 2003-08-31 Miguel de Icaza <miguel@ximian.com>
28054 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
28056 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
28058 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
28059 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
28060 Avoid caching the result since strings must be domain specific. Fixes
28063 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
28065 * marshal.c (mono_marshal_init): Make this callable multiple times
28066 since it is hard to find a correct place to call it.
28068 * object.c (mono_runtime_class_init): Execute static constructors in
28069 the correct appdomain.
28071 * image.c (build_guid_table): Handle the case when multiple images have
28074 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28076 * icall.c: added a couple of icalls for System.Web.
28078 2003-08-28 Martin Baulig <martin@ximian.com>
28080 * icall.c (ves_icall_Type_BindGenericParameters): Use
28081 `klass->generic_inst' instead of `&klass->byval_arg' in the
28082 mono_type_get_object() call. The returned type must be
28083 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
28085 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
28089 * object.c (mono_class_proxy_vtable): Make it thread safe.
28091 * pedump.c: Fix warning.
28093 * object.c appdomain.h: Get rid of metadata_section.
28094 It is no longer needed and it was causing deadlocks with domain->lock.
28096 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
28098 2003-08-26 Martin Baulig <martin@ximian.com>
28100 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
28102 2003-08-26 Martin Baulig <martin@ximian.com>
28104 * pedump.c (main): Call mono_metadata_init(),
28105 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
28106 and mono_loader_init().
28108 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
28110 * loader.h: Add missing include to fix build.
28112 * image.h: mono_image_load_references is no more.
28114 * assembly.c: Reworked assembly loading to make it really thread safe.
28115 After these changes, the assembly returned by mono_assembly_open is
28116 fully initialized, i.e. all its references assemblies are loaded.
28118 * assembly.c (mono_image_load_references): Renamed to
28119 mono_assembly_load_references, and made private, since clients no
28120 longer need to call it.
28122 * class.c: Removed calls to mono_assembly_load_references, since it was
28123 a source of deadlocks.
28125 * loader.h loader.c class.h class.c: Protect data structures using a
28126 new lock, the loader lock.
28128 * class.c (mono_class_setup_vtable): Create temporary hash tables and
28129 GPtrArrays only when needed.
28131 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
28132 into empty structures by mcs. Fixes pinvoke7.cs.
28134 * domain.c (mono_init): Call a new initialization function.
28136 * appdomain.c (mono_runtime_init): Call the new initializer function
28137 of the marshal module.
28139 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
28140 inserted into empty structures by mcs. Fixes pinvoke7.cs.
28142 * marshal.h marshal.c: Added locks around the wrapper caches to make
28143 this module thread safe.
28145 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
28146 this argument. Fixes pinvoke1.exe.
28148 2003-08-25 Lluis Sanchez <lluis@ximian.com>
28150 * object.h: Added call_type field to MonoMethodMessage and the corresponding
28151 enumeration of values. Removed fields to store remote call output values in
28152 MonoAsyncResult. Not needed any more.
28153 * object.c: Initialize call_type and async_result fields in mono_message_init.
28154 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
28155 dispatching the message.
28156 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
28157 async call to finish. To do it use a message with EndInvoke call type.
28159 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
28161 * loader.h loader.c (mono_method_hash_marhal_info): New function which
28162 determines whenever a method has marshalling info.
28164 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28166 * assembly.c: fix the build on windows.
28168 2003-08-22 Lluis Sanchez <lluis@ximian.com>
28170 * object.cs: Fixed bug #47785.
28172 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
28174 * string-icalls.c (StringReplace): If their are no occurances of
28175 the old string found return a reference to the supplied
28176 string. This saves some memory and matches MS behavoir.
28178 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28180 * socket-io.c: fixed compilation for systems that define AF_INET6
28181 and don't define SOL_IP/SOL_IPV6.
28183 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
28185 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
28186 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
28188 * rawbuffer.c rawbuffer.h: Make this module thread safe.
28190 * domain.c: Make this module thread safe.
28192 * domain.c (mono_init): Call new initialization function.
28194 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
28195 reference types too. Fixes #38812.
28197 * image.c (mono_image_init): Fixed warnings.
28199 * class.c (mono_class_from_typeref): Handle assembly load failure
28202 * appdomain.c (add_assemblies_to_domain): Handle the case when
28203 the references of an assembly are not yet loaded.
28205 * metadata.c image.c assembly.c: Moved initialization of global
28206 variables to a separate function called at startup since lazy
28207 initialization of these variables is not thread safe.
28209 * image.c assembly.c: Made this module thread safe by adding locks in
28210 the appropriate places.
28212 * domain.c (mono_init): Call the new initialization functions of the
28215 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
28217 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
28218 make a direct call. It is proxy's work to make the call asynchronous.
28219 mono_delegate_end_invoke(): If the targe is a proxy, just collect
28221 * object.cs: mono_method_call_message_new(): read AsyncResult and
28222 state object from parameters list, if this info is requested.
28223 * object.h: Added fields to store remote call output values in
28224 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
28226 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28228 * object.h: add needed fields to MonoThread.
28229 * threads.c, threads.h: allow registering a function to cleanup data
28230 allocated per thread by the JIT.
28232 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28234 * loader.h: portability fix by Bernie Solomon
28235 * <bernard@ugsolutions.com>.
28237 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
28239 * reflection.h reflection.c (mono_param_get_objects): Changed this to
28240 return a MonoArray. This simplifies the code and also ensures that
28241 the cache allways contains an object reference as a value.
28243 * icall.c (ves_icall_get_parameter_info): Simplified using the new
28246 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28248 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
28249 fixes a problem with byte ordering when getting the address family for
28252 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
28254 * .cvsignore: Added monosn.
28256 * reflection.h reflection.c loader.c: Added support for parameter
28257 marshalling to dynamically created types. Fixes #47295.
28259 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
28261 * rand.c: remove useless warnings.
28263 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
28265 * class.c: implemented ldtoken for methods and fieldrefs.
28267 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28269 * threadpool.c: when mono_async_invoke was called, no one took care of
28270 monitoring the queue. So if the method invoked took some time and we
28271 got new async invoke requests after 500 ms (the thread created waited
28272 that long in WaitForSingleObject), the new async invoke was not called
28273 until the previous one finished.
28275 This is fixed now. Thanks to Totte for helping with it.
28277 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28279 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
28281 2003-08-11 Martin Baulig <martin@ximian.com>
28283 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
28285 2003-08-06 Martin Baulig <martin@ximian.com>
28287 * mono-debug-debugger.c: Added support for static fields,
28288 properties and methods.
28290 2003-08-06 Martin Baulig <martin@ximian.com>
28292 * mono-debug-debugger.c: Don't store the MonoString's vtable to
28293 make this work for applications with multiple application domains.
28295 2003-08-04 Martin Baulig <martin@ximian.com>
28297 * mono-debug-debugger.c: Completely reworked the type support; the
28298 most important thing is that we're now just using one single
28299 `MonoType' instance per type.
28301 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
28303 * mono-endian.h, mono-endian.c, icall.c: Added icall
28304 ves_icall_System_Double_AssertEndianity to assert double word endianity
28305 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
28307 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28309 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
28310 support, icalls and fixes.
28312 2003-07-31 Miguel de Icaza <miguel@ximian.com>
28314 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
28315 classes that are a punctuation character in .NET is not the same a
28318 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28320 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
28322 2003-07-29 Miguel de Icaza <miguel@ximian.com>
28324 * icall.c: Add new MemCopy internalcall.
28325 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
28326 Simplified code; It is not necessary to handle all the cases here,
28327 as the C# code takes care of it. Only handle the case of the name
28328 resource embedded into the assembly.
28330 Changed signature to return the data pointer and the size of the
28333 2003-07-26 Miguel de Icaza <miguel@ximian.com>
28335 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
28336 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
28338 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
28340 * socket-io.c: ignore EINTR error in select.
28342 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28344 * class.h, class.c: removed unused subclasses field in MonoClass.
28346 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
28348 * icall.c: improve fix of get_base_definition(). If the parent class
28349 doesn't have the mehod, look at the parent of the parent.
28350 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
28351 to check if a parameter is an in or out parameter
28352 (PARAM_ATTRIBUTE_IN is not set by default).
28353 mono_method_return_message_restore(): Use mono_class_value_size to
28354 get the size of a value type. mono_type_stack_size (parameterType)
28355 does not return the correct value if parameterType is byRef.
28356 mono_load_remote_field(), mono_load_remote_field_new(),
28357 mono_store_remote_field(), mono_store_remote_field_new():
28358 raise exception if the remote call returns an exception.
28360 2003-07-28 Martin Baulig <martin@ximian.com>
28362 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
28363 method. This is a wrapper around mono_runtime_invoke() which
28364 boxes the instance object if neccessary.
28366 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28368 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
28369 metadata.h, row-indexes.h, verify.c: first cut of generics support.
28371 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28373 * icall.c: disable mcs bug workaround.
28375 2003-07-21 Miguel de Icaza <miguel@ximian.com>
28377 * object.c (mono_runtime_class_init): Take the metadata_section
28378 mutex before obtaining the domain mutex.
28380 * appdomain.h: Added definition of metadata_section mutex here.
28382 * object.c: define metadata_mutex here.
28384 2003-07-24 Ravi Pratap <ravi@ximian.com>
28386 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
28389 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
28391 * reflection.c: Fix bug #46669
28393 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28398 * object.h: fill in the type name for TypeLoadException.
28400 2003-07-23 Ravi Pratap <ravi@ximian.com>
28402 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
28403 relationship between TypeBuilders while compiling corlib) and bug
28404 45993 (Array types returned from the runtime while compiling
28405 corlib were from the loaded corlib).
28407 2003-07-22 Martin Baulig <martin@ximian.com>
28409 * mono-debug-debugger.c: Reworked the type support a bit more;
28410 distinguish between types and classes.
28412 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
28414 * icall.c: add IsArrayImpl icall.
28416 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
28418 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
28419 initializing real_size only once. Also fix bug #46602.
28421 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
28423 * object.c: Renamed mono_metadata_section to metadata_section.
28425 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
28427 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
28428 empty array if the type is an array. Fixed.
28429 ves_icall_MonoMethod_get_base_definition: if the base method
28430 is abstract, get the MethodInfo from the list of methods of
28432 * reflection.c: ParameterInfo.PositionImpl should be zero-based
28433 and it was 1-based. Fixed in mono_param_get_objects.
28435 2003-07-20 Martin Baulig <martin@ximian.com>
28437 * mono-debug.h: Set version number to 31.
28438 (mono_debug_init): Added `MonoDomain *' argument.
28440 * mono-debug-debugger.c: Reworked the type support; explicitly
28441 tell the debugger about builtin types; pass the `klass' address to
28444 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
28446 * image.c: Allow new metadata tables to be loaded without a
28447 warning. Also update the warning message to give the new constant value.
28449 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
28451 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
28452 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
28453 array type representation changes.
28455 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28457 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
28458 on Environment.Exit () call.
28460 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
28462 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
28463 requires a matching corlib.
28465 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
28467 * Changelog: My editor decided to add a CR to each line. Sorry about that.
28468 Committed again without the CRs.
28470 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
28472 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
28473 getting it from the "this" socket instance. Did not work
28474 if the socket is a subclass of Socket.
28475 Also fixed bug #35371.
28477 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28479 * metadata.c: fixed size for TypedByRef.
28480 * loader.c: when searching for a method, consider the vararg amrker.
28481 * unicode.c, decimal.c: constify some arrays.
28483 2003-07-15 Dick Porter <dick@ximian.com>
28485 * socket-io.c: Fixed compilation for gcc < 3.2.
28487 Fixed compilation for machines that don't have AF_INET6 (thanks to
28488 Bernie Solomon <bernard@ugsolutions.com> for that part.)
28490 Fixed compile warnings.
28492 Fixed formatting and line endings.
28494 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
28497 * socket-io.c: Added IPv6 support.
28499 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
28501 * class.c (mono_class_is_assignable_from): New function to implement
28502 the is_assignable_from logic. Used by mono_object_isinst,
28503 Type::IsAssignableFrom () and the interpreter.
28505 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
28506 Object, even interfaces.
28508 * object.c (mono_object_isinst): Implement in terms of
28509 is_assignable_from.
28511 * icall.c (ves_icall_type_is_assignable_from): New icall.
28513 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
28515 * domain.c (foreach_domain): fix compiler warning.
28517 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
28519 * image.c (load_metadata_ptrs): use g_strndup because strndup is
28520 not available on all plattforms
28522 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
28524 * image.h image.c: Store the metadata version string in MonoImage.
28525 * icall.c: New icall to retrieve the image version.
28526 * reflection.c (create_dynamic_image): Fill in the image version field
28527 * reflection.c (build_compressed_metadata): Use the image version
28528 from the image structure.
28530 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28532 * appdomain.c: modified comment.
28533 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
28534 That will be its last iteration when mono_gc_cleanup is called from
28535 mono_runtime_cleanup and before the domain is unloaded.
28539 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
28541 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
28544 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28546 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
28547 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
28548 Bernie Solomon <bernard@ugsolutions.com>.
28550 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28552 * object.c, object.h: provide mono_object_new_fast() for faster
28553 allocation in some special cases.
28555 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
28557 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
28558 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
28560 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
28562 * threadpool.c: fix leaks.
28564 2003-07-01 Dick Porter <dick@ximian.com>
28566 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
28567 using MonoGHashTables. Fixes threadpool bug posted to list.
28569 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
28571 * image.h, image.c: added support to load an assembly from a byte array.
28572 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
28573 assembly bundle support.
28575 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
28577 * threadpool.c (mono_thread_pool_add): keep a reference to the
28578 AsyncResult to prevent GC
28580 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28582 * class.c: leak fix.
28584 2003-06-25 Dick Porter <dick@ximian.com>
28586 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
28587 for the async object, the WaitHandle object will close the handle.
28590 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28592 * class.c: in mono_array_class_get (), lookup from the hash with the
28593 same type we insert: this works around a bug in
28594 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
28595 lluis. The real fix will have to wait for after the release.
28597 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28599 * icall.c: fix memory leak when getting type members.
28601 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28603 * reflection.c: added more pubtoken special cases.
28605 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
28607 * class.c: handle field offset correctly when class size
28608 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
28610 2003-06-20 Martin Baulig <martin@ximian.com>
28612 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
28615 2003-06-20 Martin Baulig <martin@ximian.com>
28617 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
28619 2003-06-20 Martin Baulig <martin@ximian.com>
28621 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
28622 just distinguish between variables in registers and variables at
28623 an offset relative to a register.
28625 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28627 * icall.c: #ifdef out latest changes until mcs is fixed.
28629 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28631 * icall.c: return members in metadata order.
28633 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28635 * icall.c: avoid infinite loop in GetTimeZoneData.
28637 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
28639 * icall.c: added Marshal.Prelink/All icalls.
28641 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28643 * object.c, object.h: fix warnings and do some overflow checking
28644 when creating arrays.
28646 2003-06-17 Dick Porter <dick@ximian.com>
28649 * file-io.c: File attributes need to be tweaked slightly when
28650 passed from the managed to the w32 world.
28652 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
28653 * profiler.h profiler-private.h profiler.c: Rework last patch
28654 based on suggestion by Paolo.
28656 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
28658 * profiler.h profiler-private.h profiler.c: Added infrastructure for
28659 instruction level coverage data collection.
28660 * profiler.h profiler.c (: Added new callback function which can be
28661 used by the profiler to limit which functions should have coverage
28663 * profiler.c (mono_profiler_load): Call g_module_build_path to
28664 generate the file name of the profiler library.
28666 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28668 * profiler.c, profiler.h, profiler-private.h: added basic block
28669 coverage profiling API.
28671 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
28673 * reflection.c (mono_reflection_create_runtime_class): Add support
28674 for events in dynamically generated code.
28676 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
28679 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28681 * icall.c: when getting timezone info, return reasonable values if we
28682 can't get the actual data.
28684 2003-06-14 Dick Porter <dick@ximian.com>
28686 * threads.c (start_wrapper): Remove the reference to the thread
28687 object in the TLS data, so the thread object can be finalized.
28688 This won't be reached if the thread threw an uncaught exception,
28689 so those thread handles will stay referenced :-( (This is due to
28690 missing support for scanning thread-specific data in the Boehm GC
28691 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
28693 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
28695 * reflection.c: ensure streams and tables are first allocated with
28696 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
28698 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28700 * icall.c: fixed GetElementType for byrefs (bug# 44792).
28702 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
28704 * reflection.c (mono_reflection_create_runtime_class): Add support for
28705 properties to dynamically created classes.
28706 * reflection.c: Fix a few places where non-MonoObjects were inserted
28707 into the tokens hashtable.
28709 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28711 * object.c: some support to handle out of memory exceptions.
28713 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
28715 * marshal.c (mono_marshal_get_native_wrapper): support reference
28718 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28720 * object.h, object.c: more portability stuff from Bernie Solomon.
28721 Unexport mono_object_allocate(). Added mono_object_unbox ().
28722 Set exitcode when an unhandled exception is thrown.
28724 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
28726 * marshal.c (mono_marshal_get_native_wrapper): use custom
28727 marshaler for return types.
28729 2003-06-10 Dick Porter <dick@ximian.com>
28731 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
28732 ip_mreq is available
28734 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
28736 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
28737 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
28738 by Bernie Solomon <bernard@ugsolutions.com>.
28740 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
28742 * gc.c (mono_gc_init): Avoid error message on shutdown when
28743 GC_DONT_GC=1 is used.
28745 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
28746 New icall to return the GUID of a module.
28748 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28750 * class.c: ensure instance size always includes the parent's size
28751 even whem class size is set explicitly (fixes bug#44294).
28753 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28755 * profiler.h, profiler.c: made the simple profiler thread-safe,
28756 get more accurate timing info. Allow the loading of an
28757 externally-developed profiler module.
28759 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
28761 * marshal.c (mono_marshal_get_native_wrapper): improved
28762 class/byref arguments.
28763 (mono_marshal_get_native_wrapper): better string marshaling support.
28765 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
28767 * class.c: ensure .pack and .size are handled correctly and
28768 simplified layout of static fields.
28770 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
28773 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
28775 * loader.c (mono_lookup_pinvoke_call): look for modules in the
28776 current directory (fix bug 44008)
28778 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
28780 * marshal.c (mono_marshal_get_native_wrapper): started support for
28782 (mono_delegate_to_ftnptr): consider marshalling specifications
28784 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
28786 * reflection.c, reflection.h: emit custom marshal info.
28788 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28790 * object.c: free the GError.
28791 * icall.c: added CloseEvent_internal.
28793 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
28796 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
28798 * loader.c (mono_method_get_signature): Add support for dynamic
28801 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
28803 * reflection.c: fixed bug #43905.
28805 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28807 * class.c, domain.c, icall.c, metadata.h, object.h: support for
28808 handling TypedReference and ArgIterator.
28809 * loader.c, loader.h: added function to get signature at call site.
28811 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28813 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
28814 data readonly. Buglets and warning fixes. Some MethodSpec support.
28816 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28818 * class.h, class.c, object.c: remove relative numbering support.
28820 2003-05-26 Miguel de Icaza <miguel@ximian.com>
28822 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
28823 free the string, until we get a chance to fix Gtk#
28825 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28827 * marshal.c: revert last patch.
28829 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
28831 * icall.c: updates for new mono_class_vtable() not calling
28832 the type constructor anymore.
28834 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28836 * object.h, object.c: separate vtable creation from type
28837 initialization. Make running the .cctor thread safe.
28839 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
28841 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
28843 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
28845 * loader.c (mono_get_method): consider calling convention
28847 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
28849 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
28850 to return the invisible global type for a module.
28852 * reflection.c (mono_image_build_metadata): Emit global fields too.
28854 2003-05-20 Peter Williams <peterw@ximian.com>
28856 * loader.c (mono_lookup_internal_call): Add a few newlines.
28858 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
28860 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
28863 * appdomain.c (set_domain_search_path): Recalculate search path when
28864 AppDomainSetup.PrivateBinPath changes.
28866 * object.c (mono_class_compute_gc_descriptor): It turns out some
28867 parts of the class libs (like System.Thread) holds pointers to
28868 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
28869 to treat native int a pointer type here.
28871 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
28873 * appdomain.h, domain.c: add hashtable for jump target resolution.
28875 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
28877 * reflection.h reflection.c icall.c: Added new icalls
28878 GetManifestResourceInfoInternal, GetModulesInternal and support
28881 2003-05-16 Dick Porter <dick@ximian.com>
28885 * file-io.c: Implement System.IO.MonoIO::GetTempPath
28887 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
28889 * object.c: mono_store_remote_field: little fix to previous patch.
28891 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28893 * class.c: add constructors to array classes.
28894 * icall.c: special case array construction for InternalInvoke (),
28896 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
28898 * class.h class.c reflection.c object.c: Added support for field
28899 defaults in dynamically generated classes.
28901 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
28903 * reflection.c: properly encode charset for ddlimport.
28905 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
28907 * threads.c: allow compiling without GC.
28909 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28911 * appdomain.h, object.c, object.h, threads.c, threads.h: added
28912 handling of thread static data.
28914 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28916 * reflection.h, reflection.c: added mono_custom_attrs_free ().
28918 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
28920 * class.c (mono_array_class_get): always set the serializable flags
28921 (mono_array_class_get): always set the SEALED attribute for array types
28923 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
28925 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
28926 attributes (fix for bug 42021).
28928 2003-05-12 Dick Porter <dick@ximian.com>
28930 * gc.c: Don't run finalizers when the finalizer thread is
28931 finishing up, because the default domain has already been
28934 2003-05-11 Miguel de Icaza <miguel@ximian.com>
28936 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
28937 value is null, we should throw an exception. This is slightly
28938 different than the other conventions used for the constructor.
28940 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28942 * socket-io.c: fixed windows build.
28944 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28946 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
28948 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
28950 * object.c (mono_string_new_wrapper): Compatibility fix for MS
28953 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
28955 * class.c (mono_class_layout_fields): Add experimental GC aware
28956 auto layout facility. Requires class library changes to work correctly.
28958 (mono_class_setup_vtable): Avoid overriding explicit interface
28959 method implementations. Fixes iface3.exe test.
28961 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
28963 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
28964 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
28966 * metadata.h: Add new type classification macro which determines
28967 whenever the type holds an object reference.
28969 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
28971 * marshal.c (mono_marshal_get_native_wrapper): cleanups
28973 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
28975 * gc.c (finalizer_thread): Work around a GC bug.
28977 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
28979 * marshal.c (emit_struct_conv): allow unions
28981 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
28983 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
28985 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
28987 2003-05-06 Martin Baulig <martin@ximian.com>
28989 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
28991 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28994 (Select_internal): allow NULLs, don't create arrays if not needed.
28995 Coupled with Socket.cs changes.
28998 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
28999 register a finalizer for it that will close the semaphore handle. This
29000 fixes the leak and make Lupus' test run with > 4080 loops.
29002 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
29004 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
29005 Jerome Laban (bug #42287)
29007 2003-05-02 Martin Baulig <martin@ximian.com>
29009 * debug-mono-symfile.h
29010 (MonoSymbolFile): Moved declaration into mono-debug.h.
29011 (MonoDebugMethodJitInfo): Likewise.
29012 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
29014 (_mono_debug_address_from_il_offset): Take a
29015 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
29018 (MonoDebugDomainData): New struct.
29019 (mono_debug_get_domain_data): New function.
29020 (mono_debug_add_method): Take an additional `MonoDomain *'
29022 (mono_debug_source_location_from_address): Likewise.
29023 (mono_debug_il_offset_from_address): Likewise.
29024 (mono_debug_address_from_il_offset): Likewise.
29026 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
29028 * reflection.c: one more check for null type in custom attrs.
29030 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29032 * reflection.c: avoid warning (comparison is always false due to limited
29033 range of data type).
29035 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29037 * icall.c: throw an exception in Type.GetField if the argument 'name'
29040 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
29042 * reflection.c: fixed handling of enums in named arguments to custom
29043 attributes (bug #42123).
29045 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
29047 * reflection.c: use the right array element type and handle
29048 a null for a Type argument, too.
29050 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
29052 * reflection.c: handle arrays as arguments to custom attributes.
29054 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
29056 * reflection.c: handle a string value in a custom attr
29057 ctor that takes an object.
29059 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
29061 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
29064 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
29066 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
29068 2003-04-27 Martin Baulig <martin@ximian.com>
29070 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
29071 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
29072 MONO_DEBUGGER_EVENT_BREAKPOINT.
29073 (mono_breakpoint_trampoline_code): Removed.
29074 (mono_debugger_event_handler): The last argument is now a
29076 (mono_debugger_insert_breakpoint_full): Removed the
29077 `use_trampoline' argument.
29078 (mono_debugger_method_has_breakpoint): Likewise.
29079 (mono_debugger_trampoline_breakpoint_callback): Renamed to
29080 mono_debugger_breakpoint_callback(); take the method and
29081 breakpoint number as arguments.
29083 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
29085 * metadata.c: fix off by one when loading parameters attributes.
29087 2003-04-24 Martin Baulig <martin@ximian.com>
29089 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
29091 2003-04-24 Martin Baulig <martin@ximian.com>
29093 * mono-debug-debugger.c: Moved all code which interacts with the
29094 Mono Debugger here.
29096 * debug-mono-symfile.c: This code now just deals with the symbol
29097 file itself, the debugger code is now in mono-debug-debugger.c.
29099 2003-04-23 Martin Baulig <martin@ximian.com>
29101 * mono-debug.c (mono_debug_source_location_from_il_offset):
29102 New method; like mono_debug_source_location_from_address(), but
29103 takes an IL offset instead of a machine address.
29105 2003-04-23 Martin Baulig <martin@ximian.com>
29107 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
29108 `line' field; this is now computed by the debugger.
29110 2003-04-23 Martin Baulig <martin@ximian.com>
29112 * mono-debug.[ch]: New files. This is the new debugging interface.
29114 * mono-debug-debugger.[ch]: New files. Moved all code which
29115 interacts with the Mono Debugger here.
29117 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
29119 * domain.c (mono_init): initialize mono_defaults.monitor_class
29121 2003-04-21 Miguel de Icaza <miguel@ximian.com>
29123 * reflection.c (method_encode_code): Add a spicy exception to help
29124 future compiler authors.
29126 2003-04-21 Martin Baulig <martin@ximian.com>
29129 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29130 Make this work with relative pathnames; g_filename_to_uri() needs
29131 an absolute filename.
29133 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
29135 * icall.c: Track name changes in Object and ValueType.
29137 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
29139 * metadata.c (mono_type_stack_size): size should be a multiple of
29142 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29145 (internal_domain_finalize): moved into mono_domain_finalize. No need
29146 to create another thread because the finalizers will be run in the
29149 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
29150 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
29151 to be run (MS does this too).
29153 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
29155 * object.c (mono_class_compute_gc_descriptor): Update comment.
29157 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
29159 * image.h: Add synchronized wrapper cache.
29161 * image.c (do_mono_image_open): Initialize cache.
29163 * reflection.c (create_dynamic_mono_image): Initialize cache.
29165 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29167 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
29168 ves_icall_System_Buffer_ByteLengthInternal.
29170 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
29172 * reflection.c: setup klass->nested_in earlier. Allow
29173 a dash in the assembly name.
29175 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
29177 * metadata.c (mono_type_to_unmanaged): dont access
29178 type->data.klass for MONO_TYPE_OBJECT
29179 (mono_type_to_unmanaged): consider System.Delegate class
29181 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
29183 * class.c: just setup supertypes in the proper place instead of
29184 initializing the full element class for arrays.
29186 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
29188 * class.c: ensure the element class of arrays is initialized.
29189 Setup the supertype info for array classes, too.
29191 2003-04-14 Miguel de Icaza <miguel@ximian.com>
29193 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
29195 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29197 * Makefile.am: re-added -m option when running cygpath. This way,
29198 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
29200 * mono-config.c: same codepath for locating mono config file for WIN32
29202 * assembly.c: if mono_assembly_setrootdir is called, don't override
29205 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29207 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
29208 MONO_ASSEMBLIES variable.
29210 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
29212 * icall.c: added Assembly::GetNamespaces() icall.
29214 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29216 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
29218 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
29220 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
29221 * object.c: fixed bug in the construction of vtable for proxies
29223 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
29225 * object.c (mono_array_new): Mark mono_array_new as an icall.
29227 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29229 * class.c: fixed test for public method when overriding interfaces.
29232 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
29234 * appdomain.h, domain.c: added mono_domain_foreach() to
29235 be able to access the currently loaded appdomains.
29236 * object.c: make string interning work across sppdomains.
29237 Mark some functions for use as icalls.
29239 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
29241 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
29243 * reflection.h reflection.c: Allocate long living data using
29244 GC_MALLOC_ATOMIC so the collector does not need to scan it.
29246 * reflection.c: Double the allocation size in streams instead of
29247 increasing it, to prevent unneccesary copying on large assemblies.
29249 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
29250 creation if the assembly does not have the Run flag set.
29252 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
29254 * class.h: avoid the C++ keywords in header files (Jerome Laban
29255 spotted and fixed this).
29257 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29260 (mono_unhandled_exception): fill in the arguments for the
29261 UnhandledException event. Only trigger that event for the default
29262 domain (as MS does).
29264 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
29266 * object.c: Improve typed allocation stuff based on suggestions from
29267 Paolo. Also turn it on if the GC library supports it.
29269 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
29271 * object.c object.h class.h: Added experimental typed allocation
29272 facility using the interfaces in gc_gcj.h.
29274 * os/gc_wrapper.h: Added new include files.
29276 2003-04-03 Martin Baulig <martin@ximian.com>
29278 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
29279 which is not yet enabled by default.
29281 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
29283 (mono_gc_lock, mono_gc_unlock): New static functions.
29285 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
29286 functions; stop/start the world for the garbage collector. This
29287 is using the windows API; we need to complete the SuspendThread()/
29288 ResumeThread() implementation in the io-layer to make this work on Unix.
29289 (mono_gc_push_all_stacks): New public function; tells the garbage
29290 collector about the stack pointers from all managed threads.
29292 2003-04-03 Martin Baulig <martin@ximian.com>
29294 * object.h (MonoThread): Added `gpointer stack_ptr'.
29296 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
29298 2003-04-03 Martin Baulig <martin@ximian.com>
29300 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
29302 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
29304 * reflection.c (typebuilder_setup_fields): Initialize field.first and
29307 2003-04-02 Miguel de Icaza <miguel@ximian.com>
29309 * loader.c (mono_lookup_internal_call): Report the corlib that is
29312 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
29314 * icall.c (ves_icall_type_GetTypeCode): fixed check for
29315 System.DBNull (it's class not valuetype).
29317 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
29319 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
29320 if the array method was already assigned a token (fixes bug#40646).
29322 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
29324 * reflection.c (mono_reflection_get_type): Attempt type resolve even
29325 if no assembly is given.
29327 2003-04-01 Miguel de Icaza <miguel@ximian.com>
29329 * metadata.h: Added the new tables.
29331 * row-indexes.h: Added definitions for new tables.
29333 * metadata.c: Add schemas for new tables, and add support for
29334 computing the sizes of them.
29336 * class.c: Update for handling the new type cases.
29338 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
29340 * metadata.h (MONO_TYPE_IS_VOID): new macro
29342 2003-03-31 Martin Baulig <martin@ximian.com>
29344 * threads.h (MonoThreadCallbacks): Added `thread_created'.
29346 * threads.c (mono_thread_new_init): Call `thread_created' in the
29347 mono_thread_callbacks.
29349 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
29351 * loader.h: added marshalbyrefobject_class to mono_defaults
29352 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
29353 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
29354 generation of output parameters.
29355 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
29356 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
29357 contextbound and the target object belongs to the context of the caller.
29358 * object.h: added context and unwrapped_server variables in MonoRealProxy.
29359 * object.c: Implemented support for interfaces and abstract classes
29360 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
29361 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
29363 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
29365 * class.h class.c (mono_class_is_subclass_of): New function.
29367 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
29368 routines for most common case (calls from ArrayList::ToArray).
29370 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
29371 routine so programs which call Environment::Exit() can be profiled.
29373 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
29374 Added MONO_ARCH_SAVE_REGS.
29376 * icall.c (ves_icall_type_is_subtype_of): Use new function.
29378 2003-03-29 Miguel de Icaza <miguel@ximian.com>
29380 * blob.h: Add a couple of new MonoType types definitions.
29382 * tabledefs.h: Add a couple of new call convs.
29384 2003-03-27 Zoltan Varga <vargaz@freemail.h>
29386 * reflection.h (MonoReflectionDynamicAssembly): track changes in
29387 the layout of the class.
29389 * reflection.c (alloc_table): double the size on overflow to avoid
29390 unnecessary copying.
29392 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
29393 avoid filling out metadata tables and blobs. Also set mb->ilgen to
29394 null so it can be garbage collected.
29396 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
29398 * reflection.c (mono_reflection_get_type): Return the resolved type
29399 only if it is in the assembly we searched.
29401 * reflection.c (ensure_runtime_vtable): Initialize method slots.
29403 * class.c (mono_class_setup_vtable): Set the slot of the overriding
29406 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29409 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
29410 the right one is 'file:///blah', but MS allows it.
29412 (mono_assembly_open): allow 'file://blah'
29414 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
29416 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
29418 * socket-io.c: fixes bug #40310.
29420 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
29422 * reflection.c (mono_reflection_parse_type): handle deeply nested
29425 * reflection.c (mono_image_create_token): Use unique token values
29426 since they will be put into a hash table.
29428 * class.c (mono_class_setup_vtable): If a method occurs in more than
29429 one place in the vtable, and it gets overriden, then change the
29430 other occurances too.
29432 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
29433 object as return type.
29435 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29437 * icall.c: Deleted "ToString" implementation for double and float
29438 because they are full implemented in managed code.
29440 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29442 * reflection.c, reflection.h: implemented and exported functions
29443 to retrieve info about custom attributes.
29445 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29447 * appdomain.c: moved Uri handling to assembly.c
29448 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
29449 work when using a file Uri in *nix and windows.
29451 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
29452 GetReferencedAssemblies.
29454 2003-03-18 Dick Porter <dick@ximian.com>
29456 * icall.c: Rename a couple of internal calls
29458 * threads.c: Set the thread state to Stopped when a thread exits.
29461 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
29463 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
29466 * object.c (mono_class_vtable): fix warning.
29468 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
29470 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
29472 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
29474 (method_encode_clauses): Create exception info structures in the right
29476 (mono_reflection_setup_internal_class): Initialize supertypes field.
29478 * class.c object.c: Handle interfaces which implement other interfaces
29481 * class.h class.c: Move the supertypes array initialization code into
29482 a separate function so it can be used for dynamic types too. Also call
29483 it earlier, in mono_class_init(), since it can be used before the
29484 type is initialized.
29486 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29490 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
29495 * object.c: remove warnings.
29497 2003-03-13 Martin Baulig <martin@ximian.com>
29499 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
29500 (MonoDebugLexicalBlockEntry): New types.
29502 * debug-mono-symfile.c
29503 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
29505 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29507 * process.c: ret can be any non-zero value accroding to MS doc.
29509 2003-03-07 Miguel de Icaza <miguel@ximian.com>
29511 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
29512 fixing a warning for a miss-used prototype, would have cause
29513 random memory corruption.
29515 2003-03-07 Martin Baulig <martin@ximian.com>
29517 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
29518 getting really annoying ....
29520 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
29522 * reflection.c (fixup_method): added support for array methods.
29524 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
29526 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
29527 (pointed out by Michael Adams).
29529 2003-03-04 Dick Porter <dick@ximian.com>
29531 * icall.c: Temporarily reverted the Double and Single ToString()
29532 change, because it broke nunit.
29534 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
29536 * object.h, threads.h: make include files compatible with C++
29537 (patch by Jerome Laban <jlaban@wanadoo.fr>).
29539 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29541 * icall.c: Erased ToString helper functions for Double and Single.
29542 Now, that implementations ar all in managed code (Double and Single
29545 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
29547 * appdomain.c: Added method for initializing the default context of
29548 a domain. Added internal call for getting the default context.
29549 * appdomain.h: Added context variable in MonoDomain struct.
29550 * domain.c: mono_domain_set also sets the default context of the domain
29551 * icall.c: Mapped internal method InternalGetDefaultContext.
29552 * object.c: mono_object_get_virtual_method returns always a remoting
29553 wrapper if the object is a transparent proxy.
29554 mono_runtime_invoke_array: when creating an object by calling the
29555 constructor, if the created object is a proxy, then the constructor should
29556 be called using the a remoting wrapper.
29558 2003-03-03 Dick Porter <dick@ximian.com>
29560 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
29561 variable so it compiles on solaris. Problem spotted by
29562 Christopher Taylor <ct@cs.clemson.edu>
29564 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29567 (get_info_from_assembly_name): don't leak value.
29570 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
29573 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
29575 * assembly.c: export mono_image_load_references ().
29576 * class.c: handle function pointers. mono_class_from_name() now
29577 supports nested type names directly.
29579 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
29581 * reflection.h reflection.c: Encode already created dynamic methods
29582 and fields correctly as a DEF instead of a REF.
29584 * reflection.c: Get rid of the force_ref argument to
29585 mono_image_typedef_or_ref since it was wrong in the first place.
29587 * string-icalls.c: add error checking to string constructors according
29590 * reflection.c: Emit types in the order their TypeBuilders were
29591 created. Previously, a new table index was assigned to each type before
29592 the tables were emitted. This was wrong because the signature blob
29593 might already refer to a type by its original table index.
29595 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
29597 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
29600 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29602 * Makefile.am: make assemblies dir have \ instead of / on windows.
29604 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
29606 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
29607 iterate over the NESTEDCLASS table using a linear search since the
29608 table is not guaranteed to be sorted by the secondary key.
29610 * class.c (mono_class_create_from_typedef): fixed up call to
29611 mono_metadata_nesting_typedef.
29613 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
29615 * marshal.c (mono_string_to_byvalstr): clear the memory as
29616 suggested by Jerome Laban <jlaban@wanadoo.fr>
29618 2003-02-26 Dick Porter <dick@ximian.com>
29620 * process.c: Cope with padding in .rsrc blocks
29622 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
29624 * metadata.h: reverted the filter_len change, it breaks reflection
29626 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
29628 * metadata.h: added a new field to store the filter_len
29631 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
29633 * reflection.c: handle custom attributes for types and members
29634 created with Reflection.Emit (bug#38422).
29636 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
29638 * reflection.c: define RTSpecialName automatically for constructors for
29639 compatibility with MS.NET.
29641 * reflection.c (mono_reflection_create_runtime_class): initialize
29642 nested_in field of dynamically created classes.
29644 2003-02-22 Martin Baulig <martin@ximian.com>
29646 * debug-mono-symfile.h: Incremented version number.
29648 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
29650 * object.h icall.c process.c: fix warnings.
29652 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
29654 * appdomain.h appdomain.c:
29655 (mono_domain_try_type_resolve): split the
29656 name_or_tb argument into a name and a tb argument.
29657 (mono_domain_has_type_resolve): new function to check whenever the
29658 application has registered a TypeResolve event handler.
29660 * icall.c reflection.h reflection.c: move the type resolve logic into
29661 mono_reflection_get_type () so it will be invoked when
29662 Assembly::GetType () is called.
29665 (mono_reflection_get_type): renamed to get_type_internal.
29666 (mono_reflection_get_type): fixed type name generation so it works
29667 for nested types too.
29668 (mono_reflection_get_type): call has_type_resolve () to avoid the
29669 costly type name generation if there is no resolve event handler.
29671 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29673 * class.c, image.c: load exported types from file references.
29675 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
29677 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
29678 used to cache the managed methods used to create proxies and make
29679 remote invocation of methods.
29680 * class.h: Added in MonoVTable a flag to indicate that a class needs
29681 to be remotely created.
29682 * object.c: Modified the method mono_class_vtable(). It now initializes
29683 the remote flag of the vtable. Modified mono_object_new_specific(),
29684 so now it checks the remote flag.
29685 * icall.c: Added a couple of internal methods, one for enabling instance
29686 creation interception for a type, and one for creating objects bypassing
29689 2003-02-18 Martin Baulig <martin@ximian.com>
29691 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
29692 New interncall to get a method's metadata token.
29694 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
29695 New interncall for the debugger.
29697 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
29699 * class.c (mono_class_setup_vtable): allocate supertype array
29701 2003-02-18 Martin Baulig <martin@ximian.com>
29703 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
29705 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29708 (assembly_name_to_aname): jump over unknown properties (i've found
29709 something like: 'type, assembly, version=xxx, custom=null, public...',
29710 so now will ignore custom=null and still get the rest of the values).
29712 2003-02-17 Dick Porter <dick@ximian.com>
29714 * threads.c: Have Thread.Start() wait for a semaphore to signal
29715 that the thread has set up all its local data. This fixes bug
29716 34323, where Abort() raced the new thread's TLS data.
29718 Also removes the handle_store() call from start_wrapper, because
29719 threads are now always created suspended and there is no longer a
29720 race between the parent and child threads to store the info.
29722 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
29724 * image.c: explain the #- heap issue in a message, hopefully
29725 avoiding FAQs on mono-list.
29727 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29730 (GetEntryAssembly): if the domain has not invoked
29731 AppDomain.ExecuteAssembly yet, return the assembly of the default
29734 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
29736 * class.c (mono_ldtoken): make it work in dynamic assemblies.
29738 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
29740 * metadata.c, reflection.c: simple speedup to type hash
29743 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
29745 * image.c, image.h, class.c, assembly.c: move module loading
29746 to MonoImage. When loading metadata, consider alignemnet from
29747 the start of metadata, not from the metadata address in memory.
29749 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
29751 * reflection.c (mono_reflection_get_custom_attrs): Added support for
29752 AssemblyBuilder objects. Factored out custom attribute creation into
29753 a separate function.
29754 (create_custom_attr): new function to create custom attributes.
29756 2003-02-12 Miguel de Icaza <miguel@ximian.com>
29758 * Makefile.am: Got tired of typing the full pathname to pedump.
29759 Until there is another option, am installing this.
29761 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
29763 * class.c (class_compute_field_layout): always set field->parent
29764 (mono_ldtoken): use mono_defaults.fieldhandle_class;
29766 2003-02-11 Dick Porter <dick@ximian.com>
29769 * monitor.c: Rewrote Monitor, making lock much faster and
29770 Pulse/Wait work as specified. Also uses much fewer handles, and only
29771 creates them as needed.
29773 * exception.c: Added SynchronizationLockException
29775 * threads.c: Deleted old Monitor implementation. The new one is
29778 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
29780 * class.c: handled TypedReference type code. Set the correct size for
29781 class data. Setup interface_offsets for interface classes, too.
29783 2003-02-09 Martin Baulig <martin@ximian.com>
29785 * debug-mono-symfile.h: Reflect latest symbol writer changes.
29787 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
29789 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
29790 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
29791 * object.c: fixed mono_object_get_virtual_method () for interfaces.
29792 * verify.c: check for code that runs after the end of the method.
29794 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29796 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
29797 "System.Math::Round2".
29798 * sysmath.h: Added Floor, Round and Round2 definitions.
29799 * sysmath.c: Modified certain functions that were not 100% compliant
29800 with MS.NET (math precision) and added the implementation of Floor,
29803 2003-02-07 Martin Baulig <martin@ximian.com>
29805 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
29807 2003-02-07 Martin Baulig <martin@ximian.com>
29809 * debug-mono-symfile.c: Reflected latest symwriter changes.
29810 (mono_debug_create_mono_symbol_file): Removed.
29811 (mono_debug_open_mono_symbol_file): Take an argument which
29812 specifies whether to create a dynamic symbol file.
29814 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
29816 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
29818 2003-02-05 Martin Baulig <martin@ximian.com>
29820 * reflection.c (mono_image_build_metadata): Make this public,
29821 protect it against being called multiple times, don't create
29822 resources and don't build the compressed metadata here.
29823 (mono_image_create_pefile): Do this here.
29826 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
29828 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29830 * socket-io.c: fixed bug #36322.
29832 2003-02-06 Piers Haken <piersh@friskit.com>
29836 * debug-mono-symfile.c:
29842 * socket-io.c: warning cleanups
29844 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
29846 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
29847 function. works like remoting invoke, but does a check for the Proxy first.
29849 2003-02-05 Miguel de Icaza <miguel@ximian.com>
29851 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
29853 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
29855 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
29857 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
29858 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
29860 * object.c (mono_store_remote_field_new): used by the new jit
29861 instead of mono_store_remote_field
29862 (mono_load_remote_field_new): used by the new jit
29863 instead of mono_load_remote_field
29865 2003-02-05 Patrik Torstensson
29867 * appdomain.c: changed unload to take the domain id instead
29870 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
29873 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29875 * appdomain.c: don't look for assemblies in ApplicationBase if
29876 PrivateBinPathProbe is set.
29878 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29880 * object.c: make the first argument in main_args contain the absolute
29881 path to the assembly. Fixes bug #37511.
29883 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29885 * icall.c: get correct UTC offset for countries not using daylight
29886 time saving. Fixes bug #30030.
29888 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29890 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
29891 and 1 are the family).
29893 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
29895 * icall.c (ves_icall_InternalExecute): removed wrong assertion
29897 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
29899 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
29901 * reflection.c: added support for SignatureHelper tokens, which is
29902 needed by the Calli opcode.
29904 * reflection.h: track changes to SignatureHelper class.
29906 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
29908 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29910 * appdomain.c: fixed loading assemblies from PrivateBinPath.
29912 2003-02-03 Patrik Torstensson
29913 * appdomain.[c|h], domain.c :
29914 - Added support for getting a domain via domain id
29915 - Support for setting and getting domain from System.AppDomain
29916 (used in cross appdomain channel)
29917 - Added support for get/set for a MonoAppContext on a thread
29918 (Context class in System.Runtime.Remoting.Contexts),
29919 - Removed hack in Get/SetData and ExecuteAssembly.
29921 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
29922 the managed world to get control when a proxy is created.
29924 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
29926 2003-02-03 Miguel de Icaza <miguel@ximian.com>
29929 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29930 Populate the codebase field as well.
29932 2003-02-02 Martin Baulig <martin@ximian.com>
29934 * debug-mono-symfile.c
29935 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
29936 (mono_debug_symfile_add_method): Allow interncalls.
29938 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29940 * icall.c: throw parse exception if strtod fails or the string is empty.
29942 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
29944 * marshal.c: handle object type separately from defined
29947 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
29949 * marshal.c: handle NATIVE_LPSTR for strings when it's
29950 explicitly specified.
29952 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
29954 * reflection.c, reflection.h, icall.c: setup the reflection
29955 handle cache for ModuleBuilders and AssemblyBuilders.
29957 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
29959 * reflection.c (reflection_methodbuilder_to_mono_method): set
29962 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29964 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
29966 2003-01-29 Dick Porter <dick@ximian.com>
29968 * threads.c: No need for the fake_thread kludge now that Thread
29969 doesn't run a class constructor
29971 2003-01-29 Dick Porter <dick@ximian.com>
29973 * threads.c: Use g_direct_hash instead of the rather bogus
29976 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
29978 * marshal.c (mono_marshal_get_native_wrapper): add check for null
29979 (fix pinvoke12.exe)
29980 (mono_marshal_get_struct_to_ptr): generate valid IL code
29981 (mono_marshal_get_ptr_to_struct): generate valid IL code
29982 (*): correctly set sig->pinvoke, we need to memdup the signature
29985 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29987 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
29988 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
29990 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29992 * profiler.c: provide more callers information.
29994 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
29996 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
29998 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
30000 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
30002 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30004 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
30005 exception instead of going into an infinite loop on dates which it
30008 * string-icalls.c (ves_icall_System_String_get_Chars): raise
30009 out-of-range exception if needed.
30011 * class.c (mono_class_setup_vtable): allow a virtual method to provide
30012 an implementation for an interface method and to override an inherited
30013 method at the same time.
30014 Imagine a scenario when a virtual method is used to override a
30015 virtual abstract method in a parent class, and this same method
30016 provides an implementation for an method inherited from an interface.
30017 In this case, the interface resolution code will set im->slot, which
30018 means that the virtual method override pass will skip this method
30019 which means a pointer to the abstract method inherited from the parent
30020 will remain in the vtable of this non-abstract class.
30022 * class.c: (mono_class_setup_vtable): continue search for a real
30023 method if only an abstract method is found.
30025 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
30027 * reflection.c: add size to encoding for ByValStr and ByValArray
30028 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
30030 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30032 * class.c (mono_class_setup_vtable): pass the override info as an
30035 * class.c (mono_class_setup_vtable): set the slot of overriding methods
30038 * reflection.c (ensure_runtime_vtable); add support for method
30041 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30043 * reflection.c (resolution_scope_from_image): Hack to work to work with
30044 dynamic assemblies.
30046 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
30047 added a 'force_ref' argument to force this function to allways return
30048 a TypeRef. This is needed by mono_image_get_memberref_token ().
30050 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30052 * reflection.c (mono_image_get_type_info): interfaces really don't have
30055 * reflection.c (mono_image_basic_init): fill out missing fields of
30058 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
30059 dynamic assemblies. This is required so dynamic assemblies show up in
30060 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
30061 Type::GetType() etc. This is consistent with MS behaviour.
30063 * image.c image.h reflection.c: add newly created classes to the name
30064 cache so mono_class_get () will find them.
30066 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30068 First part of changes to get IKVM.NET running under mono.
30070 * appdomain.h, appdomain.c: added new function
30071 mono_domain_try_type_resolve() which will emit TypeResolve events.
30072 This function will call AppDomain::DoTypeResolve to do the actual work.
30074 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
30075 moved existing code dealing with dynamic tokens to a new function
30076 called mono_reflection_lookup_dynamic_token (). This function will
30077 raise TypeResolve events when appropriate. Since reflection.c is not
30078 part of libmetadata, a new hook function called
30079 mono_lookup_dynamic_token() is added to class.c which will call this.
30081 * assembly.h assembly.c: make the invoke_load_hook function public,
30082 so it can be called for dynamic assemblies.
30084 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
30086 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
30089 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
30090 MonoGHashTable, since it contains pointers to objects which the GC
30093 * assembly.c (search_loaded): remove unused variable.
30095 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
30097 * object.c: fixed issue exposed by gcc-generated IL programs
30098 that use RVA data for pointers.
30100 2003-01-25 Martin Baulig <martin@ximian.com>
30102 * threads.c (start_wrapper): Moved the initialization of
30103 `start_func' above the mono_new_thread_init() call to which we
30104 pass it as argument.
30106 2003-01-24 Martin Baulig <martin@ximian.com>
30108 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
30109 the MonoThread pointer.
30111 2003-01-21 Miguel de Icaza <miguel@ximian.com>
30113 * icall.c: Rename `PowImpl' to Pow.
30115 2003-01-23 Dick Porter <dick@ximian.com>
30117 * threads.c (start_wrapper): Create a Thread object if needed, so
30118 the Main() thread can do the class initialisation in a subthread
30119 that has been set up to allow managed code execution.
30121 Pass the thread ID instead of the MonoThread pointer to the thread
30122 start and attach callbacks. This change is required, because the
30123 jit thread start callback must be called _before_ the Thread
30124 object can be created.
30126 (mono_thread_init): Removed much object creation code that is no
30127 longer needed. No managed code is called from here now.
30129 * object.c (mono_runtime_exec_managed_code): Create a subthread
30130 for Main, and call back to the runtime to use it.
30131 Set the exit code when Main exits.
30133 * gc.c: Make sure domain finalisation happens in a subthread.
30134 Re-enable threaded GC, fixing bug 31333 (again).
30136 * environment.c: System.Environment internall calls (so far just
30137 ExitCode is here, the others are still in icall.c)
30139 * appdomain.c (mono_runtime_cleanup): All threads running managed
30140 code should have finished before mono_runtime_cleanup() is
30141 reached, so no need to clean up threads.
30143 2003-01-22 Martin Baulig <martin@ximian.com>
30145 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
30146 `gpointer func' arguments.
30147 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
30148 but added `MonoThread *thread' argument.
30149 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
30151 * threads.c (mono_new_thread_init): Added `gpointer func' argument
30152 and pass it to the mono_thread_start_cb callback.
30153 (mono_install_thread_callbacks): New public function to install a
30154 set of callbacks which are set by the debugger.
30155 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
30157 2003-01-22 Martin Baulig <martin@ximian.com>
30159 * Makefile.am: Install debug-mono-symfile.h.
30161 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
30163 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
30165 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
30167 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
30168 * class.c (mono_ptr_class_get): correctly set access levels of pointers
30169 (mono_array_class_get): correctly set access levels of arrays
30171 2003-01-20 Patrik Torstensson
30172 * image.h (MonoAssemblyName): changed major, minor, build, revision
30173 from signed to unsigned.
30175 2003-01-20 sean kasun <skasun@azstarnet.com>
30177 * reflection.c (load_cattr_value): Now this handles
30178 MONO_TYPE_SZARRAY. Fixes bug #35629
30180 2003-01-20 Miguel de Icaza <miguel@ximian.com>
30182 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
30185 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30187 * decimal.c: fixed bug #26056.
30189 2003-01-17 Martin Baulig <martin@ximian.com>
30191 * gc.c: Raise an ExecutionEngineException instead of using g_error().
30193 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30196 (mono_get_exception_type_initialization): new function.
30198 * object.c: throw a TypeInitializationException when an exception is
30199 thrown invoking the class constructor.
30201 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30203 * reflection.c: fixed attribute reading.
30205 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30208 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
30209 provided, look for the type in the calling assembly and then in
30210 mscorlib; if the assembly name is provided, only try that one.
30212 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
30214 * object.c: register the vtable before there is a chance it's
30215 queried again recursively.
30217 2003-01-13 Duncan Mak <duncan@ximian.com>
30219 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
30222 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
30224 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
30226 2003-01-11 Martin Baulig <martin@ximian.com>
30228 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
30229 this to 20 for the release.
30231 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
30233 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
30235 * loader.c (mono_method_get_marshal_info): bug fix
30237 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
30238 structures with explicit layout
30240 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
30242 * profiler.c: made the output more readable (and sorted).
30243 Added caller information for the allocation profiler.
30245 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
30247 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
30249 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30251 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
30252 to get value types.
30254 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
30256 * object.c, profiler.h, profiler.c, profiler-private.h:
30257 Added object allocation profiler.
30259 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
30261 * reflection.h, reflection.c: handle global methods.
30262 Compress blob entries.
30264 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
30266 * marshal.c: fix compilation.
30268 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
30270 * loader.c (mono_method_get_marshal_info): impl.
30272 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
30274 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30276 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
30277 for reference types.
30279 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
30281 * loader.c: fixed off by one error in loaded parameter names.
30283 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
30285 * marshal.c (mono_marshal_get_icall_wrapper): like
30286 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
30287 instead of a MonoMethod.
30289 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30291 * decimal.c: fixed bug #36537.
30293 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
30295 * marshal.c: throw a missing method exception if a
30296 P/Invoke method is not found.
30298 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
30300 * icall.c: allow a null this for constructors.
30302 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
30304 * icall.c: raise the proper exceptions if the arguments to the
30305 internal Invoke are incorrect.
30307 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
30309 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
30311 2003-01-03 Martin Baulig <martin@ximian.com>
30313 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
30315 2002-12-31 Martin Baulig <martin@ximian.com>
30317 * debug-mono-symfile.c: Completely rewrote the type section.
30318 Instead of using individual malloc()ed fields, we use one big
30319 continuous memory area and offsets into this area.
30320 See the comments in the source code for details.
30322 2002-12-30 Martin Baulig <martin@ximian.com>
30324 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
30326 2002-12-30 Martin Baulig <martin@ximian.com>
30328 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
30329 line number table in this data blob instead of using an external
30332 2002-12-28 Martin Baulig <martin@ximian.com>
30334 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
30336 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
30338 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
30339 as a boxed return type.
30341 2002-12-21 Miguel de Icaza <miguel@ximian.com>
30344 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
30345 g_build_filename to properly get separators on the filename created.
30347 * object.h: Small change, introduce MonoMarshalByRefObject to
30348 track the layout of that structure in the C# universe as we make
30351 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
30353 * object.c: removed assert to allow static fields on interfaces.
30354 * loader.c: a TypeSpec may be used for any type, not just arrays.
30356 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
30358 * class.c, class.h: added mono_class_array_element_size ().
30359 Ignore static methods in interfaces.
30361 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30363 * threads.c: fixed the build under cygwin.
30365 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
30367 * reflection.c: handle nullref constants. Allocate keys for
30368 reflection handles with the GC.
30370 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
30372 * threads.c, threads.h: added mono_thread_get_abort_signal()
30373 to get a suitable signal for thread abort.
30375 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
30377 * metadata.c: fix handling of ExportedType table.
30379 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30381 * icall.c: added WriteWindowsDebugString internal call.
30383 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30385 * reflection.h: added fields to match C# implementation.
30387 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30389 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
30391 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
30393 * gc.h, gc-internal.h: Rename header for GC internal calls to
30394 gc-internal.h from gc.h as to not clash with Boehm GC having its
30395 header installed as <gc.h> in outside include paths.
30396 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
30397 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
30399 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30401 * icall.c: assign minor, build and revision in FillName.
30403 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
30405 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
30406 Added support for running code generated by Reflection.Emit.
30408 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30410 * appdomain.c: check for NULL argument in LoadFrom.
30412 2002-12-10 Dick Porter <dick@ximian.com>
30414 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
30416 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30418 * appdomain.c: fix buglet when building exe file name. Handle full
30419 assembly name (needed after latest changes to AssemblyName).
30421 (mono_image_close): free some hashtables.
30423 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
30425 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
30426 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
30427 on some systems (redhat 7.3)
30429 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
30431 * threads.c: delete the critical section of a sync block,
30432 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
30434 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
30436 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
30438 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30440 * appdomain.[ch]: handle the assembly preload event to try loading the
30441 assemblies using the paths we have in the current domain.
30443 * assembly.[ch]: created an assembly preload hook that is called to try
30444 loading the assembly by other means that the ones provided here.
30446 * domain.c: initialize the domain search path.
30448 From now on, assemblies (TODO: except corlib and System) are loaded
30449 according to these rules when using mono_assembly_load ():
30451 1. It tries to load the assembly from the ApplicationBase
30452 of the current domain appending .dll and .exe (TODO: have to
30453 try loading from name/name.dll and name/name.exe).
30455 2. It tries the search path specified in PrivateBinPath for the
30456 current domain (if any).
30458 3. Previous behavior.
30460 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
30462 * icall.c: implemented GetInterfaceMap() related icall.
30463 * domain.c, loader.h: load MethodInfo in mono_defaults.
30465 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
30467 * gc.c: disable the finalizer thread for now, untill all the issues
30468 with it are resolved.
30470 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
30472 * string-icalls.c: handle embedded nulls in string ctor when the
30473 length is specified.
30475 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
30477 * class.c: look for explicit interface implementation in parent
30480 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
30482 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
30484 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
30486 * gc.c: protect handles with a critical section.
30488 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30491 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
30492 parameters. If no assembly specified, try getting the type from all
30493 the assemblies in the current domain, else, load the assembly and get
30496 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30498 * marshal.c: applied patch from Aleksey Demakov that fixes
30499 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
30501 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30503 * icall.c: fixed get_location.
30505 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
30507 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
30508 declarations to make it work with older gcc.
30510 * loader.c (mono_get_method): set signature->pinvoke for native calls
30512 2002-11-20 Dick Porter <dick@ximian.com>
30514 * threads.c (mono_thread_init): Set the main thread's handle
30516 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
30518 * gc.c: allow compilation without GC support. Changed to match the
30521 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
30523 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
30525 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
30527 * reflection.c: set a public key token on the core assemblies.
30529 2002-11-18 Dick Porter <dick@ximian.com>
30531 * threads.c: Split out some thread initialisation so that other
30532 files can set the start callback function.
30534 * gc.c: Run finalisers in a separate thread, to avoid stack
30535 overflow. Fixes bug 31333.
30537 * appdomain.c: Set up GC finalisation thread.
30541 * domain.c: Use gc.h macros for GC_malloc
30543 2002-11-15 Dick Porter <dick@ximian.com>
30547 * appdomain.c: Removed mono_runtime_init_with_attach(),
30548 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
30549 merging the extra parameter with the existing function. Removed
30550 unneeded code in mono_thread_attach().
30552 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
30554 * image.c (mono_image_loaded_by_guid): a method to get loaded
30556 (load_metadata_ptrs): we store the guid as string.
30558 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
30560 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
30562 * metadata.c (mono_guid_to_string): imported method form Zoltan
30563 Varga (slightly modified)
30565 * assembly.c (mono_assembly_open): load precompiled code
30567 * loader.h (MonoMethod): we store the method token for use in the
30570 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30572 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
30573 the hook function called when an assembly is loaded.
30575 * domain.c: Modified file.
30576 (mono_domain_assembly_load): removed hash table insertion of assemblies.
30580 2002-11-07 Miguel de Icaza <miguel@ximian.com>
30582 * reflection.c: Map PEFileKind to the value expected by the WinNT
30585 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30587 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
30588 Read until the buffer is filled completely.
30590 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30592 * icall.c: implemented MonoType.InternalGetEvent ().
30594 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30596 * appdomain.c: implemented InitAppDomainSetup. Delayed
30597 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
30598 the entry_assembly.
30600 * assembly.c: base_dir is now an absolute path ending with
30603 * icall.c: modified get_location according to the above changes.
30605 * object.c: init AppDomain.SetupInformation for the default domain after
30606 we have the entry assembly.
30608 * domain.c: when unloading a domain, setup = NULL.
30610 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
30612 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
30614 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
30616 * object.h, object.c: introduced mono_object_get_virtual_method ()
30617 to lookup the method invoked on an object when a callvirt is done on
30619 * icall.c: make MethodInfo::Invoke() always do a virtual call.
30621 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30623 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
30624 current domain when loaded an assembly and failed to load it.
30626 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
30628 2002-10-31 Dick Porter <dick@ximian.com>
30632 * file-io.c: Return the error status in a parameter, as the
30633 GetLastError() value has long since been blown away if we try and
30634 look it up in a subsequent internal call invocation. Delete the
30635 GetLastError() internal call, because it's useless.
30637 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
30639 * class.[ch]: added cast_class to fix bug 29517
30641 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
30643 * marshal.c: create valid IL code in the filter clause:
30644 the new JIT is less forgiving:-)
30646 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30648 * icall.c: removed get_property internal call.
30650 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
30652 * appdomain.h domain.c: Added an ID to appdomains.
30654 * threads.c threads.h icall.c: Implement icall
30655 Thread:GetDomainID(), and remove unused icall
30656 CurrentThreadDomain_internal.
30658 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30660 * icall.c: Don't recurse through the base types in GetConstructor.
30663 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
30665 * mempool.h, mempool.c: added mono_mempool_empty() and
30666 mono_mempool_stats().
30668 2002-10-23 Dick Porter <dick@ximian.com>
30672 * icall.c: Added MonoIO.GetFileType internal call
30674 2002-10-17 Dick Porter <dick@ximian.com>
30676 * appdomain.c (mono_runtime_cleanup): Don't signal the async
30677 delegate semaphore before waiting for all threads to finish,
30678 because new threads can also call async delegates. Fixes bug
30681 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
30682 of 3 seconds, in case another async job is queued. (This part is
30683 needed because the bug fix reintroduced the 3s exit lag.) This
30684 makes the mono_runtime_shutdown flag superfluous.
30686 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
30688 * reflection.c: include ehader size in method section headers.
30689 Really check for suplicated modules entries.
30691 2002-10-17 Martin Baulig <martin@gnome.org>
30693 * debug-mono-symfile.c: Added back support for locals.
30695 2002-10-14 Martin Baulig <martin@gnome.org>
30697 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
30700 2002-10-14 Martin Baulig <martin@gnome.org>
30702 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
30703 mono_class_get() instead of looking in the class cache.
30705 2002-10-13 Martin Baulig <martin@gnome.org>
30707 * debug-mono-symfile.c: Set version number to 28, include the
30708 signature in method names.
30710 2002-10-13 Martin Baulig <martin@gnome.org>
30712 * debug-mono-symfile.h: Set version number to 27.
30714 2002-10-11 Martin Baulig <martin@gnome.org>
30716 * gc.c: Don't register/unregister NULL pointers as disappearing links.
30718 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30720 * metadata.c, metadata.h: added helper function to allocate signatures.
30722 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30724 * icall.c: added internal call to get the location of machine.config.
30726 2002-10-08 Martin Baulig <martin@gnome.org>
30728 * debug-mono-symfile.c: Ignore classes with a pending init for the
30731 2002-10-03 Dick Porter <dick@ximian.com>
30733 * threads.c: Freebsd pthread_t is a pointer
30735 2002-10-03 Dick Porter <dick@ximian.com>
30737 * socket-io.c: Implemented GetHostName_internal
30739 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30742 (mono_config_parse_file): don't leak the text.
30744 2002-10-02 Martin Baulig <martin@gnome.org>
30746 * debug-mono-symfile.c: Added support for methods.
30748 2002-10-01 Martin Baulig <martin@gnome.org>
30750 * debug-mono-symfile.c: Don't emit methods and line numbers for
30751 the dynamic symbol file, just write the type table. We can easily
30752 have an external helper program which creates a symbol file for an
30755 2002-10-01 Dick Porter <dick@ximian.com>
30757 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
30758 Only add the handle to the cleanup array when we're about to
30759 launch the thread. Bug 31425 deadlocked when the test was run on
30762 2002-10-01 Martin Baulig <martin@gnome.org>
30764 * debug-mono-symfile.c: Added support for properties.
30766 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30768 * reflection.c: unaligned store fix from Mark Crichton
30769 <crichton@gimp.org>.
30771 2002-09-27 Martin Baulig <martin@gnome.org>
30773 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
30776 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
30778 * assembly.h, assembly.c: use a sane API to hook into the assembly
30779 loading process instead of a useless special-purpouse hack
30780 (ngen needs a hook, too, for example).
30782 2002-09-27 Dick Porter <dick@ximian.com>
30784 * threads.c (mono_thread_init): Call GetCurrentProcess() so
30785 io-layer can set up some process handle info. Not needed on w32,
30786 but doesn't hurt either.
30788 * process.c: Pass the program name in the second parameter to
30789 CreateProcess, so the path is searched. Include the working
30790 directory. Implemented process name, process enumeration, and some
30791 process detail internal calls.
30793 * icall.c: Added internal calls for process lookup, and some
30796 2002-09-26 Martin Baulig <martin@gnome.org>
30798 * assembly.c (mono_install_open_assembly_hook): New global
30799 function to install a function to be invoked each time a new
30800 assembly is loaded.
30801 (mono_assembly_open): Run this callback function if set.
30803 * debug-mono-symfile.c: Put back line numbers for the dynamic
30804 symbol file and also record the .il file as source file. This
30805 allows us to install the temporary symbol file as `file.dbg' just
30806 like a compiler-generated one.
30808 2002-09-26 Nick Zigarovich <nick@chemlab.org>
30810 * Corrected typo in gc.c (BOHEM vs BOEHM).
30812 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30814 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
30815 GetProperties. Also avoid calling g_slist_length in GetProperties and
30818 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30820 * reflection.c: avoid unaligned stores (bug spotted by
30821 Mark Crichton <crichton@gimp.org>).
30823 2002-09-25 Martin Baulig <martin@gnome.org>
30825 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
30826 instead of guint64 for addresses and added prologue/epilogue info.
30828 2002-09-25 Martin Baulig <martin@gnome.org>
30830 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
30831 store line number info. For the dynamic symbol file, we only need
30832 to provide the JIT generated dynamic line number info for the dynamic
30835 2002-09-25 Martin Baulig <martin@gnome.org>
30837 * debug-mono-symfile.h: Incremented version number.
30839 2002-09-24 Martin Baulig <martin@gnome.org>
30841 * class.c (mono_debugger_class_init_func): New global function
30843 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
30846 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
30847 function. This is called via the mono_debugger_class_init_func
30848 hook to add all types to the dynamic type table.
30849 (ves_icall_MonoDebugger_GetType): New interncall to get a class
30850 from its metadata token.
30852 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
30853 New interncall for the debugger.
30855 2002-09-24 Nick Drochak <ndrochak@gol.com>
30857 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
30858 before using it in case it is null.
30860 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30862 * metadata.c: allow custom modifiers in local var signatures
30863 (bug spotted by Zoltan Varga).
30865 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
30867 * class.c: deal with the <Module> class that may have a NULL vtable.
30868 Eliminate warnings.
30870 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30872 * image.c, image.h: more strong name helpers.
30873 * monosn.c: more work: convert pem keys to cryptoapi format.
30875 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30877 * string-icalls.c: speedup IndexOf.
30879 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30881 * icall.c: updates from Zoltan.2.Varga@nokia.com.
30883 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30885 * icall.c: cleanup: use mono_object_domain ().
30887 2002-09-23 Martin Baulig <martin@gnome.org>
30889 * debug-mono-symfile.c: Improved type support.
30891 2002-09-22 Martin Baulig <martin@gnome.org>
30893 * debug-mono-symfile.c: Added support for reference types and strings.
30895 2002-09-22 Martin Baulig <martin@gnome.org>
30897 * debug-mono-symfile.c: Started to work on the type table.
30899 2002-09-21 Martin Baulig <martin@gnome.org>
30901 * debug-mono-symfile.c: Largely reworked the symbol table format.
30902 The symbol table is now incrementally updated each time a new
30903 method is added. We're now also using our own magic and version
30904 so that you don't need to recompile all your classes if the
30905 dynamic table changes.
30906 (mono_debug_update_mono_symbol_file): Removed.
30907 (mono_debug_symfile_add_method): New function to add a method.
30909 2002-09-21 Martin Baulig <martin@gnome.org>
30912 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
30915 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
30916 New interncall to get a method from its metadata token.
30918 2002-09-21 Martin Baulig <martin@gnome.org>
30920 * debug-mono-symfile.c: Create type table.
30922 2002-09-20 Martin Baulig <martin@gnome.org>
30924 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
30926 2002-09-20 Martin Baulig <martin@gnome.org>
30928 * debug-mono-symfile.c: Provide information about params and locals.
30930 2002-09-20 Martin Baulig <martin@gnome.org>
30932 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
30935 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
30936 interncall to get a method from its metadata token.
30938 2002-09-20 Martin Baulig <martin@gnome.org>
30940 * debug-mono-symfile.c: Added a few checks for method->header
30941 being non-NULL. This should never happen, but for the moment
30942 let's use a g_warning() rather than a g_assert().
30944 2002-09-19 Mark Crichton <crichton@gimp.org>
30946 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
30947 even if support for it isn't present. Added an #ifdef to fix this.
30949 * socket-io.c: Added checks back for Solaris support.
30951 2002-09-19 Martin Baulig <martin@gnome.org>
30953 * debug-mono-symfile.c (read_string, write_string): Reflect latest
30954 changes in the symbol file format.
30956 2002-09-18 Martin Baulig <martin@gnome.org>
30958 * debug-mono-symfile.c: Set version number to 21.
30960 2002-09-18 Dick Porter <dick@ximian.com>
30962 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
30963 on netbsd. Fixes bug 30051.
30965 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30968 (set_version_from_string): little fix.
30970 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30972 * monosn.c, Makefile.am: added strong name utility.
30973 * reflection.h, reflection.c: implemented delayed signing,
30974 locale, version and hash id assembly attributes.
30976 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30978 * loader.c, metadata.c: load param attributes in signatures.
30980 2002-09-16 Martin Baulig <martin@gnome.org>
30982 * debug-mono-symfile.c: Added string table with all method names.
30984 2002-09-14 Martin Baulig <martin@gnome.org>
30986 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
30987 fast method lookup.
30989 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30991 * reflection.c: record the public key token of referenced assemblies.
30993 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30995 * image.c, image.h: added functions to get the strong name and the
30996 public key of an assembly.
30997 * pedump.c: use them.
30999 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
31001 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
31003 2002-09-12 Miguel de Icaza <miguel@ximian.com>
31005 * marshal.c (mono_marshal_get_managed_wrapper): Added
31008 2002-09-11 Martin Baulig <martin@gnome.org>
31010 * gc.c: Call GC_unregister_disappearing_link() on all links when
31011 finalizing them, this is necessary to aviod a crash in boehm's
31014 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31016 * gc.c: handle GetTarget for finalized objects spotted and fixed by
31019 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31021 * icall.c: implemented MonoType::Module.
31022 * reflection.c, reflection.h: mono_module_get_object () from
31023 Tomi Pakarinen <tomi.pakarinen@welho.com>.
31025 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31027 * icall.c: ignore overridden methods in GetMethods ().
31028 Fix for FieldInfo::SetValue().
31029 * object.c: handle float/double in runtime invoke.
31031 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31033 * object.c: allow a constructor to be called again on an object.
31035 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31037 * class.h, class.c: move field layout code to it's own function and
31038 export it. Get an interface id earlier. Move fields in MonoClass
31039 so they are more cache friendly and align the bitfields.
31040 * loader.c: temporary handle get_param_names() for a runtime method.
31041 * reflection.c, reflection.h: more code to handle runtime creation of
31044 2002-09-09 Martin Baulig <martin@gnome.org>
31046 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
31047 signature with the pinvoke field being set for the actual call.
31049 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31051 * icall.c: removed some unused icalls. Start of map of glib charsets
31052 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
31054 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31056 * debug-helpers.c: break infinite loop (found and fixed by
31057 Holger Arnold <harnold@gmx.de>).
31059 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31061 * icall.c: target may be null in create_delegate.
31063 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31065 * marshal.c: handle a boolean return type.
31067 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31069 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
31071 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31073 * gc.c: fix weakreferences.
31075 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31077 * icall.c: added icall to get default codepage.
31079 2002-09-03 Dick Porter <dick@ximian.com>
31082 * threads.c: Use MonoThread instead of MonoObject where
31085 Store running thread objects in a hash table, so that we have all
31086 the info to hand when waiting for them to finish
31087 (means we don't need OpenThread() any more, so mingw builds should
31088 be fully functional again.)
31091 * object.h: Added thread ID to MonoThread
31093 2002-09-03 Martin Baulig <martin@gnome.org>
31095 * icall.c (System.Reflection.Assembly::get_location): New interncall.
31097 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31099 * icall.c: fixed leak in get_temp_path. Thanks lupus.
31101 2002-09-03 Martin Baulig <martin@gnome.org>
31103 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
31104 argument to store the end address of the disassembled instruction.
31106 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
31107 here from debug-symfile.h.
31108 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
31109 JIT into this struct.
31110 (MonoSymbolFile): Added `char *image_file' field.
31111 (MonoDebugGetMethodFunc): Removed.
31112 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
31113 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
31114 (mono_debug_find_method): New method.
31116 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
31117 create a full symbol file.
31118 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
31119 and static symbol files.
31120 (mono_debug_find_method): The symbol file keeps an internal method hash,
31121 call this to get a MonoDebugMethodInfo from a MonoMethod.
31123 * debug-symfile.[ch]: Removed.
31125 2002-08-29 Miguel de Icaza <miguel@ximian.com>
31127 * image.c (do_mono_image_open): Remove linker version check.
31129 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
31131 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
31132 wrappers for instance methods.
31134 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31136 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
31138 2002-08-28 Dick Porter <dick@ximian.com>
31140 * Makefile.am: Export HOST_CC for w32 builds
31142 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31144 * file-io.c process.c: MonoString are null terminated, no
31145 need for mono_string_to_utf16() anymore.
31147 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31149 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
31151 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
31153 * icall.c, reflection.h: speedup System.MonoType.
31155 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31157 * reflection.c: allow null as the value of a string argument in
31158 custom attributes constructors.
31160 2002-08-27 Martin Baulig <martin@gnome.org>
31162 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
31163 `trampoline_address' field.
31165 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
31167 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
31168 check (fixes bug #29486)
31170 2002-08-27 Martin Baulig <martin@gnome.org>
31172 * debug-mono-symfile.c: Changed the file format in a way that allows us
31173 open it read-only and to use a specially malloced area for all the
31174 dynamic data. We can now also generate a symbol file on-the-fly if we're
31175 debugging IL code and there is no MCS generated symbol file for it.
31177 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31179 * object.c: added a define for a good string and array
31180 creation speedup (not enabled by default because we need to deal with
31183 2002-08-26 Martin Baulig <martin@gnome.org>
31185 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
31186 function to create a dynamic symbol file. This is used by the
31187 debugger to create a symbol file for IL code on-the-fly.
31189 2002-08-26 Martin Baulig <martin@gnome.org>
31191 * loader.c (mono_lookup_pinvoke_call): Include the error message
31192 from g_module_error() in the error message.
31194 2002-08-24 Martin Baulig <martin@gnome.org>
31196 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
31197 function to update the symbol file. The symbol file is mmap()ed
31198 writable, but private. This allows us to install the symbol file
31199 together with the assembly.
31201 2002-08-24 Martin Baulig <martin@gnome.org>
31203 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
31204 but they can read the new symbol file format which mcs is now creating.
31206 * debug-symfile.c (mono_debug_find_source_location): Moved to
31207 debug-mono-symfile.c; this is now operating on the new symbol file.
31209 2002-08-23 Martin Baulig <martin@gnome.org>
31211 * debug-helpers.c (mono_method_desc_from_method): New function to get
31212 a MonoMethodDesc from a MonoMethod.
31214 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31216 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
31217 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
31219 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31221 * string-icalls.[ch]: make helper methods static.
31223 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31225 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
31226 types to it and to SetValueInternal.
31228 * object.c: Moved handle_enum label to its proper place. This was the
31231 This time i compiled mcs and gtk-sharp and they both work.
31233 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31235 * icall.c: reverted partially my previous patch until
31236 object.c:set_value handles enums correcly.
31238 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31241 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
31242 (ves_icall_System_Environment_get_MachineName): removed warning when
31243 compiling under cygwin.
31245 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31247 * object.c: fixed field_get_value() for reference types.
31249 2002-08-22 Dick Porter <dick@ximian.com>
31251 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
31252 Don't free a buffer while it's still needed. Patch from Jonathan
31253 Liger <Jonathan.liger@wanadoo.fr>
31255 2002-08-21 Miguel de Icaza <miguel@ximian.com>
31257 * icall.c (ves_icall_System_Environment_get_Platform): Add new
31260 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
31262 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
31263 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
31265 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
31266 we call unmanaged code which throws exceptions.
31268 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31270 * appdomain.h: added per-domain entry_assembly.
31271 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
31273 * icall.c: Assembly::GetEntryAssembly icall.
31274 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
31275 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
31277 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31279 * appdomain.h, gc.c: added mono_domain_finalize ().
31281 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31284 (mono_print_unhandled_exception): changed g_warning by g_printerr
31285 because g_log has a 1024 characters limit (yeah, i got a big stack
31286 trace). Don't print exception name, that should be in ToString
31289 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31291 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
31292 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
31294 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31297 (mono_print_unhandled_exception): after previous commit, i realized
31298 that MS calls ToString on the exception. I changed this function to
31299 do that. This way we get stack_trace for free.
31301 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31304 (mono_print_unhandled_exception): invoke Message property instead of
31305 getting 'message' field from Exception. Don't allocate memory for
31306 'trace' and 'message' if not needed.
31308 2002-08-18 Dick Porter <dick@ximian.com>
31310 * unicode.c: Fix asserts to match Encoder.cs checks
31312 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31314 * marshal.c: fix unaligned store issue and a few wrong
31315 opcode argument types.
31317 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31319 * icall.c: added GetUninitializedObjectInternal internal call.
31321 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
31323 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
31324 to the right domain.
31326 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
31328 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
31330 * class.c (class_compute_field_layout): set blittable to false for Strings
31332 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
31334 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31336 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
31337 first chunk of code to create types at runtime. Code to
31338 handle ReflectedType/DeclaringType. Make reflection handles
31341 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31343 * class.c: set correct name in arrays.
31345 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
31347 * appdomain.c (mono_domain_transfer_object): make it work with
31348 valuetypes. bug fixes.
31350 2002-08-12 Dick Porter <dick@ximian.com>
31352 * object.h: Rename some parameters to avoid c++ keywords (Patch
31353 from Joseph Wenninger <kde@jowenn.at>)
31355 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
31357 * icall.c: added icall to implement Assembly.GetFile*.
31359 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
31361 * reflection.h, reflection.c: code to embed managed resources.
31363 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31365 * class.c: move all the type size stuff into
31366 class_compute_field_layout().
31368 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31370 * class.c: ensure enums have always the correct instance size.
31371 * unicode.c: remove wrong assert.
31373 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31375 * assembly.c: fix mem corruption issue.
31376 * image.h, image.c: added mono_image_get_resource () to access
31378 * icall.c: implemented Assembly.EntryPoint property and some
31379 Managed Resources related internalcalls.
31382 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31384 * image.c, image.h: impemented mono_image_get_entry_point ().
31385 * appdomain.c: use mono_image_get_entry_point.
31387 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31389 * reflection.c: support the object type argument when loading
31392 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
31394 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
31395 String as return type.
31397 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
31399 * reflection.c: fix encoding of named args for custom attrs to match
31400 the ms implementation. Read them back when instantiating custom
31403 2002-08-02 Radek Doulik <rodo@ximian.com>
31405 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
31406 by Dietmar as quick fix
31407 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
31408 16 as stack size, used on more places as quick fix before Dietmar
31409 will fix it properly
31411 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
31413 * object.h, object.c: added accessors for fields and properties.
31415 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31417 * class.c, class.h: made mono_class_get_field_from_name ()
31418 loop on parent types.
31419 Added mono_class_get_property_from_name ().
31421 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31423 * class.c, class.h: move the code to setup the type vtable in its own
31424 function so that it can be reused also for types created at runtime.
31425 Eliminate the "class" identifier from the header file.
31426 * reflection.c: setup the vtable for enums so that we can create
31427 objects for use in SetConstant ().
31429 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
31431 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
31432 instead of the delegate itself as this pointer (bug #28383)
31434 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
31436 * marshal.c (mono_marshal_get_managed_wrapper): added return type
31439 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31441 * loader.c: don't set the pinvoke bit on icalls.
31443 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
31445 * debug-helpers.c (mono_method_full_name): only print a number to
31446 indicate wrapper type (so that the output is more readable in traces).
31448 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
31450 * class.c (mono_class_init): include method override patch from Paolo
31452 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
31454 * icall.c: fixed GetTypeCode().
31456 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
31458 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
31459 use real delegate invoke function to make it work with multicast
31460 delegates (fix bug# 28291).
31462 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31464 * object.c: load constant strings.
31466 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31468 * reflection.c: no magic numbers.
31469 * tabledefs.h: security action enum.
31471 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31473 * assembly.c: fix possible memory corruption.
31475 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31477 * reflection.h, reflection.c: added support for linking resources.
31478 * verify.c: check we have an updated corlib.
31480 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
31482 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
31484 (mono_marshal_string_array): null terminate unmanaged string arrays.
31485 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
31487 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31489 * icall.c: Type.GetType () can now return also types from the
31492 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
31494 * loader.h, loader.c: stack walking support.
31495 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
31496 GetCallingAssembly.
31498 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
31500 * marshal.c: added optimisations for blittable types
31502 * class.c (mono_array_class_get): do not set blittable attribute on arrays
31503 (mono_class_setup_mono_type): set blittable attribute for single
31506 * marshal.c (mono_string_utf8_to_builder): impl.
31507 (mono_string_builder_to_utf8): impl.
31508 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
31510 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
31512 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
31513 (mono_marshal_get_managed_wrapper): impl. byref types
31515 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31518 (search_method): don't display debug message.
31520 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
31522 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
31524 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
31526 * appdomain.c: set the missing filename when throwing exception.
31528 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
31530 * metadata.c (mono_type_size): code cleanup
31531 (mono_type_stack_size): removed some test code
31533 2002-07-21 Miguel de Icaza <miguel@ximian.com>
31535 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
31536 mono_get_exception_file_not_found now.
31538 * exception.c (mono_exception_from_name_two_strings): New version
31539 that will call a constructor with two string arguments.
31540 (mono_get_exception_file_not_found): New helper routine, used to
31541 report file-not-found errors.
31543 2002-07-20 Dick Porter <dick@ximian.com>
31546 * process.c: Pass file handles to CreateProcess
31550 * file-io.c: Implemented CreatePipe
31552 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
31554 * metadata.c (mono_get_param_info): set alignment for value types
31556 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31558 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
31559 Constify mono_domain_assembly_open().
31560 * loader.c: handle null namespace in icalls.
31562 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
31564 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
31565 (emit_str_to_ptr_conv): marshal object as structs
31567 * metadata.c (mono_type_to_unmanaged): marshal object as structs
31569 * marshal.c (mono_marshal_get_runtime_invoke): support value types
31571 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
31573 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
31574 (mono_marshal_get_native_wrapper): we an now return value types
31576 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31578 * verify.c: more checks implemented.
31580 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
31582 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
31584 (mono_marshal_get_native_wrapper): allow byref arguments
31585 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
31586 impl. PtrToStringXXX methods
31587 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
31588 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
31589 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
31590 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
31591 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
31593 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31595 * reflection.c: fix buglet in parsing an assembly name.
31597 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
31599 * marshal.c (emit_ptr_to_str_conv): first impl.
31601 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31603 * object.c, class.h: cache the vtable in the class as suggested by
31604 vargaz@freemail.hu (Zoltan Varga).
31606 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31608 * class.h, loader.c: added mono_field_from_token().
31609 * verify.c: first cut of type checking code.
31611 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
31613 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
31615 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
31617 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
31619 (mono_marshal_get_remoting_invoke): impl.
31620 (mono_delegate_begin_invoke): impl.
31621 (mono_mb_emit_save_args): impl.
31622 (mono_delegate_end_invoke): impl.
31623 (mono_marshal_get_delegate_begin_invoke):
31624 (mono_marshal_get_delegate_end_invoke):
31625 (mono_marshal_get_delegate_invoke): generate a special name for
31626 those methods (including the signature) and associate them whith
31627 the delegate class.
31629 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
31632 (mono_reflection_type_from_name): now it has a MonoImage parameter
31633 which is used as the default image to search the type in. If the image
31634 is NULL or getting the type from it fails, it defaults to corlib.
31636 * icall.c: changed 1 call to mono_reflection_type_from_name to match
31639 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31641 * reflection.c: update the parameter table index.
31643 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31645 * domain.c: don't include the mark byte in the string hash.
31647 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31649 * icall.cs: icall for Type.GetTypeCode ().
31650 * verify: a couple of fixes and disabled local initialization checks.
31652 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
31654 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
31656 * debug-helpers.c (mono_method_full_name): print the type of the
31659 * metadata.c (mono_signature_hash): a hash function for signatures
31660 (mono_signature_hash): better hash algorithm
31662 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
31664 * debug-helpers.c (mono_method_full_name): this can now generate
31665 method names with signatures
31667 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
31668 method dont have this pointers.
31670 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31672 * reflection.c: fixup typebuilder tokens.
31673 * image.c: fix buglet.
31674 * marshal.h: remove whitespace.
31675 * metadata.h, metadata.c: reinstate code that was removed.
31676 * verify.c: handle catch directives and fix another couple of bugs.
31678 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
31680 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
31681 (mono_marshal_get_native_wrapper): make it comp. with the old code
31682 (mono_marshal_get_native_wrapper): support boolean
31683 (mono_marshal_get_managed_wrapper): support more types
31685 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
31687 * class.c (class_compute_field_layout): compute class->blittable attribute.
31689 2002-07-09 Dick Porter <dick@ximian.com>
31691 * threads.c: Make the thread cleaning up cope with threads that
31694 2002-07-08 Radek Doulik <rodo@ximian.com>
31696 * reflection.c (method_encode_code): use non-translated values to
31697 compute finally_start, this fixes exception handling on ppc, yay!
31699 * decimal.h (struct signscale): fix endianess
31701 2002-07-07 Radek Doulik <rodo@ximian.com>
31703 * reflection.c: swap box_val and not val
31705 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31707 * reflection.c, reflection.h: handle full assembly info in type name.
31708 Handle Type arguments when loading custom attributes.
31709 * icall.c: updated to use new mono_reflection_type_from_name () method.
31711 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31714 (method_from_memberref): also print assembly name when method not found.
31716 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31719 (ves_icall_TypeGetProperties): fixed bug #27473.
31721 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31723 * reflection.c: display image name and token when cannot find the
31724 .ctor for an attribute.
31726 2002-07-05 Martin Baulig <martin@gnome.org>
31728 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31730 2002-07-04 Dick Porter <dick@ximian.com>
31732 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
31733 compile on mingw. This will cause mingw builds to not wait for
31734 subthreads to terminate after the main thread does. I've lodged a
31735 bug with the mingw developers for them to wrap OpenThread().
31737 2002-07-03 Dick Porter <dick@ximian.com>
31739 * threads.c: Store thread IDs instead of handles, because
31740 GetCurrentThread() returns a pseudohandle and therefore stores
31741 useless values. mono_thread_cleanup() continues checking the
31742 array of threads until it is empty, to cope with subthreads
31743 spawning new threads after the main thread has finished.
31747 * profiler-private.h: Pass the thread ID to thread profiler
31748 functions, instead of a handle
31750 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31752 * verify.c: fixes to make it more usable.
31753 * pedump.c: added --verify code to verify IL code in an assembly.
31755 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31757 * reflection.c: turn errors into warnings to allow compiling corlib.
31759 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31761 * reflection.c: add special cases to compile corlib.
31763 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31765 * reflection.c: handle properties with only a set method.
31767 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31769 * opcodes.h: add enum with opcodes in opval order.
31771 2002-07-01 Dick Porter <dick@ximian.com>
31774 * object.c (mono_runtime_run_main): Removed unneeded argument
31776 2002-06-28 Martin Baulig <martin@gnome.org>
31778 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31780 2002-06-27 Dick Porter <dick@ximian.com>
31782 * threads.c: Store the handle in both the parent thread and in the
31783 subthread, to minimise the time between starting a new thread and
31786 2002-06-26 Dick Porter <dick@ximian.com>
31788 * appdomain.c (mono_runtime_cleanup): Close the socket library
31789 after all the threads have finished, not before
31791 2002-06-26 Martin Baulig <martin@gnome.org>
31793 * debug-symfile.c (mono_debug_find_source_location): Added
31794 `guint32 *line_number' argument. If it's not NULL, store the line number
31795 there and return the file name without the line number.
31797 2002-06-25 Dick Porter <dick@ximian.com>
31801 * process.c: Process forking and other support functions
31803 2002-06-25 Dick Porter <dick@ximian.com>
31805 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
31806 things dont happen when the image is closed.
31807 (mono_image_lookup_resource): Walk the resource section looking
31808 for a particular entry
31810 * cil-coff.h: PE resource section decoding
31812 2002-06-25 Dick Porter <dick@ximian.com>
31816 (mono_assembly_foreach): Accessor functions to walk the list of
31818 (mono_assembly_set_main):
31819 (mono_assembly_get_main): Process methods need to know which
31820 assembly is the "main" one
31822 * object.c (mono_runtime_run_main): Record the main assembly
31824 * debug-helpers.c: Fix typo
31826 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
31828 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
31829 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
31831 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31833 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
31835 2002-06-21 Miguel de Icaza <miguel@ximian.com>
31837 * image.c (do_mono_image_open): Initialize reference count,
31838 otherwise we leak the MonoImage.
31840 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31842 * reflection.c: small tweak to handle self-hosting.
31844 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31846 * reflection.c: fix type name parse code.
31848 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31850 * reflection.c: break out of the loop.
31851 * image.c: special case corlib.
31853 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31855 * reflection.c: add all the custom attrs at the end to ensure the
31856 ctors have been properly initialized when the attributes are defined
31857 in the current assembly.
31859 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31861 * reflection.c: handle correctly multiple-nested types.
31863 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
31865 * row-indexes.h: fix typos.
31866 * reflection.c: adjust for typos and fix method_def_or_ref
31867 encoding in MethodImpl table.
31869 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31871 * reflection.c: fix entry point patching (thanks Serge!).
31873 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
31875 * verify.c: add check for System.Exception
31877 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31879 * image.c, class.c: minifix for code just c&p'ed.
31880 * reflection.c: warning fix.
31881 * object.h, loader.h, domain.c: load also StringBuilder.
31883 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31885 * marshal.h, marshal.c: some support code to handle complex marshaling.
31887 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31889 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
31890 Better signatures with vtable error dump.
31892 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
31894 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
31896 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
31898 * icall.c (ves_icall_Type_GetField): impl.
31900 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31902 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
31903 to retrieve a marshal description blob for a field or param.
31905 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31907 * reflection.h, reflection.c: change order of nested type emission
31908 to avoid table corruption. The NestedTypes table is sorted.
31909 * icall.c: change order of GetConstructor results to workaround mcs bug.
31911 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31913 * reflection.h, reflection.c: handle field and param marshal
31916 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31918 * icall.c, marshal.c marshal.h: more Marshal class implementation.
31920 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31922 * reflection.c: fix call convention.
31924 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31926 * reflection.h, reflection.c: mono_image_get_memberref_token()
31927 takes a type instead of a class, now. Added
31928 mono_image_get_array_token() to create tokens for the special
31929 multi-dim array methods.
31931 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31933 * assembly.c: handle modules (no assembly table). Split
31934 loading references in its own function.
31935 * class.c: handle moduleref resolution scope.
31936 * image.c, image.h: cache module name in image.
31938 2002-06-07 Martin Baulig <martin@gnome.org>
31940 * reflection.c (mono_image_get_type_info): Only add a class layout entry
31941 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
31943 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31945 * icall.c: more signature fixes that used uint instead of int.
31947 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31949 * reflection.c: fixed signature of field refs.
31951 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31953 * class.c, reflection.c: handle typerefs of nested types
31954 (both on read and when writing files).
31956 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31958 * icall.c: fix method signatures that tried to workaround the previous
31961 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31963 * debug-helpers.c: fix typo.
31965 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31967 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
31968 rewrote the PE/COFF writing code (our programs are understood by the
31971 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31973 * gc.c, gc.h, icall.c: weakreference support.
31975 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31977 * Makefile.am, mono-config.c: use $(sysconfdir).
31979 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31981 * icall.c: changed default precision of Double.ToString() to 15.
31982 Fixed memory leak. Unified with Single.ToString.
31984 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31986 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
31988 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31990 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
31991 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
31992 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
31995 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31997 * debug-symfile.c, sysmath.c: yet more compilation fixes.
31999 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32001 * reflection.c, socket-io.c: more compilation fixes.
32003 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32005 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
32006 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
32007 unicode.c: warning and compiler compatibility fixes.
32009 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32011 * class.h, metadata.c: fixed warnings/compilation errors.
32013 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
32015 * Makefile.am, mono-config.c, mono-config.h: configuration file
32017 * loader.c, loader.h: make Dll mapping configurable at runtime in the
32018 config file. Export methods to insert and lookup mappings.
32020 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
32022 * reflection.c: handle types and boxed objects in custom attr
32025 2002-05-30 Martin Baulig <martin@gnome.org>
32028 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
32030 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
32032 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
32033 to lookup the implmap row for a P/Invoke method.
32034 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
32035 P/Invoke method from the runtime on an as needed basis.
32037 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
32039 * metadata.c (mono_metadata_parse_signature): impl.
32041 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32043 * class.c: handle .pack directive.
32045 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
32047 * object.c: initialize static fields with RVA data.
32049 2002-05-25 Martin Baulig <martin@gnome.org>
32052 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
32054 2002-05-24 Martin Baulig <martin@gnome.org>
32057 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
32058 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
32059 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
32061 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
32063 * object.c: special case string ctros in invoke.
32064 * gc.c: silly whitespace changes.
32066 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
32068 * threadpool.[ch]: impl. a threadpool that can
32069 be used by mint and mono.
32071 2002-05-22 Martin Baulig <martin@gnome.org>
32073 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
32074 The first argument is now a `MonoReflectionModuleBuilder *', the return
32075 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
32076 `methods' field to get the method builder. The `token' argument is the
32079 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
32080 invalid characters instead of g_assert_not_reached()ing. This seems
32081 to be the behaviour of mscorlib.
32083 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
32085 * object.c (mono_runtime_invoke_array): applied patch from Rachel
32086 Hestilow to fix bug #25104
32088 2002-05-21 Martin Baulig <martin@gnome.org>
32090 * debug-symfile.c (mono_debug_find_source_location): New function.
32091 Looks up an IL offset in the line number table and returns the source
32092 location as a string.
32094 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32097 (mono_double_ToStringImpl): changed %f by %g until we have something
32100 2002-05-21 Nick Drochak <ndrochak@gol.com>
32102 * icall.c : Use different name for Math.Pow's icall. Needed to check
32103 parameters first in C#.
32105 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32107 * icall.c, reflection.h: added icall to get info about an event.
32109 2002-05-20 Radek Doulik <rodo@ximian.com>
32111 * object.c (mono_value_box): don't use memcpy for boxing on BIG
32113 (mono_value_box): don't use memcpy for small sizes on
32114 architectures with unaligned access
32116 2002-05-20 Martin Baulig <martin@gnome.org>
32118 * reflection.c (mono_reflection_setup_internal_class): Don't crash
32119 if `tb->parent == NULL'.
32120 (mono_reflection_create_internal_class): New function. This is
32121 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
32124 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
32127 2002-05-19 Martin Baulig <martin@gnome.org>
32129 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
32130 argument to get the length, don't default to the array length.
32132 2002-05-18 Miguel de Icaza <miguel@ximian.com>
32134 * assembly.c (mono_assembly_setrootdir): New function used to
32135 override the MONO_ASSEMBLIES directory.
32137 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32139 * icall.c: ValueType_GetHashCode() initialize local var.
32141 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32143 * reflection.c: sort custom attributes table.
32145 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
32147 * reflection.c: support named args in custom attributes (write support).
32149 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
32151 * reflection.c: fix finally position calculation.
32153 2002-05-15 Radek Doulik <rodo@ximian.com>
32155 * reflection.c: fixed endianess at many places
32157 * icall.c (ves_icall_InitializeArray): comment out debug msg
32159 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
32161 * object.c (mono_unhandled_exception): new function to handle
32162 unhandled exceptions.
32163 (mono_unhandled_exception): call the UnhandledException event.
32164 (mono_runtime_delegate_invoke): impl.
32166 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
32168 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
32169 returns the RVA, not the direct pointer to the data. Handle the case
32170 when the class size is fixed.
32172 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
32174 * reflection.c: fix some endianess issues.
32176 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
32178 * object.c (mono_runtime_invoke): is now able to catch exceptions.
32180 * threads.c (mono_thread_init): added a callback which is invoked
32183 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
32185 * icall.c: make GetHashCode return non-negative values.
32187 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
32189 * object.c, icall.c, gc.c: revert to address-based hashcode.
32191 2002-05-13 Miguel de Icaza <miguel@ximian.com>
32193 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
32195 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
32197 * icall.c, class.c: special case <Module>.
32199 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
32201 * icall.c: fix bug in GetNow().
32203 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
32205 * object.c (mono_runtime_class_init): make sure that we call all
32206 static class constructors.
32208 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
32210 * reflection.c: sort methodsemantics table.
32212 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
32214 * reflection.h, reflection.c: honour init locals setting.
32216 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
32218 * icall.c: copied Double ToStringImpl for Single ToStringImpl
32220 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
32222 * reflection.c: support ContructorBuilders in attribute blob creation.
32224 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32226 * reflection.c: some changes to build a binary that can be run
32227 directly in windows.
32229 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
32231 * loader.c: print a big message when an icall can't be found.
32233 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32235 * string-icalls.c: fix bug 24248.
32237 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
32239 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
32240 icall.c, reflection.h: separate assembly loading by pathname and by
32241 assembly name. Use the MONO_PATH env var to search for assemblies.
32243 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
32245 * assembly.c, image.h: add some support for assemblies
32246 with multiple modules.
32247 * class.c, class.h: export mono_class_from_typeref().
32248 * loader.c: remove duplicated code and use mono_class_from_typeref(),
32251 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
32253 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
32254 documentation says (the ECMA one is correct).
32256 2002-05-02 Dick Porter <dick@ximian.com>
32258 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
32259 Don't name the synchronisation mutex.
32261 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
32264 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
32265 Make the prototypes match.
32266 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
32270 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
32271 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
32272 all systems have tm.tm_zone, so use strftime() with %Z to print
32273 the timezone abreviation into a temp string.
32275 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
32276 rather than mono_array_addr() on a MonoString on Big Endian
32279 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
32281 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
32284 2002-04-30 Dick Porter <dick@ximian.com>
32286 * socket-io.c: Cope with SOCKET being an integer rather than a
32289 * threads.c: Added Thread_free_internal, to deal with thread
32290 handle cleanup. Moved calls to handle_store() and handle_remove()
32291 to start_wrapper(), so each can only be called once. Allocate
32292 synchronisation blocks with GC_malloc(), and use GC finalisation
32293 to close the handles.
32295 * icall.c: added System.Threading.Thread::Thread_free_internal
32297 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
32299 * icall.c: support Environment.Exit, CommandLineArgs().
32301 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
32303 * object.c, object.h: added mono_runtime_run_main () and
32304 mono_runtime_get_main_args () for use in System.Environment.
32306 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
32308 * gc.c: fix thinko, enable actual finalization since the jit is now
32311 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32313 * gc.c, object.c: take into account that an object may be offset wrt the address
32314 returned by GC_malloc().
32316 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
32318 * image.c: handle files without entries in the assembly table (modules).
32320 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
32322 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
32323 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
32324 allowed to be null when it's System.Object class setup.
32326 2002-04-27 Martin Baulig <martin@gnome.org>
32328 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
32329 if `tb->parent == NULL' rather than crashing.
32331 2002-04-28 Nick Drochak <ndrochak@gol.com>
32333 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
32334 calling acos() where asin() should have been called.
32336 2002-04-26 Martin Baulig <martin@gnome.org>
32338 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
32339 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
32340 there's a subdirectory called `System', but we don't want to read that
32341 subdirectory as an assembly.
32343 2002-04-25 Martin Baulig <martin@gnome.org>
32345 * debug-symfile.c: Reflect latest MonoString changes.
32347 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
32349 * rand.c, rand.h: instance method icalls need to have an explicit
32350 this pointer as first argument in the C implementation.
32352 2002-04-25 Nick Drochak <ndrochak@gol.com>
32354 * icall.c: Fix typo in map for GetNonZeroBytes
32356 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32358 * string-icalls.c : String does now passes unit tests without any
32359 errors, the following changes has been made:
32361 Implemented replace methods.
32362 Renaming of methods to (try) follow the standard.
32363 Fixed compare ordinal
32364 Made all memory allocated directly to function instead of via icall function.
32365 Small performance fix in is_in_array function
32367 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
32369 c (mono_string_Internal_ctor_charp_int_int):
32370 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
32371 sindex < 0, throw ArgumentOutOfRangeException instead of
32372 ArgumentNullException.
32374 Added new check for length == 0, however
32375 I need to make it return String.Empty from the C code.
32377 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
32378 that calculate the length for us here.
32380 (mono_string_Internal_ctor_sbytep_int_int): Replaced
32381 mono_string_new_utf16 with mono_string_new, since value is utf8.
32383 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32385 * object.c: register the object for finalization if needed.
32386 Allocate one more char in the string for the terminating 0 char.
32388 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
32390 * class.c, class.h, image.c: check if a type implemenst a destructor.
32391 Use the proper key for array class lookups.
32392 * icall.c: register the icalls in the System.GC class.
32393 * gc.c, gc.h: GC-related functions and icalls.
32395 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32399 * unicode.c: free some strings gotten from mono_string_to_utf8 and
32400 changed a couple of free () by g_free ().
32402 * decimal.c: one-liner in the comments for decimal2string ().
32404 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32406 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
32408 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32410 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
32411 * object.c (mono_runtime_invoke_array) : handle null in params
32413 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32415 * string-icalls.c: fixed bug in split (one off bug)
32417 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32419 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
32420 * icalls.c: added String::Equals as internal method
32422 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32424 * threads.c: fixed bug in the double interlocked functions
32426 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
32428 * threads.c: implemented all of the new interlocked icalls.
32429 * string-icalls.c: fix a bug in insert.
32430 * icalls.c: added the icalls for interlocked, removed old string functions.
32432 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32434 * loader.c: fix off-by-one error when reading argument names.
32436 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32438 * profiler.c: win32 counter implementation (untested).
32439 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
32440 (the latter needs testing and more complete impl. from win32 folks).
32442 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
32444 * object.c: mono_array_new_full workaround mono_array_class_get
32447 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32449 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
32450 * object.h (mono_string_chars): Changed casting type.
32452 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32454 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
32455 method signatures to use gunichar2 instead of gint16.
32457 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
32459 * object.h, object.c: domain-specific versions of mono_object_new and
32462 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
32464 * object.c: changed String layout
32466 * string-icalls.c (mono_string_Internal_ctor_chara): added
32467 internal string constructors.
32469 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
32471 * threads.c: pass 'this' to the thread start routine.
32473 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32475 * string-icalls.c: fix IndexOf and LastIndexOf. Now
32476 InternalCompareStr don't call twice mono_string_cmp_char for the last
32477 character. Improved performance in mono_string_cmp_char.
32479 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
32481 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
32482 code into its own library: libmonoruntime.
32484 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
32486 * object.h, object.c: changed array format so that szarrays do not
32487 require a bounds structure.
32488 * icall.c, appdomain.c: support for new szarray format.
32490 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
32492 * metadata.c: compare also the retuns type when comparing signatures:
32493 we didn't do this as an optimization since really overloaded methods
32494 must differ also in the arguments, but this doesn't work with
32495 low-level IL code (or when using explicit conversion operators: see
32496 bug#23498 for an example).
32498 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
32500 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
32502 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
32504 * icall.c: make MonoType::GetElementType its own icall.
32506 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
32508 * icall.c: remove MonoMethod_get_Name().
32509 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
32512 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32514 * string-icalls.c: optimized a few methods.
32516 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32518 * icall.c: added all new string internal calls
32519 * string-icalls.c: added, new string internal call implementation.
32520 * object.c: added mono_string_new_size for allocating a string a size
32522 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
32524 * object.c (mono_object_isinst): use the same code as in the
32525 optimized x86 version.
32527 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32529 * profiler.c: TSC-based timer code (faster and more accurate).
32530 Not hooked up in configure, yet (set USE_X86TSC to 1).
32532 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
32534 * profiler.c, profiler.h: track time spent compiling methods.
32535 * threads.c: track thread creation/destruction.
32537 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
32539 * profiler.c, profiler.h, profiler-private.h: profiling interface
32540 and sample implementation. Moved here so that it can be used also by
32543 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
32545 * reflection.c, reflection.h: keep types and other handles separate in
32546 the hash tables for referred tokens. Add guid for modules.
32548 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
32550 * assembly.c: fix bugs found with valgrind.
32551 * metadata.h, metadata.c: added mono_metadata_guid_heap().
32553 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
32555 * threads: added icall support for getting current domain for
32558 2002-04-13 Martin Baulig <martin@gnome.org>
32560 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
32561 (MonoDebugVarInfo): Added `index' field for register based addresses.
32562 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
32563 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
32564 `MonoDebugVarInfo *params' and `guint32 this_offset' with
32565 `MonoDebugVarInfo *this_var'.
32567 * debug-symfile.c (relocate_variable): New static function to write
32568 a location description for a local variable or method parameter.
32570 2002-04-12 Martin Baulig <martin@gnome.org>
32572 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
32573 stack offset and begin/end scope address of a local variable.
32574 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
32575 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
32576 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
32578 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
32579 Added new relocation types for start/end scope of a local variable.
32581 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32583 * object.h: add mono_object_domain() macro.
32584 * reflection.c: handle typespecs.
32585 * icall.c: MonoMethod::get_Name() implementation.
32587 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32589 * icall.c: String::GetHashCode() icall implementation.
32591 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32593 * icall.c: String::IndexOfAny icall.
32594 * object.c, object.h: make array->max_length more useful.
32595 Intrduced mono_object_class() and mono_string_length() macros.
32597 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32599 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
32600 instead of g_unichar_isdigit.
32602 2002-04-11 Nick Drochak <ndrochak@gol.com>
32604 * icall.c: Implement a simple Double.ToString().
32606 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32608 * appdomain.h: only io-layer.h is supposed to be included.
32609 * icall.c: explicitly import environ. Fix warning.
32611 2002-04-10 Nick Drochak <ndrochak@gol.com>
32613 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
32614 return true even if it's not Daylight Savings time.
32615 Only return false for the case where the function isn't
32616 implemented for a plaform (read Windows).
32618 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32620 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
32623 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
32625 * mempool.c (mono_mempool_alloc): only use g_malloc when
32626 absolutely necessary.
32628 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
32630 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
32632 * class.c (mono_class_vtable): use domain mempool to allocate vtable
32633 (mono_class_proxy_vtable): use domain mempool
32635 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
32637 * appdomain.h, appdomain.c: split initialization that requires the
32638 execution engine support into mono_runtime_init().
32640 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
32642 * class.c (mono_class_init): don't include vtable inside MonoClass
32643 to save some memory, gather some statistics.
32644 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
32646 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32648 * icall.c: internalcall implementation for ValueType.Equals().
32650 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
32652 * object.c (mono_message_init): moved
32653 (mono_runtime_exec_main): new arch. independent impl.
32654 (mono_runtime_invoke_array): new method - like
32655 mono_runtime_invoke, but you can pass an array of objects.
32656 (mono_remoting_invoke): new arch. independent impl.
32657 (mono_message_invoke): new arch. independent impl.
32658 (mono_runtime_class_init): new arch. independent impl.
32659 (mono_runtime_object_init): new arch. independent impl.
32661 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32663 * metadata.c, object.c, reflection.c: documented the exported
32666 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
32668 * icall.c: simpler code to pass the assembly builder data to corlib.
32669 Implement GetNestedTypes() internalcall.
32671 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32673 * class.c: warn if a type can't be loaded.
32675 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
32677 * image.h: typedef MonoImageOpenStatus
32678 * types.h: removed unused file
32680 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
32682 * icall.c: Enum_ToObject accepts enum value arguments.
32684 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
32686 * class.c: move initialization of properties, events and nested
32687 classes, so that they happen for interfaces, too.
32689 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
32691 * icall.c: cleanup some ugly casts in Array_SetValue*.
32693 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32695 * icall.c: the values array fro enums is of the correct type, now.
32696 Implement (correctly) getFullName instead of assQualifiedName for
32698 * reflection.h, reflection.c: added mono_type_get_name ().
32700 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32702 * assembly.c, image.h: for each MonoImage, record from wich assembly
32704 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
32705 Make Type.Assembly work.
32707 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
32709 * debug-symfile.h: use char* instead of gpointer to avoid
32712 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
32714 * icall.c (ves_icall_InternalExecute): impl. FielSetter
32715 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
32717 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
32719 * icall.c (mono_message_init): impl. (code cleanup)
32720 (ves_icall_InternalExecute): impl. FieldGetter
32722 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
32723 defined we call all (non-static)methods through the vtable.
32725 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
32727 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
32728 finalizer even though the memory is still referenced (and the chunk of
32729 memory is not freed).
32731 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
32733 * assembly.c: fix brokeness.
32735 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
32737 * class.c: kill some warnings. Check explicit interface method
32738 implementation also without considering the namespace.
32739 Load also literal strings in static class data.
32741 2002-03-29 Miguel de Icaza <miguel@ximian.com>
32743 * assembly.c (default_assembly_name_resolver): Kill memory leak.
32744 (default_assembly_name_resolver): Make the resolver take the
32745 "base" directory where the assembly was originally defined, so we
32746 can load DLLs that are in the same directory as the assembly that
32747 is being referenced.
32749 2002-03-28 Dick Porter <dick@ximian.com>
32755 * unicode.c: Warning cleanups
32757 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
32759 * object.h, reflection.h: use the correct type instead of MonoObject.
32761 2002-03-28 Martin Baulig <martin@gnome.org>
32763 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
32764 (mono_debug_update_symbol_file): Initialize classes if necessary.
32766 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32768 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
32769 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
32771 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
32773 * assembly.h: fix function prototype.
32774 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
32775 * mono-endian.h: use const cast.
32777 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
32779 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
32781 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32783 * loader.c: don't assert when a typeref can't be loaded, give
32784 a chance to the runtime to trow an exception instead.
32785 * loader.h: fix warning.
32787 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
32789 * class.c (mono_class_proxy_vtable): added proxy support
32791 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
32793 * icall.c: removed last of PAL calls, added System.Environment
32794 * file-io.h, file-io.c: MonoIO implementation
32795 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
32797 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32799 * appdomain.c: do not use the byte marker in ldstr table lookup.
32800 * debug-helpers.c: allow two ':' to separate class and method name.
32801 * object.c: allocate arrays bounds with the GC, too.
32802 * verify: add a few more checks.
32804 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
32806 * reflection.c: output also literal strings. Allocate parameter data
32807 with GC_malloc() (thanks, Martin, for catching this!).
32809 2002-03-26 Martin Baulig <martin@gnome.org>
32811 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
32812 include the `this' offset in the `param_offsets'.
32814 2002-03-25 Martin Baulig <martin@gnome.org>
32816 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
32817 mono_debug_get_class() function to get the classes. Added new
32818 relocation types for arrays and strings.
32819 (mono_debug_get_class): New static function to search in all
32820 referenced assemblies for a metadata token.
32822 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
32824 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32826 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
32827 hold gc-allocated objects. Make the string heap a stream like the
32828 others. Removed duplicated code when writing stream info.
32829 Added asserts to catch possible buffer overflows. Set the sorted map
32830 for tables that need sorting. Added some documentation.
32832 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
32834 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
32835 for interned strings and vtables.
32837 2002-03-24 Martin Baulig <martin@gnome.org>
32839 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
32840 it in the array since it was created with g_slist_prepend().
32842 2002-03-24 Martin Baulig <martin@gnome.org>
32844 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
32845 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
32846 (mono_debug_method_from_token): Renamed to
32847 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
32848 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
32850 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
32853 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
32855 2002-03-24 Martin Baulig <martin@gnome.org>
32857 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
32858 (mono_debug_method_from_token): New func.
32860 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
32861 New interncall, calls mono_debug_local_type_from_signature().
32862 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
32863 calls mono_debug_method_from_token().
32865 2002-03-23 Martin Baulig <martin@gnome.org>
32867 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
32868 specifies the number of bytes to be converted, not the array size.
32869 Return the number of chars, not the number of bytes.
32870 (ves_icall_iconv_get_chars): The `byteCount' argument
32871 specifies the number of bytes to be converted, not the array size.
32873 2002-03-23 Martin Baulig <martin@gnome.org>
32875 * reflection.h (MonoReflectionSigHelper): New type.
32877 * reflection.c (mono_reflection_sighelper_get_signature_local),
32878 (mono_reflection_sighelper_get_signature_local): New functions.
32880 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
32881 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
32884 2002-03-23 Martin Baulig <martin@gnome.org>
32886 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
32887 is_writeable is set.
32888 (mono_raw_buffer_update): New function to write the modified map
32891 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
32893 * debug-symfile.c (mono_debug_update_symbol_file): Call
32894 mono_raw_buffer_update() when done writing.
32896 2002-03-23 Martin Baulig <martin@gnome.org>
32898 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
32900 * debug-symfile.c: Added support for arguments and local variables.
32902 2002-03-23 Dick Porter <dick@ximian.com>
32904 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
32905 protected by ifdefs, hence breaking the w32 build.
32907 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32909 * object.c: implement is_interned() the right way.
32911 2002-03-21 Martin Baulig <martin@gnome.org>
32913 * debug-symfile.[ch]: New files to handle debugging information
32914 files. There's also support to dynamically update these symbol
32915 files to include machine dependent information.
32917 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
32919 * threads.c (mono_thread_create): new function to create thread
32922 2002-03-20 Martin Baulig <martin@gnome.org>
32924 * icall.c (ves_icall_InternalInvoke): Create a new object if the
32925 method is a constructor.
32926 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
32927 points to ves_icall_InternalInvoke().
32929 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
32931 * file-io.c: Flush shouldn't throw exceptions.
32933 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
32935 * file-io.c: FileStream flush support; FileSetLength now
32936 restores file pointer.
32938 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32940 * class.c: set image for pointer classes.
32942 2002/03/19 Nick Drochak <ndrochak@gol.com>
32944 * sysmath.c: Forgot one.
32946 2002-03-18 Miguel de Icaza <miguel@ximian.com>
32948 * sysmath.c: Avoid redefining existing names.
32950 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
32952 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
32953 handled by runtime as icall rather than dllimport from libm.so
32954 * file-io.c, file-io.h: fixed handle argument type.
32956 2002-03-18 Dick Porter <dick@ximian.com>
32958 * reflection.c (mono_image_get_type_info): rename interface to
32959 iface, because of "#define interface struct" on windows.
32961 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
32963 * class.c, class.h: rename and export mono_ptr_class_get().
32964 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
32965 * reflection.c, reflection.h, icall.c: better/saner type name
32966 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
32969 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
32971 * class.c (mono_class_init): removed hardcoded GHC_SLOT
32973 * icall.c (ves_icall_InternalInvoke): impl.
32975 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32977 * reflection.c: output the interface map table, too.
32979 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32981 * class.c (class_compute_field_layout): separate computation of
32982 static field layout
32984 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
32986 * icall.c: added System.Buffer support.
32987 * file-io.c: moved file icalls from PAL to FileStream.
32989 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32991 * icall.c (ves_icall_System_Object_GetHashCode): impl.
32993 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
32995 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
32997 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32999 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
33001 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
33003 * debug-helpers.{c,h}: moved here from monograph some useful functions
33004 to locate a method by name/signature in a class or image. Included
33005 also a small and flexible IL disassembler.
33007 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33009 * reflection.c: fixup tokens in methods with small header size, too.
33011 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
33013 * object.c (mono_string_to_utf8): remove assert(!error), instead
33016 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
33018 * icall.c: update to the new mono_Array_class_get interface.
33020 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
33022 * appdomain.c, object.c: Boehm-GC enable.
33023 * icall.c: make get_data_chunk() support split data requests.
33024 Ensure a class is initialized in more cases. Return only the first
33025 property found in GetProperties() or the compiler gets confused.
33026 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
33027 * reflection.h, reflection.c: add fixup mechanism for field and method
33028 tokens. Initialize assembly->typeref in a single place. Output
33029 properties after events. Support custom attributes for events, too.
33030 Typo fix for paramter custom attrs.
33032 2002-03-07 Martin Baulig <martin@gnome.org>
33034 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
33036 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
33038 * class.c (mono_array_class_get): fix. for multi. dim. arrays
33040 2002-03-06 Martin Baulig <martin@gnome.org>
33042 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
33043 non-zero lower bounds. See testcases #F10-#F13.
33045 2002-03-05 Martin Baulig <martin@gnome.org>
33047 * exception.c (mono_get_exception_argument_out_of_range): New exception.
33049 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
33050 ves_icall_System_Array_GetValue(), only calculate the absolute array position
33052 (ves_icall_System_Array_SetValue): Likewise.
33053 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
33054 as argument and does the actual work. This function is used when copying a
33055 multi-dimensional array.
33056 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
33057 now do all the widening conversions of value types.
33058 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
33060 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33062 * class.c: remove some magic numbers and use the smbolic names,
33063 instead. Added init_events() to load event info at class init time.
33064 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
33065 and mono_metadata_methods_from_event().
33066 * reflection.h, reflection.c: added support for writing out the evnets
33067 related information.
33069 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
33071 * reflection.h, icall.c: use a different method (GetInterfaces)
33072 to gather interface info and add isbyref, isprimitive and
33073 ispointer to the ves_icall_get_type_info() return value.
33075 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
33077 * class.h: stared adding support for events.
33078 * icall.c: split find_members implementation. Added debug icall to get
33079 the address of an object.
33080 * reflection.c: handle TypeBuilders in mono_type_get_object().
33082 2002-03-01 Martin Baulig <martin@gnome.org>
33084 * icall.c (ves_icall_System_Array_GetLength): This must throw an
33085 ArgumentOutOfRangeException(), not an ArgumentException().
33086 (ves_icall_System_Array_GetLowerBound): Likewise.
33087 (ves_icall_System_Array_GetValue): Improved argument checking.
33088 (ves_icall_System_Array_SetValue): Improved argument checking.
33090 2002-03-01 Martin Baulig <martin@gnome.org>
33092 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
33093 called with invalid arguments rather than just dying with g_assert().
33094 (ves_icall_System_Array_SetValue): Likewise.
33095 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
33096 raise a NotImplementedException instead.
33097 (ves_icall_System_Array_GetLength): Added argument checking.
33098 (ves_icall_System_Array_GetLowerBound): Added argument checking.
33100 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
33102 * object.h (mono_assert): new macros mono_assert and
33103 mono_assert_not_reached
33105 2002-02-28 Martin Baulig <martin@gnome.org>
33107 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
33108 and "System::String::IsInterned" to "System::String::_IsInterned".
33110 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
33112 * icall.c: remove hacks for typebuilder. Added icall to create a
33113 modified type from a tybebuilder.
33114 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
33115 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
33116 to create a backing MonoClass for a TypeBuilder.
33118 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33120 * class.c, class.h: more refactoring of class init.
33121 Export mono_class_setup_mono_type() and mono_class_setup_parent().
33123 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
33125 * marshal.c, marshal.h: start of marshaling interface.
33127 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
33129 * icall.c: fix order in assembly qualified name icall.
33131 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
33133 * class.c: do not free str, since we store it in the hash table.
33134 * reflection.h: add label field to MonoILExceptionInfo.
33135 * reflection.c: handle references to more than one assembly. Handle
33136 case when there isn't a module created in the assembly.
33138 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
33140 * class.c: Fix typo. Start refactoring of class init code.
33142 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
33144 * appdomain.c: exit with 1 on error.
33145 * class.c: we already have the name in MonoClassField.
33146 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
33147 MonoStreamHeader instead of an offset of image->raw_metadata.
33149 2002-02-26 Miguel de Icaza <miguel@ximian.com>
33151 * appdomain.c (mono_init): Be even more descriptive about the error.
33153 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
33155 * appdomain.c: give the user an informative message when corlib can't
33158 2002-02-26 Martin Baulig <martin@gnome.org>
33160 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
33161 New icall to get the time zone data.
33163 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33165 * reflection.c: set virtual and raw size of section correctly.
33166 * threads.c: transfer domain information to newly created threads.
33168 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
33170 * class.c: when instancing a class in a domain, load the default
33171 vaules for static fields from the constant table. Fix System.Enum to
33173 * icall.c: implement Object::GetType() internalcall. Implemented
33174 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
33175 Fixed checking of binding flags in find_members().
33176 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
33177 * reflection.c: handle enumerations when writing to the constant
33178 table. Use a different object cache for types.
33181 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
33183 * object.c (mono_object_isinst): fix for arrays
33185 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
33187 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
33189 * object.c: don't use mprotect () and fix intern pool hash table
33190 lookup for big endian systems.
33192 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33194 * icall.c: change type_is_subtype_of () signature.
33196 2002-02-21 Mark Crichton <crichton@gimp.org>
33198 * rand.c, rand.h: Added random number generator for
33199 System.Security.Cryptography classes.
33201 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
33203 * icall.c: Added System.Security.Cryptography calls.
33205 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
33207 * class.c, icall.c, metadata.c: better support for pointer types.
33208 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
33209 * reflection.c: Add support for getting custom attrs for properties
33210 and simplify some code.
33212 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33214 * icall.c: change getToken () and add custom attribute GetBlob()helper
33216 * reflection.h: add custom attrs array to the reflection builder structures.
33217 * reflection.c: encode and emit custom attributes for all the relevant
33218 reflection objects. Cache fieldref and methodref tokens. Change
33219 mono_image_create_token() interface to take a MonoDynamicAssembly.
33220 More complete custom attributes decoder. Load custom attributes for
33221 Assembly, Field, Method and Constructor objects, too. Make the
33222 returned array an Attribute[] one, not object[]. Added
33223 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
33224 custom attribute constructor.
33226 2002-02-20 Dick Porter <dick@ximian.com>
33230 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
33231 problem code out for now).
33233 2002-02-19 Radek Doulik <rodo@ximian.com>
33235 * object.c (mono_ldstr): use hash table to avoid multiple swapping
33237 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
33239 * icall.c: register the GetCustomAttributes method.
33240 * object.c, object.h: add mono_string_new_len ().
33241 * reflection.h, reflection.c: added mono_runtime_invoke(),
33242 mono_install_runtime_invoke(). Added
33243 mono_reflection_get_custom_attrs () to load custom attributes and
33244 create the attribute objects.
33246 2002-02-19 Dick Porter <dick@ximian.com>
33247 * threads-dummy-types.c:
33248 * threads-dummy-types.h:
33251 * threads-pthread-types.c:
33252 * threads-pthread-types.h:
33253 * threads-pthread.c:
33254 * threads-pthread.h: Deleted obsolete files
33256 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
33258 * class.c (mono_class_vtable): runtime init the class when we
33259 allocate static class data.
33261 * icall.c (ves_icall_System_Array_SetValue): check for null values.
33263 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
33264 and String - but we will need generic marshalling support in the
33266 (mono_init): set the domain name in a ms compatible way
33268 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
33271 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
33273 * object.c (mono_array_clone): use alloca() instead of g_malloc
33276 * appdomain.c (mono_domain_unload): impl.
33278 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
33280 * appdomain.c, object.c: fix intern pool implementation.
33281 * class.c: fix alignment code.
33283 2002-02-16 Radek Doulik <rodo@ximian.com>
33285 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
33286 and s2 > s1, just copy lower bytes to be compatible with little
33287 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
33288 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
33290 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
33291 force big_endian to be 1 for big endian machines
33292 (ves_icall_iconv_new_decoder): ditto
33294 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
33296 * socket-io.c (convert_sockopt_level_and_name): If the system
33297 doesn't define SOL_IP or SOL_TCP, get them by hand using
33298 getprotobyname() and caching the values (because this could be a
33300 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
33301 Use the appropriate struct when the system does support it. Ie,
33302 not all systems have struct ip_mreqn so use struct ip_mreq when
33305 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
33307 * reflection.c: handle finally clauses.
33309 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
33311 * socket-io.c: use g_snprintf() instead of snprintf.
33313 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
33315 * reflection.c (mono_param_get_objects): Cast second argument to
33316 mono_method_get_param_names to a const char** to silence the
33319 * appdomain.c (mono_domain_assembly_open): Put parens around the
33320 truth statement in the for-loop.
33322 * unicode.c (iconv_convert): Got rid of a compiler warning about
33323 int i being unused when the system has a new iconv.
33324 (iconv_get_length): Same.
33326 * image.c (load_class_names): Cast the second argument to
33327 g_hash_table_insert() to char* to hush compiler warnings about the
33329 (mono_image_open): Same here.
33331 * socket-io.c: Don't conditionally include sys/filio.h or
33332 sys/sockio.h here anymore since we now get them from
33333 io-layer/io-layer.h
33334 (inet_pton): If the system doesn't support inet_aton, implement
33335 using inet_addr and also #define INADDR_NONE if it isn't defined
33338 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
33340 * metadata.c, metadata.h: added function to get packing and size info
33342 * reflection.h, reflection.c: handle field RVA data. Save info about
33343 the table layout if needed. Assign typedef indexes to all the types
33344 before dumping the info about them to avoid forward reference problems.
33346 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
33348 * socket-io.c (convert_sockopt_level_and_name): ifdef
33349 SO_ACCEPTCONN because it is not defined on my system (old debian)
33351 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
33353 * opcode.c: use stddef.h to get NULL.
33355 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
33357 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
33358 for FIONBIO, FIONREAD and SIOCATMARK.
33359 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
33360 define INADDR_NONE and besides, inet_addr() is deprecated and
33361 should not be used. Use inet_pton() instead - it also has the
33362 added bonus that it can easily handle IPv6 addresses as well.
33363 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
33365 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
33367 * decimal.c: remove _MSC_VER conditional.
33369 2002-02-13 Dick Porter <dick@ximian.com>
33372 * icall.c: Internal calls for Blocking, Select, Shutdown,
33373 GetSocketOption and SetSocketOption
33375 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33377 * assembly.cs: better resolver: use it instead of some kludgy
33380 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
33382 * reflection.c: the best way to speed-up the compiler is to avoid
33385 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
33387 * class.c (mono_class_vtable): changed the object layout
33388 (obj->vtable->class).
33389 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
33391 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33393 * assembly.c: look for assemblies in the assembly dir, too.
33395 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
33397 * class.c: fix thinko in mono_class_from_type().
33399 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33401 * exception.h, exception.c: added TypeLoadException.
33402 * object.h, object.c: added mono_array_clone ().
33403 * icall.c: handle throwOnError in AssemblyGetType().
33404 Added Array.Clone().
33405 * opcode.h, opcode.c: use a single value for the opcode val.
33406 Compile fix for non-gcc compilers.
33408 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
33410 * opcodes.c, opcodes.h: export interesting info about opcodes.
33412 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
33414 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
33417 * class.c (class_compute_field_layout): set element_class for enums
33418 (mono_class_create_from_typedef): set element_class for normal classes
33420 * icall.c (ves_icall_System_Enum_get_value): impl.
33422 * class.c (mono_class_create_from_typedef): do not set valuetype
33423 flag for System.ValueType and System.Enum
33425 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
33427 * unicode.c (iconv_convert): fix big endian problem.
33429 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
33431 * class.c: add asserts if we are ever going to scribble over memory.
33432 * socket-io.c: not all systems have AF_IRDA defined.
33434 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
33436 * class.c (class_compute_field_layout): do not consider static
33437 fields to compute alignment
33439 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
33441 * appdomain.c (mono_appdomain_get): impl.
33442 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
33444 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
33446 * icall.c: ignore "file://" prefix when loading an assembly.
33448 2002-01-23 Dick Porter <dick@ximian.com>
33452 * Makefile.am: Added socket support
33454 2002-01-23 Miguel de Icaza <miguel@ximian.com>
33456 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
33457 code back. This should return the assemblies that are loaded by
33458 the runtime on behalf of an application domain.
33460 The current implementation is still broken, it just returns every
33461 assembly loaded, but until we get real applications domain this
33464 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
33466 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
33469 2002-01-23 Miguel de Icaza <miguel@ximian.com>
33471 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
33472 the mono_class_from_name lookup.
33473 (ves_icall_get_parameter_info): ditto.
33474 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
33476 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
33478 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
33480 * class.c: load also nested classes on class init.
33481 System.ValueType instance methods gets passed boxed
33482 values, unless methods in derived classed that get a pointer to the
33484 * icall.c: use better name parsing code in GetType().
33485 * image.c, image.h: add mono_image_loaded ().
33486 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
33487 * reflection.c, reflection.h: added mono_reflection_parse_type().
33489 2002-01-22 Veronica De Santis <veron78@interfree.it>
33491 * icall.c : Added mapping of internal calls for Manual and Auto reset events
33492 * threads.c : Added the implementation of internal calls for events
33493 * threads.h : Added prototypes of internal calls for events
33495 2002-01-21 Radek Doulik <rodo@ximian.com>
33497 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
33499 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
33501 * class.c (mono_class_init): set min_align to 1 (instead of 0)
33502 (mono_class_value_size): use min_align
33504 2002-01-20 Dick Porter <dick@ximian.com>
33507 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
33508 so it compiles on w32.
33510 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
33512 * metadata.c (mono_type_stack_size): impl.
33514 * class.c (mono_class_get_field): impl. memberref token
33516 2002-01-16 Veronica De Santis <veron78@@interfree.it>
33518 * icall.h : Added the internal calls mapping for CreateMutex_internal
33519 and ReleaseMutex_internal.
33520 * threads.h : Added the prototype of mutexes internal calls.
33521 * threads.c : Added the implementations of mutexes internal calls.
33523 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
33525 * metaparse.h: removed unused file.
33526 * reflection.c, reflection.h: added stream_data_align () function
33527 to align data in streams and keep stream aligned. Add support for
33528 exception support in method headers.
33530 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
33532 * unicode.c: make iconv_convert () return the number of bytess written
33533 in the output buffer.
33535 2002-01-15 Dick Porter <dick@ximian.com>
33536 * threads.c: Make the runtime's idea of infinite timeouts coincide
33537 with the class library's
33539 Fix a particularly egregious bug in mono_thread_cleanup(). That
33540 code was so utterly bogus it must have been written on a Monday.
33542 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
33544 * reflection.h: add subtypes field to TypeBuilder.
33545 * reflection.c: encode constants for literal fields.
33546 Handle subtypes. Fix user string token (and add a zero byte)
33549 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
33551 * class.c (mono_class_init): bug fix: assign slot numbers for
33554 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
33556 * reflection.c: don't try to output a code RVA for abstract methods.
33557 Small fixes for method header format. Output parameter info to the
33558 ParamDef table. Save method overriding info to MethodImpl table.
33559 Fix property support. Allow typedef.extends to be a type in the
33561 * verify.c: fix off-by-one error.
33563 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
33565 * class.c: fix mono_class_from_mono_type () for szarray types.
33566 Remove unused cache check in mono_class_from_type_spec().
33567 * icall.c: *type_from_name () functions handle simple arrays and byref.
33568 * reflection.c: handle byref and szarray types. Handle methods without
33569 body (gets P/Invoke compilation working). Handle types and fields in
33571 * reflection.h: add rank to MonoTypeInfo.
33573 2002-01-10 Dick Porter <dick@ximian.com>
33575 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
33578 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
33580 * icall.c: initialize class in type_from_handle ().
33581 Loop also in parent classes for get_method ().
33582 * reflection.c: properly encode class and valuetype types.
33583 Start on encoding TypeBuilder types. Handle fieldrefs.
33584 Use correct length when registering a user string.
33585 Handle ConstructorBuilder and MonoMethod in get_token ().
33586 Make mono_type_get_object () aware of cached types.
33587 * object.c: back out change to mono_string_new ().
33589 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
33590 * object.c: mono_string_new should return a NULL when the string
33591 passed in is NULL -- not try to deference it.
33593 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
33595 * icall.c: hack to make IsSubType work for TypeBuilders.
33596 * reflection.c: emit constructors before methods.
33597 Retrieve param names in mono_param_get_objects().
33599 2002/01/05 Nick Drochak <ndrochak@gol.com>
33601 * Makefile.am: fix list of headers and sources so automake 1.5
33602 doesn't complain. Removed \# at end of list.
33604 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
33606 * reflection.c: get token for a method ref. Set return type of
33607 constructor to void.
33608 * loader.c: debug message.
33609 * class.c: typo fix.
33611 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
33613 * icall.c: fix array init with rank > 1. FindMembers
33614 loops in parent class as well.
33615 * image.c: do not insert nested types in name cache.
33616 * reflection.c: warning fix.
33617 * reflection.h: add override method (for interface impl).
33619 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
33621 * metadata.c: fix customattr decoding.
33623 2001-12-21 Miguel de Icaza <miguel@ximian.com>
33625 * rawbuffer.cs: Added native Win32 implementation, avoids using
33626 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
33628 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
33630 * class.c: make the low-level routines handle the cache.
33632 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
33634 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
33636 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
33638 * class.c: fix mono_array_element_size() for objects.
33639 * class.h, class.c: add properties to MonoClass and load them
33641 * icall.c: check with isinst() when assigning a value to an array
33642 instead of requiring the classes to match exactly.
33643 Implemented icall for System.Type::GetType().
33644 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
33645 enums. Handle bindingflags when looking for methods and fields.
33646 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
33647 and mono_metadata_methods_from_property().
33648 * reflection.h, reflection.c: added structures for propreties,
33649 parameters and enums. Implemented mono_property_get_object() and
33650 mono_param_get_objects().
33652 2001-12-18 Dick Porter <dick@ximian.com>
33654 * file-io.c: Use mono_string_to_utf16() instead of
33655 mono_string_chars()
33657 * object.c: Added mono_string_to_utf16(), which copies the non
33658 NULL-terminated MonoString into a new double-null-terminated
33661 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
33663 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
33665 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
33667 * file-io.c: raise exceptions if handle is invalid.
33669 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
33671 * assembly.c: yet another check for mscorlib.
33672 * class.c, class.h: load nesting info for classes.
33673 * icall.c: many new functions to support the Reflection classes.
33674 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
33675 * reflection.h, reflection.c: mono_image_create_token(),
33676 mono_assembly_get_object(), mono_type_get_object(),
33677 mono_method_get_object(), mono_field_get_object(): methods to return
33678 objects that parallel the C representation of assemblies, types,
33681 2001-12-11 Dick Porter <dick@ximian.com>
33684 * file-io.c: Internal calls for file IO.
33686 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
33688 * tabledefs.h: missing FileAttributes.
33689 * verify.h, verify.c: use is_valid_string () to simplify and check for
33690 valid strings more correctly. Fix warnings and speeling.
33691 Check more tables: Filed, File, ModuleRef, StandAloneSig.
33692 Check code: branches, maxstack, method calls.
33694 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
33696 * object.c (mono_object_allocate): removed static, so that the jit
33697 can allocate value types.
33699 * icall.c (ves_icall_System_DateTime_GetNow): impl.
33701 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33703 * class.c: init enum types right away and register the
33704 token->MonoClass map in mono_class_create_from_typedef ().
33705 * verify.h, verify.c: first cut of the verifier.
33706 * pedump.c: add --verify switch to verify metadata tables.
33707 * tabledefs.h: add some missing enums.
33709 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
33711 * class.c (mono_install_runtime_class_init): impl.
33712 (mono_class_init): renamed mono_class_metadata_init to
33713 mono_class_init, also removed the metadata_inited flag
33715 * object.c (mono_object_isinst): use faster algorithm
33717 2001-11-30 Radek Doulik <rodo@ximian.com>
33719 * mono-endian.h: reverted last change
33720 added function prototypes
33722 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
33723 add mono-endian.c back
33725 * mono-endian.c: returned back, as Paolo pointed out, it's needed
33726 for unaligned access, I've mistaked it with endianess. I am
33728 (mono_read16): fix reverted endianess
33729 (mono_read64): ditto
33730 (mono_read32): ditto
33732 2001-11-30 Dick Porter <dick@ximian.com>
33734 * exception.c: Implement mono_exception_from_name()
33736 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33738 * metadata.h, metadata.c: remove params_size and locals_size and their
33739 calculation from the metadata code: they are only usefult to the
33742 2001-11-29 Radek Doulik <rodo@ximian.com>
33744 * object.c (mono_ldstr): swap bytes here, it's probably not the
33745 best place, but works for me now, I'll redo it once I know mono
33746 better, also note that I add PROT_WRITE and don't reset back, also
33747 note that it's only affects big endians, so x86 should be OK
33749 * mono-endian.h (read16): use just glib macros for both endians
33751 * mono-endian.c: removed as glib macros are used in in
33752 mono-endian.h so we don't need to care about endianess for read
33753 macros as glib does that for us already
33755 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
33757 * class.h, class.h: take minimum alignment into consideration so
33758 that the fields of a class remain aligned also when in an array.
33760 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33762 * loader.h, loader.c: add mono_method_get_param_names().
33763 * class.c: 0-init class fields.
33765 2001-11-26 Dick Porter <dick@ximian.com>
33769 * threads.c: New file that handles System.Threading on all platforms
33772 * object.h: Remove the synchronisation struct from MonoObject,
33773 replace it with a pointer that gets initialised on demand
33775 * Makefile.am: Replace all the system-specific threading code with
33776 a single file that uses the new wrapper library
33778 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
33780 * class.c, class.h: add mono_install_trampoline() so that the runtime
33781 can register a function to create a trampoline: removes the ugly
33782 requirement that a runtime needed to export arch_create_jit_trampoline.
33783 * object.h, object.c: added mono_install_handler() so that the runtime
33784 can install an handler for exceptions generated in C code (with
33785 mono_raise_exception()). Added C struct for System.Delegate.
33786 * pedump.c: removed arch_create_jit_trampoline.
33787 * reflection.c: some cleanups to allow registering user strings and
33788 later getting a token for methodrefs and fieldrefs before the assembly
33790 * row-indexes.h: updates and fixes from the new ECMA specs.
33792 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
33794 * class.h, class.c: add enum_basetype field to MonoClass.
33795 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
33796 to get index in the constant table reated to a field, param or
33798 * reflection.h, reflection.c: handle constructors. Set public-key and
33799 version number of the built assembly to 0.
33800 * row-indexes.h: update from new ECMA spec.
33802 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33804 * class.h, class.c: add a max_interface_id to MonoClass.
33805 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
33806 since it's used to do that. Added mono_type_type_from_obj().
33807 Make GetType() return NULL instead of segfaulting if the type was not
33808 found. Handle simple arrays in assQualifiedName.
33809 * object.h: add a struct to represent an Exception.
33810 * reflection.c: output call convention in method signature.
33811 Add code to support P/Invoke methods and fixed offsets for fields.
33813 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
33815 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
33817 * icall.c: use mono_array_addr instead of array->vector: fixes the
33818 reflection image writing.
33819 * reflection.c: init call convention byte to 0 in method signature.
33820 Encode the property signature. Don't output property-related methods
33821 twice. Really process the properties for a type (don't cast a field to
33822 a property, my mom always told me that).
33823 Fix 64 bit issues in pointer alignment in a different and more
33826 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
33828 * loader.h: Removed type class from MonoDefaults, added monotype
33830 * loader.c: Loaded MonoType, removed loading of Type
33832 * icall.c (my_mono_new_object): Now returns a System.MonoType,
33833 and fills in System.Type._impl with a RuntimeTypeHandle rather
33834 than the actual MonoClass *
33836 (ves_icall_type_from_handle): change from type_class to
33839 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
33842 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
33845 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
33847 (ves_icall_System_Reflection_Assembly_GetType): implemented
33849 (ves_icall_System_MonoType_assQualifiedName): implemented
33851 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
33853 2001-11-09 Miguel de Icaza <miguel@ximian.com>
33855 * assembly.c (mono_assembly_open): Implement a cache for the
33858 (mono_assembly_close): only destroy the assembly when the last
33861 2001-11-09 Dick Porter <dick@ximian.com>
33863 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
33865 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
33867 * class.c (mono_class_metadata_init): bug fix: compute the right slot
33869 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33871 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
33872 from Martin Weindel.
33873 * object.h: add mono_string_chars ().
33875 2001-11-07 Miguel de Icaza <miguel@ximian.com>
33877 * reflection.c (build_compressed_metadata): Eliminates warnings
33878 and uses 64-bit clean code.
33880 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
33881 (mono_type_equal): Change signature to eliminate warnings.
33883 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33885 * icall.c, loader.c: remove the internalcall array constructors.
33886 Changes to match the new MonoArray structure.
33887 * object.h, object.c: an array object doesn't allocate an extra
33888 vector. Add mono_array_new_full () to create jagged arrays easily.
33890 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33892 * metadata.h, metadata.c: add mono_metadata_field_info () to
33893 retreive all the info about a field from vairous tables.
33894 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
33895 * class.h, class.c: augment MonoClassField with more info.
33896 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
33897 policy and load a field's RVA if needed.
33899 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
33901 * class.c (mono_class_metadata_init): create a trampoline for all
33902 virtual functions instead of actually compiling them.
33904 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
33906 * class.h, class.c: include name in MonoClassField.
33907 * class.c: fix fundamental type of System.Object and System.String.
33908 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
33910 * icall.c: remove internalcalls for the Reflection stuff that is now
33912 * loader.c: mono_field_from_memberref () implementation.
33913 * mono-endian.c: thinko (s/struct/union/g).
33914 * object.c, object.h: make the mono_string_* prototypes actually use
33915 MonoString instead of MonoObject.
33916 * reflection.c, reflection.h: updates for changes in the reflection
33917 code in corlib: we use C structures that map to the actual C# classes.
33918 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
33919 fat method header if needed and use the info from the ILGenerator for
33920 methods. Handle fields in types. Misc fixes.
33922 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
33924 * class.c (mono_class_metadata_init): bug fix: always allocate
33925 space for static class data
33927 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
33929 * class.c (mono_compute_relative_numbering): use relative
33930 numbering to support fast runtime type checks.
33932 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
33934 * class.c (mono_class_create_from_typeref): added debugging output
33935 to print class name when MonoDummy is returned instead of real class
33937 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
33939 * class.c (mono_class_metadata_init): interface offset table now
33940 contains pointers into the vtable - this is more efficient for the jit
33942 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
33944 * class.c (mono_class_metadata_init): use a temporary vtable (the
33945 old algorithm only worked for the interpreter, but not for the jit)
33947 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
33949 * loader.c (method_from_memberref): use mono_class_get to get the
33950 class of an array instead of using System.Array directly.
33951 (mono_get_method): also add MEMBERREF methods to the method cache
33952 which usefull for arrays.
33954 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
33956 * pedump.c (arch_compile_method): added to compute vtable entry
33958 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
33959 number of interfaces.
33961 * class.h: merged MonoArrayClass into MonoClass
33963 * class.c (mono_class_create_from_typedef): compute the vtable size and
33964 allocate space to include the vtable inside MonoClass
33965 (mono_class_metadata_init): initialize the vtable
33967 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
33969 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
33970 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
33971 * image.c: endian fixes by Laurent Rioux.
33972 * object.h, object.c: rename MonoStringObject to MonoString and
33973 MonoArrayObject to MonoArray. Change some function names to conform to
33974 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
33975 guint16* as first argument, so don't use char*.
33976 Provide macros to do the interesting things on arrays in a portable way.
33977 * threads-pthread.c: updates for the API changes and #include <sched.h>
33978 (required for sched_yield()).
33979 * icall.c: updates for the API changes above.
33980 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
33981 platforms that need them.
33983 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33985 * class.c: set the correct type for all the fundamental
33986 type when loading the class.
33988 2001-10-05 Dick Porter <dick@ximian.com>
33990 * threads-pthread.c (pthread_mutex_timedlock): Simple
33991 compatibility version for C libraries that lack this call.
33993 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33995 * class.c: MonoTypes stored in MonoClass are stored as
33996 fundamental MonoTypes when the class represents a
33997 fundamental type (System.Int32, ...).
33998 The TypeHandle return by ldtoken is a MonoType*.
33999 * icall.c: ves_icall_get_data_chunk () write out all the
34000 PE/COFF stuff. Implement ves_icall_define_method (),
34001 ves_icall_set_method_body (), ves_icall_type_from_handle ().
34002 * image.c: properly skip unknown streams.
34003 * loader.h, loader.c: add type_class to mono_defaults.
34004 * metadata.c, metadata.h: export compute_size () as
34005 mono_metadata_compute_size () with a better interface.
34006 Typo and C&P fixes.
34007 * pedump.c: don't try to print the entry point RVA if there is no entry point.
34008 * reflection.c, reflection.h: many cleanups, fixes, output method
34009 signatures and headers, typedef and typeref info, compress the metadata
34010 tables, output all the heap streams, cli header etc.
34011 * row-indexes.h: typo fixes.
34013 2001-10-04 Dick Porter <dick@ximian.com>
34015 * object.h: Add a synchronisation mutex struct to MonoObject
34017 * object.c (mono_new_object): Initialise the object
34018 synchronisation mutexes
34020 * icall.c: System.Threading.Monitor internal calls
34022 * threads-pthread.h:
34023 * threads-pthread.c: System.Threading.Monitor internal calls
34025 * threads-types.h: New file, includes the system-specific thread
34028 * threads-pthread-types.h:
34029 * threads-pthread-types.c: New files, handle pthread-specific
34030 synchronisation types
34032 * threads-dummy-types.h:
34033 * threads-dummy-types.c: New files of dummy support for
34034 thread-specific types
34038 * pedump.c: include mono-endian.h not endian.h
34040 * Makefile.am: More threads files.
34041 Name mono-endian.h not endian.h
34043 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
34045 * Makefile.am, reflection.h, reflection.c: move here the reflection related
34046 stuff and implement a few more bits.
34047 * icall.c: a field needs to be dereferenced twice. Do not use the same
34048 name for two variables in the same scope.
34049 * image.c, image.h: cleanups.
34051 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
34053 * class.c (mono_class_metadata_init): bug fix: compute the right size
34055 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
34057 * icall.c: implemented some of the Reflection internalcalls.
34058 * image.c, image.h: start writing out the PE/COFF image.
34059 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
34060 that does the reverse than decode_blob_size ().
34061 * object.c: use mono_metadata_encode_value (). Move here
34062 temporary implementation of mono_string_to_utf8 ().
34063 * rawbuffer.c: make malloc_map static.
34065 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
34067 * metadata.c: fix type comparison for arrays.
34068 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
34069 Added a couple of new classes to monodefaults.
34070 * icall.c: added a couple of Reflection-related internalcalls.
34071 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
34072 Added a byval_arg MonoType to MonoClass.
34074 2001-09-28 Dick Porter <dick@ximian.com>
34077 * threads-pthread.h:
34078 * threads-pthread.c: Implemented internal calls for
34079 LocalDataStoreSlot operations. Applied mutexes around all shared
34080 data. Reworked the thread creation and Start() operations to
34081 avoid a race condition.
34084 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
34086 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
34088 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
34090 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
34092 * class.c, loader.c: warn and return NULL instead of erroring out.
34093 * icall.c: added System.AppDomain::getCurDomain().
34094 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
34096 2001-09-25 Dick Porter <dick@ximian.com>
34098 * threads-pthread.h:
34099 * threads-pthread.c: Implemented timed thread joining and added
34100 System.Threading.Thread::Join_internal internal call
34102 * icall.c: Added System.Threading.Thread::Join_internal internal call
34105 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
34107 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
34109 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
34110 mono_string_intern () to implement the semantics of the ldstr opcode
34111 and the interning of System.Strings.
34112 * icall.c: provide hooks to make String::IsIntern and String::Intern
34115 2001-09-23 Dick Porter <dick@ximian.com>
34118 * threads-dummy.h: New files of dummy threading routines
34120 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
34121 support code based on system specifics
34123 Rename PTHREAD_LIBS to THREAD_LIBS
34125 2001-09-23 Dick Porter <dick@ximian.com>
34127 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
34128 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
34130 (mono_thread_init): Set up a Thread object instance to return when
34131 the main thread calls Thread.CurrentThread
34132 (mono_thread_cleanup): Wait for all subthreads to exit
34134 * icall.c: New internal calls for System.Threading.Thread::Sleep
34135 (including Schedule) and CurrentThread
34137 * threads.h: New file, to insulate thread-specific stuff from the
34140 2001-09-21 Dick Porter <dick@ximian.com>
34142 * threads-pthread.h:
34143 * threads-pthread.c: New file, for handling pthreads-style
34144 threading support. Start() now starts a new thread and executes
34145 the ThreadStart delegate instance.
34147 * icall.c: Added the internalcall for
34148 System.Threading.Thread::Start_internal
34150 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
34152 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
34154 * loader.c: work around the different signatures for delegates
34155 constructors csc generates in compiled code vs the ones compiled in mscorlib.
34157 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
34159 * class.h, class.c: add mono_class_get_field_from_name ().
34160 * *: Fix C comments and other ANSI C issues.
34162 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
34164 * endian.h, assembly.c: fix some endianness issues.
34166 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
34168 * loader.h, load.c: add delegate_class to mono_defaults.
34169 Handle runtime provided methods in mono_get_method ().
34171 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
34173 * loader.c (mono_get_method): use pinvoke for internal call
34175 * icall.c: use pinvoke for internal call
34177 * loader.c (method_from_memberref): set the method name
34179 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
34181 * metadata.c: help the compiler generate better code for
34182 mono_class_from_mono_type ().
34184 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
34186 * class.c (mono_class_metadata_init): delayed computing of the
34187 class size to mono_class_metadata_init ()
34189 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
34191 * class.c, class.h: add an interfaces member to MonoClass.
34192 * image.c, image.h: add assembly_name field to MonoImage
34193 from the assembly table.
34194 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
34196 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
34198 * class.c: Handle Array in mono_class_from_mono_type ().
34199 * metadata.c, pedump.c: some endian fixes.
34201 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
34203 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
34204 * metadata.c: fix small problem introduced with the latest commit.
34206 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
34208 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
34209 We don't need a MonoMetadata pointer anymore to compare signatures in
34210 mono_metadata_signature_equal (), update callers.
34211 Reduced memory usage an number of allocations for MonoMethodHeader and
34212 MonoMethodSignature.
34214 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
34216 * metadata.c: added compare for szarray.
34218 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
34220 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
34221 and add a couple more types to it and mono_defaults. Give an hint on
34222 classes that need implementing in our corlib and are referenced
34225 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
34227 * class.h, class.c: keep track if a class is also an Enum.
34228 * loader.c: Implement a couple more types for use in libffi
34229 marshalling. Gives better diagnostics when failing to dlopen
34230 a library. Set method->klass for P/Invoke methods, too.
34232 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
34234 * class.c, class.h: add a MonoType this_arg to MonoClass that
34235 represents a pointer to an object of the class' type that
34236 can be used by the interpreter and later the type cache.
34237 Add best guess alignment info for valuetype objects.
34239 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
34241 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
34242 into MonoType: one less level of indirection and allocation and
34243 simplifies quite a bit of code. Added cache for MonoTypes that are
34244 used frequently, so that we don't need to allocate them all the time.
34246 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
34248 * class.c (mono_class_create_from_typedef): System.Enum is also a
34249 value type, although it does not derive from System.ValueType
34250 (maybe a bug in the ms compiler?)
34252 * metadata.c (mono_type_size): return the right size for value types
34254 * loader.c (mono_get_method): only initialize method header if not abstract
34256 * class.c (mono_class_from_mono_type): use mono_default values.
34258 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
34260 * *: use MonoClass pointers instead of <type_tokens>
34262 * class.h: new flag: metadata_inited.
34264 * class.c (mono_class_metadata_init): impl.
34265 (mono_class_instance_size): impl.
34266 (mono_class_data_size): impl.
34268 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
34270 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
34271 MonoClass now has the name and name_space fields.
34272 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
34273 mono_get_method () takes and optional MonoClass as argument.
34274 Removed mono_typedef_from_name() and added mono_class_token_from_name()
34275 instead that takes advantage of a map from class names to typedef
34276 tokens in MonoImage.
34278 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
34280 * metadata.c: zero is not a valid alignment boundary.
34281 Merge MONO_TYPE_VOID in default decoding code.
34283 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
34285 * image.h: merged MonoMetadata into MonoImage
34287 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
34288 identify the type of elements.
34290 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
34292 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
34293 * cil-coff.h: split MonoMSDOSHeader and add size info.
34294 * image.c: add some consistency checks.
34295 * metadata.c: fix row size computation: one programmer
34296 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
34297 add explanation for the locator routine.
34298 Fix decoding of size in method header.
34300 2001-08-20 Miguel de Icaza <miguel@ximian.com>
34302 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
34303 (g_concat_dir_and_file): Bring g_concat_dir_and_file
34304 function from gnome-libs. This uses the right path separator
34305 based on the OS, and also works around a bug in some systems where
34306 a double slash is not allowed.
34307 (default_assembly_name_resolver): Use g_concat_dir_and_file
34308 (mono_assembly_open): ditto.
34310 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
34312 * metadata.c (mono_metadata_signature_equal): impl.
34314 * *: void is now a realy MonoType (instead of using NULL)
34316 * metadata.c (do_mono_metadata_parse_type): use
34317 mono_metadata_parse_type to parse void value.
34319 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
34321 * metadata.c, metadata.h: in the signature and method header store
34322 only the space required for holding the loca vars and incoming arguments.
34324 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
34326 * metadata.c (do_mono_metadata_parse_type): treat void like any
34327 other type (instead of assigning NULL);
34329 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
34331 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
34333 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
34335 * image.c (do_mono_image_open): added a cache for arrays.
34337 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
34339 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
34340 decode a single column from a row in a metadata table and changes
34341 to take advantage of it in the typedef locator (gives a nice speed up).
34342 Store offset info for function params.
34344 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
34346 * image.h (MONO_IMAGE_IS_CORLIB): removed
34348 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
34350 * assembly.c: how could mono_assembly_close () had ever worked?
34351 * metadata.c, metadata.h: provide offset info for local vars.
34352 Implement mono_type_size () to take care of alignment as well
34353 as size (it was mono_field_type_size in cli/class.c before).
34355 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
34357 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
34359 * assembly.h (CORLIB_NAME): set to corlib.dll
34361 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
34363 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
34365 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
34366 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
34367 tokentype.h: massive namespace cleanup.
34369 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
34371 * metadata.h, metadata.c: decode exception clauses when parsing method header.
34373 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
34375 * metadata.c (mono_metadata_free_type): added check for type !=
34376 NULL (void) before calling mono_metadata_free_type()
34378 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
34380 * metadata.h, row_indexes.h: added header with enumerations to use
34381 to index in the columns from tables in metadata and to decode coded
34382 tokens: we should start using this instead of embedding magic numbers
34385 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
34387 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
34388 Move metadata_t info from cli_image_info_t to MonoImage, where
34389 it's easily accessible. Changed all the uses accordingly.
34390 Added the method and class caches to MonoImage.
34391 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
34392 and mono_metadata_decode_value () signature to be more consistent
34393 with the other parse functions (and simplify code). Taken advantage
34394 of zero-length array allocation with GCC. Removed reduntant (and
34395 wrong) MonoFieldType struct and use MonoParam instead. Changed
34396 mono_metadata_parse_field_type () to use common code for parsing.
34397 Added mono_metadata_typedef_from_field () and
34398 mono_metadata_typedef_from_method () to lookup a typedef index from a
34399 field or method token.
34400 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
34402 2001-07-23 Miguel de Icaza <miguel@ximian.com>
34404 * metadata.c (mono_metadata_parse_field_type): Implement.
34405 (do_mono_metadata_parse_type): Split engine from
34406 mono_metadata_parse_type, so that we can create smaller structures
34407 for things that just have one pointer to the MonoType (look at
34410 2001-07-20 Miguel de Icaza <miguel@ximian.com>
34412 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
34413 as Jan Gray found out, it is incorrect.
34415 2001-07-18 Miguel de Icaza <miguel@ximian.com>
34417 * assembly.c: Implement asssembly loading. This loads an image
34418 and loads all the referenced assemblies. Come to think of it, we
34419 could always do lazy loading of the assemblies.
34421 * image.c (mono_image_open): Keep loaded images in a hashtable.
34423 * image.h (MonoImage): Add reference count.
34425 2001-07-17 Miguel de Icaza <miguel@ximian.com>
34427 * assembly.c (mono_assembly_open): Keep track of the file name in
34428 case the assembly has no ASSEMBLY table.
34430 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
34433 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
34435 * metadata.c, metadata.h: decode local vars in method header
34436 parse function. Change callers accordingly.
34438 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
34440 * metadata.h, cil-coff.h: protect against multiple inclusion.
34441 Added some new structures to hold information decoded from metadata:
34442 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
34443 and relevant decoding/free functions.
34444 * metadata.c: implement decoding functions. Add warning for out of bounds
34445 index in mono_metadata_locate(). Implement mono_get_method () to retreive
34446 all the info about a method signature and invocation. Remove check on
34447 uninitialized local var in parse_mh() and fix memory leak.
34449 2001-07-12 Miguel de Icaza <miguel@ximian.com>
34451 * metadata.h: More macros.
34453 * tokentype.h: New file.
34455 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
34457 * assembly.c: added a consistency check and initialize
34458 some structures with g_new0().
34459 * metadata.c: fixed a couple more bugs in table size computation
34460 and add other checks for out-of bound access to metadata.
34462 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
34464 * metatada.c: fix bugs computing table sizes. Spew a
34465 warning when index in string heap is out of bounds.
34467 2001-07-04 Miguel de Icaza <miguel@ximian.com>
34469 * metadata.h: Add a couple of macros to manipulate tokens.
34471 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
34473 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
34474 cli_section_tables).
34476 2001-07-01 Miguel de Icaza <miguel@ximian.com>
34478 * metadata.c (mono_metadata_user_string): New function, provides
34479 access to the UserString heap.
34481 2001-06-27 Miguel de Icaza <miguel@ximian.com>
34483 * metadata.c: Add inline documentation.
34485 2001-06-26 Miguel de Icaza <miguel@ximian.com>
34487 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
34490 2001-06-22 Miguel de Icaza <miguel@ximian.com>
34492 * typeattr.h: New file, TypeAttribute flags.
34494 2001-06-21 Miguel de Icaza <miguel@ximian.com>
34496 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
34497 mono_assembly_ensure_section): Section loading code.
34498 (load_section_tables): Load the sections.
34500 * mono/metadata/metadata.c (mono_metadata_locate_token,
34501 mono_metadata_locate): Functions to locate the information
34502 definition given a token or a table and an index.
34503 (mono_metadata_compute_table_bases): New.
34504 (compute_size): New function to compute the sizes of the various
34507 * mono/metadata/metadata.h: Finish listing the different index
34510 * mono/metadata/pedump.c: Improve to dump new information.
34512 2001-06-19 Miguel de Icaza <miguel@ximian.com>
34514 * mono/metadata/metadata.c: Entered all the tables matching
34517 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2