1 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3 * class.c: Add missing check for load errors after every
4 call to mono_class_setup_fields
8 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
10 metadata-verify.c (verify_tables_schema): Fix the error message.
12 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
14 * metadata.c: Change event table schema to use TDOR for event type
15 as this is what it's meant to be.
17 * metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
18 to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
21 * metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
22 longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
23 rows in MONO_TABLE_GENERICPARAM.
27 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
29 * class.c (mono_image_add_to_name_cache): Assert on duplicate
32 * reflection.c (mono_reflection_setup_internal_class): Avoid
33 registering a gc root the same MonoClass multiple times.
34 Don't register nested types on the global scope as they should
35 not be available there.
37 2009-11-05 Rolf Bjarne Kvinge <RKvinge@novell.com>
39 * culture-info-tables.h: regenerated.
41 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
43 * debug-helpers.c: avoid g_strdup() in mono_type_full_name().
45 2009-11-04 Sebastien Pouliot <sebastien@ximian.com>
47 * string-icalls.c|h: Remove string internal calls that are not
48 used anymore by the class libraries.
49 * icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
50 which is not used in the class librairies.
51 * icall-def.h: Update tables.
53 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
55 * class.h: Move mono_class_inflate_generic_type_checked...
57 * class-internals.h: to here and make it internal. We don't want to
58 further expose MonoGenericContext.
60 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
62 * verify.c (mono_method_verify): Improve error message.
64 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
66 * reflection.c (fieldref_encode_signature): If field_image is NULL then
67 the token is already properly encoded. Fixs 4.0 build.
69 2009-11-04 Rolf Bjarne Kvinge <RKvinge@novell.com>
71 * locales.c (construct_number_format): Check if the number index is
72 valid before trying to use it, if not, just return.
74 2009-11-04 Zoltan Varga <vargaz@gmail.com>
76 * marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
77 since that loses the abort state. Fixes #539394.
79 2009-11-03 Zoltan Varga <vargaz@gmail.com>
81 * marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
82 explicit this argument to the call signature.
83 (mono_marshal_get_icall_wrapper): Ditto.
85 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
87 * reflection.c (fieldref_encode_signature): Add new field_image parameter
88 to indicate which assembly to use when resolving a custom-mod.
90 Fixes handling of volatile fields used across assemblies as reported in #551513.
92 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
94 * loader.c: Improve error messages.
96 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
98 * class.c (mono_class_setup_methods): Only give a slot for virtual methods
99 of interfaces. Fixes IKVM.
101 * class.c (mono_class_setup_vtable_general): Improve debug spew.
103 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
105 * verify.c (verifier_inflate_type): Return the inflated type on success.
107 2009-11-02 Zoltan Varga <vargaz@gmail.com>
109 * debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.
111 * threads.c (mono_thread_attach): Call the profiler thread start callback.
113 * object-internals.h (_MonoThreadInternal): Add a 'flags' field.
115 * threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
118 * profiler.c: Add new profiler callbacks for runtime invoke.
120 * object.c (mono_runtime_invoke): Call the runtime invoke callbacks.
122 2009-11-01 Mark Probst <mark.probst@gmail.com>
124 * sgen-gc.c: Keep track of the reason for a major collection and
125 write it to the heap-dump file.
127 2009-10-31 Miguel de Icaza <miguel@novell.com>
129 * threads.c: refactor the code that initializes the
130 thread_start_args into a reusable function and use this in the two
131 methods that start up threads.
133 2009-10-31 Zoltan Varga <vargaz@gmail.com>
135 * appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
136 Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.
138 2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
140 * mono-perfcounters.c: add the "_Total" instance for CPU counters.
141 Until now, we only had the per-cpu(core) counters.
143 2009-10-28 Mark Probst <mark.probst@gmail.com>
145 * gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
146 mono_gc_get_suspend_signal(), which returns the suspend signal
147 number used by the GC.
149 2009-10-25 Zoltan Varga <vargaz@gmail.com>
151 * threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.
153 * threads.c (start_wrapper): Call mono_profiler_thread_start () later after
154 signalling start_notify.
156 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
158 * appdomain.c: do not test the st_mode field for shadow-copies.
161 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
163 * threadpool.[ch]: added hooks for thread start/finish and item
164 processing begin/end. For monotouch use only.
166 2009-10-24 Zoltan Varga <vargaz@gmail.com>
168 * threads.c (mono_thread_get_name): New helper function.
170 * reflection.c (resolve_object): Set handle_class for strings too.
171 (mono_reflection_create_custom_attr_data_args): New helper function to decode
172 a cattr blob into a set of arrays and structures without creating the custom
173 attributes themselves.
174 (create_custom_attr_data): Simplify using create_custom_attr_data_args.
176 * mono-debug.c (mono_debug_il_offset_from_address): New helper function.
178 * debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
181 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
183 * verify.c: Replace calls to mono_class_inflate_generic_type with
184 mono_class_inflate_generic_type_checked. Fixes #480005.
186 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
188 * class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
189 object since not all paths lead to callees initing it.
191 2009-10-23 Alp Toker <alp@nuanti.com>
193 Fix embedding API breakage from r144688. mono-compiler.h is an internal
194 header and should not be shipped:
196 * class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
197 which is specific to the mono build. Not going to work.
199 2009-10-23 Sebastien Pouliot <sebastien@ximian.com>
201 * security-manager.c: Report if core-clr is active from
202 ves_icall_System_Security_SecurityManager_get_SecurityEnabled
203 to allow Moonlight BCL to behave appropriately (both in browser
204 and outside, e.g. smcs)
206 2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
208 * mono-config.c: ignore UTF-8 BOM and report parser errors.
211 2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
215 2009-10-22 Rodrigo Kumpera <rkumpera@novell.com>
217 * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
218 a MonoError parameter.
220 * class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
221 version that can does proper error handling.
223 * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
225 * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
227 * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.
229 2009-10-20 Zoltan Varga <vargaz@gmail.com>
231 * debug-helpers.c (dis_one): Fix the disassembly of empty strings when
232 NO_UNALIGNED_ACCESS is defined.
234 2009-10-22 Zoltan Varga <vargaz@gmail.com>
236 * marshal.c (mono_string_builder_to_utf16): Applied patch from
237 Hib Eris <hib@hiberis.nl>. Return empty string for empty string builders.
240 2009-10-22 Mark Probst <mark.probst@gmail.com>
242 * sgen-gc.c: Shorten sections whenever possible.
244 2009-10-22 Mark Probst <mark.probst@gmail.com>
246 * sgen-gc.c: Use our portable semaphore #defines.
248 2009-10-22 Mark Probst <mark.probst@gmail.com>
250 * sgen-gc.c: A debug option for dumping the heap layout to a file
251 after each collection.
253 2009-10-21 Mark Probst <mark.probst@gmail.com>
255 * sgen-gc.c: Make managed write barriers atomic via
258 2009-10-21 Rodrigo Kumpera <rkumpera@novell.com>
260 * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
261 methods. Fixes #543021.
263 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
265 * socket-io.[ch]: fix VS build.
267 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
270 * socket-io.[ch]: implemented SendFile.
272 2009-10-20 Zoltan Varga <vargaz@gmail.com>
274 * class.c (mono_class_create_from_typedef): Initialize class->element_class
275 before the interfaces to avoid crashes later if class initialization fails.
278 * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
281 2009-10-20 Marek Safar <marek.safar@gmail.com>
283 * domain.c: Bump 4.0 version.
285 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
287 * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
288 code is known. (parse_public_key) Remove duplicate (unneeded) NULL
289 check since 'pubkey' can't be NULL at this stage
290 * icall.c (ves_icall_System_Array_FastCopy): Add comment about
291 the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
292 initialization of 'iter'
294 2009-10-16 Bill Holmes <billholmes54@gmail.com>
296 * cominterop.c : Search the interface parts of vtable to find
297 method matches. Fixes 547030.
299 Code is contributed under MIT/X11 license.
301 2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
303 * marshal.c: BeginInvoke cannot be called on multicast delegates with
304 multiple targets. Fixes bug #574426.
306 2009-10-14 Massimiliano Mantione <massi@ximian.com>
308 * profiler.h: Put here the definition of
309 MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
310 (and fix the build...).
312 2009-10-14 Massimiliano Mantione <massi@ximian.com>
314 * profiler.c, profiler.h, profiler-private.h:
315 Added support for different ways of getting call chains in stat mode.
317 2009-10-12 Mark Probst <mark.probst@gmail.com>
319 * object.c, object-internals.h: New function for computing the
320 size of an array, factored out of mono_array_new_full(). Use
321 SGen's functions for allocating arrays and vectors.
323 * sgen-gc.c, gc-internal.h: Special functions for allocating
324 arrays and vectors without race conditions. A managed array
327 * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
329 2009-10-12 Mark Probst <mark.probst@gmail.com>
331 * object.c, object.h, icall.c: Write barriers do the copying now,
332 as well, so no need for an additional memcpy.
334 * sgen-gc.c: Lock when storing remsets. Do the memory
335 copying/moving in the write barriers.
337 * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
339 * reflection.c: Added an assert.
341 2009-10-12 Mark Probst <mark.probst@gmail.com>
343 * threads.c, process.c: A few missing write barriers.
345 2009-10-12 Joel W. Reed <joelwreed@gmail.com>
347 * mono-perfcounters.c, mono-perfcounters-def.h: Add
348 network performance counters for bytes sent per second, bytes
349 received per second, and bytes total per second.
351 Code is contributed under MIT/X11 license.
353 2009-10-09 Mark Probst <mark.probst@gmail.com>
355 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
358 2009-10-09 Mark Probst <mark.probst@gmail.com>
360 * threads.c, object-internals.h, object.c: Move code for
361 transferring an object to a different domain (via
362 serialization/remoting) to object.c.
364 * object.c (call_unhandled_exception_delegate): If the exception
365 is in a different domain than the delegate, transfer the exception
368 2009-10-07 Zoltan Varga <vargaz@gmail.com>
370 * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
373 2009-10-06 Zoltan Varga <vargaz@gmail.com>
375 * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
377 2009-10-06 Mark Probst <mark.probst@gmail.com>
379 * object.c (mono_method_return_message_restore): Handle the case
380 where the argument is an instance of a generic type. Fixes
383 2009-10-06 Mark Probst <mark.probst@gmail.com>
385 * object.c (set_value): Write barrier fix - we must pass the
388 2009-10-05 Zoltan Varga <vargaz@gmail.com>
390 * domain.c (mono_init_internal): Print a useful error message when encountering
391 an old mscorlib, instead of crashing. Fixes #544307.
393 2009-10-04 Zoltan Varga <vargaz@gmail.com>
395 * appdomain.c (copy_app_domain_setup): Fix a warning.
397 * debug-helpers.c (dis_one): Ditto.
399 2009-10-04 Mark Probst <mark.probst@gmail.com>
401 * domain-internals.h, appdomain.c: The AppDomainSetup is copied
402 into the new domain, instead of referencing the original one.
404 * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
407 * appdomain.c: Corlib version bump.
409 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
411 * threadpool.c: one more...
413 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
415 * threadpool.c: forgot a LeaveCriticalSection when telling the idle
416 threads to die because we're shutting down. delgate5.exe works again.
418 2009-10-01 Bill Holmes <billholmes54@gmail.com>
420 * cominterop.c (mono_marshal_free_ccw_entry): Updating the
421 ccw_interface_hash table when a ccw is finalized.
423 Code is contributed under MIT/X11 license.
425 2009-09-30 Mark Probst <mark.probst@gmail.com>
427 * assembly.c, domain.c, image.c, metadata-internals.h: Split
428 domain and image unloading into two steps. We must do this
429 because clearing the domain in SGen requires the class metadata to
430 be intact, but we need to free the mono_g_hash_tables in case a
431 collection occurs during domain unloading and the roots would trip
434 2009-09-30 Mark Probst <mark.probst@gmail.com>
436 * object-internals.h: Remove serialized culture fields from
439 * icall-def.h, thread-types.h, threads.c: Remove serialized
442 * appdomain.c: Corlib version bump.
444 2009-09-30 Zoltan Varga <vargaz@gmail.com>
446 * marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
449 2009-09-30 Mark Probst <mark.probst@gmail.com>
451 * sgen-gc.c: Try to shorten the new section after a major
452 allocation to avoid ever-growing sections.
454 2009-10-13 Martin Baulig <martin@ximian.com>
456 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
457 `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
458 `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
459 `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
461 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
463 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
465 * threadpool.c: fixed the order in which 'completed' and the wait
466 handle, if any, are set. Fixes bug #542933 and delegate2.exe
467 No need to use the wait_handle field of ASyncCall. Make sure the
468 threadpool is active when adding a job or queueing an idle thread.
470 2009-09-29 Zoltan Varga <vargaz@gmail.com>
472 * object.c (mono_unhandled_exception): Fix a crash if there is no main thread.
474 * threads.c (build_wait_tids): Fix a crash if there is no main thread, like
475 when using --compile-all.
477 2009-09-27 Mark Probst <mark.probst@gmail.com>
479 * metadata.c (free_generic_class): Unregister the field_objects
480 roots if we're using SGen.
482 2009-09-27 Mark Probst <mark.probst@gmail.com>
484 * reflection.c (mono_dynamic_image_free): Deregister the GC root
485 for GenericParamTableEntry.gparam.
487 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
489 * marshal.c: don't create the handle when calling. It is created later
492 2009-09-26 Mark Probst <mark.probst@gmail.com>
494 * sgen-gc.c: Warning fixes.
496 2009-09-26 Mark Probst <mark.probst@gmail.com>
498 * sgen-gc.c: New debug option "xdomain-checks", which scans the
499 whole heap for cross-domain references before each collection.
501 * sgen-scan-object.h: The scan action can now use SCAN to scan the
504 * threadpool-internals.h, threadpool.c: New function
505 mono_thread_pool_is_queue_array() for checking whether a given
506 array is used as a (cross-domain) queue by the thread pool code.
508 2009-09-26 Mark Probst <mark.probst@gmail.com>
510 * sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
511 searches the whole heap for objects containing a specific
512 reference. Only for debugging.
514 2009-09-26 Mark Probst <mark.probst@gmail.com>
516 * appdomain.c (MONO_CORLIB_VERSION): Bumped.
518 * icall-def.h, threads.c, threads-types.h: New icalls for copying
519 byte arrays between domains.
521 2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
525 * mono-perfcounters-def.h:
526 * mono-perfcounters.c:
527 -There is a list of idle threads
528 -Each of those idle threads wait on their own WaitHandle instead
529 of all of them using the same semaphore. When a new work item is
530 added, the job is assigned directly to an idle thread or a newly
531 created one if possible and then the handle for that thread is
532 signaled. Compare that to the current approach where all the
533 threads in the pool compete to dequeue a job from the same
535 -New struct ThreadPool that brings together the bunch of static
536 variable for each threadpool (IO and regular).
537 -New performance counters: # of items added and its rate per
538 threadpool. The rate will be used later, perhaps together with
539 other perf. counters, to decide when idle threads should exit.
541 2009-09-25 Jonathan Chambers <joncham@gmail.com>
543 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal):
544 Fix typo on Windows build.
545 (ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
547 Code is contributed under MIT/X11 license.
549 2009-09-25 Mark Probst <mark.probst@gmail.com>
551 * object-internals.h: The Thread class is split up into Thread and
552 InternalThread now. We have exactly one InternalThread per
553 thread, and at most one Thread per appdomain per thread. Most
554 data is stored in InternalThread. All InternalThread objects live
557 * class-internals.h: Add internal_thread_class to MonoDefaults.
559 * appdomain.c (mono_domain_unload), attach.c (receiver_thread),
560 domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
561 socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
562 resulting from the split of the Thread class.
564 * gc-internal.h: Prototype for new function for checking whether a
565 thread is the finalizer thread.
567 * appdomain.c: Corlib version bump.
569 2009-09-25 Rolf Bjarne Kvinge <RKvinge@novell.com>
571 * appdomain.c|h: Add a mono_domain_try_unload method which is
572 equivalent to mono_domain_unload, except that it returns an exception
573 instead of throwing it. Make mono_domain_unload use the
574 mono_domain_try_unload method to avoid code-duplication.
576 2009-09-25 Zoltan Varga <vargaz@gmail.com>
578 * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
581 2009-09-24 Zoltan Varga <vargaz@gmail.com>
583 * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
584 aborting when a conversion is not implemented.
586 2009-09-23 Miguel de Icaza <miguel@novell.com>
588 * verify.c: when comparing culture strings, use g_ascii_strcmp
590 * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
591 when comparing public key tokens to use memcmp on 16 bytes. I do
592 not believe this ever worked as advertised in the past.
594 The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
595 which would have always failed earlier.
597 2009-06-25 Miguel de Icaza <miguel@novell.com>
599 * gc.c: Raise a NullArgumentException if the object passed is
602 2009-09-22 Zoltan Varga <vargaz@gmail.com>
604 * image.c (mono_image_close): Atomically decrement the reference count and
605 remove the image from the hash tables, to prevent another thread from seeing a
606 dying MonoImage. Fixes #541194.
608 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
610 * threadpool.c: actually use the minimum number of 'completion ports'
611 (for us is just a potential worker thread).
613 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
615 * threadpool.c: remove ares_htable. It does not make sense any more
616 since the same objects are now stored in GC-tracked arrays while they are
619 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
621 * threadpool.c: increase the minimum length of the queues to 128.
624 2009-09-21 Zoltan Varga <vargaz@gmail.com>
626 * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
627 return the modified signature used by string ctors.
629 2009-09-20 Zoltan Varga <vargaz@gmail.com>
631 * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
632 to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
633 method, to be used by full-aot.
635 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
637 Since the runtime supports lazy initialization of a type's vtable and this can cause a type
638 to fail, we need to ensure that the vtable is properly initialized at spots were the type must
641 * class.c (mono_class_init): Fail array types if their element type fails initialization
644 * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
645 initialization, additionally we request the element_type vtable to be initialized as well.
647 This is fine and should not increase the working set in any meaningful way since it's reasonable
648 to assume that most code will create an array and eventually populate it, which will require the
649 type's vtable to be initialized.
651 * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
653 2009-09-17 Atsushi Enomoto <atsushi@ximian.com>
655 * normalization-tables.h : regenerated.
657 2009-09-16 Zoltan Varga <vargaz@gmail.com>
659 * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
660 a leb128 encoding can take up to 5 bytes.
662 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
664 * class.c (verify_class_overrides): Remove useless argument.
666 * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
667 before interface enumeration as this is no longer required.
669 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
671 * class.c: New function mono_class_is_assignable_from_slow that is safe to be
672 used under mono_class_init context. This functions avoid any code path that
673 calls mono_class_init, which leads it to be slow as some things like the interface
674 bitmap are not available.
676 * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
677 of it's own broken version. Fixes the verifier part of #538588.
679 * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
682 2009-09-15 Mark Probst <mark.probst@gmail.com>
684 * class.c (mono_class_init): Always set an exception in a class if
685 vtable setup fails. Fixes #538577.
687 * generic-sharing.c: Raise an exception if mono_class_vtable()
690 2009-09-13 Zoltan Varga <vargaz@gmail.com>
692 * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance
693 methods of vtypes, as they could be incorrectly shared with static methods
694 taking an IntPtr argument.
696 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
700 * class-internals.h: renamed waithandle_class to
701 manualresetevent_class.
702 * marshal.c: propagate the exception if a remoting BeginInvoke call
705 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
707 * object.c: Properly handle vtable failures.
709 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
711 * socket-io.c: Assert on vtable failure.
713 * mono-mlist.c: Assert on vtable failure.
715 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
717 * marshal.c: Assert on vtable failure.
719 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
721 * icall.c: Properly handle vtable failures.
723 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
725 * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
727 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
729 * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
731 * console-unix.c (do_console_cancel_event): Same.
733 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
735 * class-internals.h: Add mono_class_vtable_full function that allows control
736 if an exception should be raised or not.
738 * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
739 to do what its documentation say, that is to return NULL and set exception_type on
742 * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
743 and change the code to honor it.
745 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
747 * verify.c: Fix typo in error message.
749 2009-09-10 Sebastien Pouliot <sebastien@ximian.com>
751 * security-core-clr.c: Fix default_platform_check so it can run
752 the runtime coreclr tests (without an infinite recursion when
753 throwing an exception).
755 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
757 object.c (mono_delegate_ctor_with_method): Guard against null method.
759 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
761 * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
762 that should be replaced with error handling later.
764 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
766 * marshal.c (mono_delegate_end_invoke): Fix warning.
768 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
770 * loader.c (mono_field_from_token): Properly handle invalid
773 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
775 * pedump.c (verify_image_file): Skip types that can't be
778 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
780 * verify.c: Look for recursive valuetypes only against the
781 type been initialized as this is a lot simpler and works.
783 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
785 * verify.c: Ensure that fields are properly loaded before
788 2009-09-10 Bill Holmes <billholmes54@gmail.com>
790 * object.c (mono_object_get_virtual_method) : Call
791 mono_cominterop_get_invoke if the object is a COM object.
793 Code is contributed under MIT/X11 license.
795 2009-09-09 Rodrigo Kumpera <rkumpera@novell.com>
797 * verify.c: Check for recursive valuetype definitions.
799 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
801 Use inheritance-aware interface offsets. Inherited types use the same offsets
802 of their parents. This reduce offset duplication in case more than one type in
803 the inheritance tree explicitly implements the same interface.
805 This also removes a source of vtable bubbles found in #532409. An abstract type
806 isn't required to provide abstract methods to all interfaces it implements, which
807 resulted in a bubble with the previous scheme as the child would get a non-full
808 vtable from its parent. We fail all concrete types with vtable bubbles, so this
811 This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
812 it's expected to not cause any significant increase beyond that.
814 * class.c (setup_interface_offsets): Compute super class iface offsets
815 first to force sharing.
817 * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
818 dumping only the relevant ones.
820 * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
821 methods a new slot regardless if they belong to an interface or not. This allows
822 an inherited type to override the iface method separately from the class one.
824 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
826 * threadpool.c: make the Sleep() alertable to prevent delays exiting
827 applications that take less than 2s to execute.
830 2009-09-04 Zoltan Varga <vargaz@gmail.com>
832 * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
834 * object.c (mono_get_runtime_callbacks): New helper function to return
835 the runtime callbacks.
837 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
838 mono_get_runtime_build_info () as the display name.
840 2009-09-03 Zoltan Varga <vargaz@gmail.com>
842 * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
843 argument, since NEWARR expects a native int. Fixes #481559.
845 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
847 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
848 against broken SRE methods.
850 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
852 * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
853 a NULL variable. Abort early on failure.
855 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
857 * class.c (can_access_type): Fail visibility test for non nested
858 types with nested visibility.
860 2009-09-02 Sebastien Pouliot <sebastien@ximian.com>
862 * assembly.c (parse_public_key): Avoid allocating (and not
863 freeing) the public key array when it's not requested by the
865 * threads.c (mono_thread_manage, mono_thread_create_internal,
866 ves_icall_System_Threading_Thread_Thread_internal): Free
867 allocated memory on error.
869 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
871 * icall.c, icall-def.h: Remove some dead code from early SRE changes.
873 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
875 * class.c (mono_class_setup_fields): Remove duplicated local variable
877 Rename gklass to gtd to reflect the fact that it points to the generic
879 Remove the duplicated call to mono_class_setup_fields on gtd and move
880 the error check to the beginning.
882 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
884 * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
885 Remove cruft of the previous patch.
887 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
889 * metadata-verify.c (verify_method_table): Check for abstract + final.
892 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
894 * verify.c (verify_class_fields): Check for duplicate fields.
896 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
898 * metadata-verify.c: Verify the typeref table for duplicates.
900 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
902 This reverts r140936 and properly handles interfaces with static methods. The
903 right fix is to ensure vtables without bubles which is an easier to verify
904 constraint. We should avoid such special cases as of the reverted patch as those
905 only make the runtime more brittle.
907 * class.c (mono_class_setup_vtable_general): Revert previous change that handle
908 static methods on interfaces.
910 * class.c (setup_interface_offsets): Use the number of virtual methods when
911 calculating interface offsets instead of the number of methods. This way we
912 avoid bubles on the layout.
914 2009-08-31 Rodrigo Kumpera <rkumpera@novell.com>
916 * metadata-verify.c (verify_metadata_header): Some very smart
917 obfuscators like to add extra stream headers. Ignore them.
919 2009-08-30 Zoltan Varga <vargaz@gmail.com>
921 * class.c (mono_class_setup_vtable_general): Verify interfaces with static
924 2009-08-29 Rodrigo Kumpera <rkumpera@novell.com>
926 * metadata-verify.c: Verify for duplicated types.
928 2009-08-28 Rodrigo Kumpera <rkumpera@novell.com>
930 * metadata-verify.c (verify_typedef_table): Verify for nested types
931 without an entry on the nested class table.
933 2009-08-28 Zoltan Varga <vargaz@gmail.com>
935 * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
936 <tom_hindle@sil.org>. Add locking around hash table accesses.
938 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
940 * verify.c (mono_verifier_verify_class): Verify all interface if
941 really are interfaces. Fixes #534184.
943 2009-08-27 Rodrigo Kumpera <rkumpera@novell.com>
945 * pedump.c: Initialize all types during metadata validation so we report
946 errors only detected as part of class initialization.
948 2009-08-26 Rodrigo Kumpera <rkumpera@novell.com>
950 * metadata-verify.c (verify_method_table): PInvoke requires method to
951 be static. Fixes #534189
953 2009-08-26 Zoltan Varga <vargaz@gmail.com>
955 * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
958 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
960 * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
961 for holes or bad methods. Fixes #525314.
963 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
965 * class.c (setup_interface_offsets): Don't allocate slot
966 for the same interface multiple times. This creates bubbles
967 that waster space and make vtable verification harder.
969 The same interface get a slot multiple times since we need
970 to get the closure of all implemented interfaces, which means
971 the same interface is reported multiple times.
973 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
975 * verify.c (mono_verifier_verify_class): Don't check the fields
976 of generic instances since the context on which they got expanded
977 might lead to false positives.
979 Such thing happens when a generic type is inflated in the context
980 of a generic method and the inflated type of a field turns into a
981 generic method argument, which causes the checking code to think
982 it's an invalid class when it's not.
984 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
986 * verify.c (mono_type_is_valid_in_context): Verify if type
987 is NULL and remove duplicate test.
989 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
991 * verify.c (mono_verifier_verify_class): Check fields for
992 invalid generic arguments.
994 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
996 * class.c (verify_class_overrides): Verify if for static
997 and non virtual methods.
999 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
1001 * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
1002 Check for errors after retrieving the vtable.
1004 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
1006 * class.c (mono_class_setup_vtable_general): Verify
1007 if method overrides are valid before processing them.
1009 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
1011 * marshal.c (mono_array_to_lparray): Fix minimal build with
1012 cominterop disabled.
1014 * marshal.c (mono_free_lparray): Same.
1016 2009-08-21 Mark Probst <mark.probst@gmail.com>
1018 * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
1019 the hash function for the ares_htable.
1021 2009-08-20 Rodrigo Kumpera <rkumpera@novell.com>
1023 * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
1024 bit for assembly flags. MS is ok with it but there is no spec anywhere
1027 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1029 * class.c (mono_class_create_from_typedef): Emit profiler events
1032 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1034 * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
1035 Release memory on failure.
1037 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1039 * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
1040 to the internal API.
1042 * metadata.c (get_constraints): Use a single-linked table as we don't
1043 traverse it backward. Fail and return FALSE if only of the contraint types
1046 * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
1047 to mono_metadata_load_generic_param_constraints except for having a return value.
1048 This has to be done since the later is part of the public API.
1050 * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
1053 * loader.c (mono_get_method_from_token): Properly check the loading of constraints
1054 and fail the method.
1056 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1058 * metadata-verify.c (is_valid_method_header): Add work-around to deal
1059 with MS broken behavior of emmitting EH section sizes without the
1062 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1064 * metadata.c (mono_type_create_from_typespec): Don't allocate image
1065 memory until we're sure that we'll need it. This avoids leaking for
1066 broken types or duplicated instantiation.
1068 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1070 * metadata-verify.c (is_valid_method_header): Fix stupid formating
1073 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1075 * metadata-verify.c (is_valid_method_header): Fix number of clauses
1076 and expected size calculation.
1078 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1080 * class.c (mono_class_get_field_idx): Add fixme for broken
1081 behavior for types with multiple fields with the same name.
1082 I would rather fix it, but have no idea on how to generate
1083 such artifact for testing.
1085 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1087 * verify.c (verifier_load_field): We should allow references to
1088 fields to be made using the generic type definition. It's up to
1089 the loader system to fail invalid ops.
1091 * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
1094 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1096 * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
1098 * metadata-internals.h: Fix declaration of
1099 mono_metadata_interfaces_from_typedef_full.
1101 * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
1102 heap_alloc_result parameter that controls if the result should be
1105 * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
1106 array be g_malloc'd and properly document this public API function.
1108 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1110 * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
1111 remove METHOD_HEADER_TINY_FORMAT1.
1113 * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
1115 * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
1117 Both spec and MS uses only 2 bits to enumerate the kind of header.
1118 So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
1119 is superfluous, only used for tiny headers with odd code lengths.
1121 This change also make sure that mono doesn't wronly interpret bit 2
1122 of fat header flags, which is currently reserved.
1124 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1126 * metadata.c (do_mono_metadata_parse_type): Do error
1127 checking for element types. Don't abort if presented
1128 with a broken type kind.
1130 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1132 * metadata.c (mono_metadata_parse_method_signature_full):
1133 Gracefully fail bad vararg signatures.
1135 2009-08-18 Christian Hergert <chris@dronelabs.com>
1138 * class.c: Fix warnings for uninitialized variables.
1140 2009-08-18 Christian Hergert <chris@dronelabs.com>
1142 * icall.c: Fix _NSGetEnviron method declaration warning.
1144 2009-08-18 Christian Hergert <chris@dronelabs.com>
1147 * reflection.c: Make bitwise checks explicit.
1149 2009-08-18 Christian Hergert <chris@dronelabs.com>
1152 * marshal.c: Fix printf warnings.
1154 2009-08-18 Zoltan Varga <vargaz@gmail.com>
1156 * reflection.c (encode_cattr_value): Fix a warning.
1158 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1160 * metadata.c (mono_metadata_parse_array_full): Fix memory leak
1163 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1165 * loader.c (mono_method_signature): Don't assert on broken
1166 signature. Print a more useful error message.
1168 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1170 * loader.c (mono_method_get_marshal_info): Assert if
1171 signature is invalid. Bounds check stores to the
1174 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1176 * loader.c (field_from_memberref): Fix warning.
1178 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1180 * loader.c (mono_method_get_param_names): Check if signature
1181 is null. Don't store beyond the size of the name array.
1183 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1185 * loader.c (mono_get_method_constrained): Check if signature
1188 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1190 * loader.c (mono_loader_set_error_bad_image): Improve
1193 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1195 * loader.c (mono_get_method_full): Convert an assertion
1196 into a loader error.
1198 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
1200 * class-internals.h, class.c: Better naming and documentation.
1202 2009-08-17 Zoltan Varga <vargaz@gmail.com>
1204 * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
1207 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1209 * loader.c (mono_method_get_signature_full): Fail gracefully if signature
1212 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1214 * loader.c (mono_loader_error_prepare_exception): Handle missing field
1215 errors with no class set.
1217 * loader.c (field_from_memberref): If the field signature is of the wrong
1218 type fail with a MissingFieldException instead of a BadImageException as
1219 this is the behavior observed on MS.
1221 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1223 * loader.c (field_from_memberref): Don't crash if either the field
1224 signature or the typespec class are invalid.
1226 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1228 * verify.c (verifier_load_field): Don't allow field related
1229 ops to reference fields on generic type definition.
1231 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1233 * metadata-verify.c: Add new warning level for errors specified
1234 by ECMA 335 but that MS ignores.
1236 * metadata-verify.c (verify_method_table): Make compiler controled
1237 visibility + (rt)specialname error a warning as MS ignores this. Ignoring
1238 this check is safe because the end result will only be some visibility
1239 exceptions been thrown.
1241 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
1243 * verify.c (get_boxable_mono_type): Don't allow the
1244 use of the generic type definition on boxed type positions.
1248 2009-08-14 Mark Probst <mark.probst@gmail.com>
1250 * threadpool.c: Make sure no cross-domain references remain in
1251 ares_htable or the arrays that are thrown away when resizing.
1253 2009-08-14 Mark Probst <mark.probst@gmail.com>
1255 * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
1256 list of classes for which we have to unregister reflection_info
1257 with the GC and which are not in the namespace cache.
1259 * reflection.c (mono_reflection_initialize_generic_parameter): Add
1260 the class to the list.
1262 2009-08-14 Mark Probst <mark.probst@gmail.com>
1264 * domain.c (mono_domain_free): Unregister the GC roots in
1267 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
1269 * reflection.c (mono_reflection_type_get_handle): Fix typo.
1271 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
1273 * class.c: Add mono_class_get_field_from_name_full which does
1274 the same as mono_class_get_field_from_name but does check field
1277 * class-internals.h: Export mono_class_get_field_from_name_full as
1278 part of the internal API.
1280 * loader.c (field_from_memberref): Search fields by name and signature
1281 as it's valid to have two fields with same name but different types.
1285 2009-08-10 Rodrigo Kumpera <rkumpera@novell.com>
1287 * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
1289 * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
1291 * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
1294 2009-08-13 Zoltan Varga <vargaz@gmail.com>
1296 * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
1298 * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
1300 2009-08-12 Mark Probst <mark.probst@gmail.com>
1302 * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
1303 to sgen-scan-object.h, which can be included and parameterized via
1306 * Makefile.am: sgen-scan-object.h added.
1308 2009-08-12 Mark Probst <mark.probst@gmail.com>
1310 * gc.c: #define GC_dont_gc if we're compiling with SGen.
1312 2009-08-12 Mark Probst <mark.probst@gmail.com>
1314 * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
1315 before clearing a domain in the GC.
1317 2009-08-12 Mark Probst <mark.probst@gmail.com>
1319 * exception.c (mono_exception_from_name_domain): Actually create
1320 the exception in the specified domain.
1322 * appdomain.c (mono_domain_create_appdomain_internal): Create the
1323 OutOfMemoryException a bit later so that the domain is inialized
1324 "enough" that it works.
1326 2009-08-12 Mark Probst <mark.probst@gmail.com>
1328 * threads.c (thread_cleanup): Clean up the cached_culture_info
1329 array to prevent cross-domain references.
1331 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
1333 * metadata.c: more documentation for MonoType accessors.
1335 2009-08-11 Raja R Harinath <harinath@hurrynot.org>
1337 Fix incorrect size definitions where the tail array isn't a list
1339 * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
1341 * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
1342 * metadata.h (MONO_SIZEOF_TYPE): Likewise.
1343 * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
1345 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1348 * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
1350 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1354 * metadata-internals.h:
1356 * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
1358 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1365 * reflection.c: #define for sizeof in MonoType and
1366 MonoMethodSignature.
1368 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1371 * domain-internals.h: add and use #define's instead of sizeof()
1372 for MonoJitInfo and MonoJitInfoTable.
1374 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1377 * class.h: use #define instead of sizeof() for MonoRemoteClass.
1379 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1384 * class-internals.h:
1385 * generic-sharing.c:
1386 * marshal.c: use a #define instead of sizeof() for a few
1387 structures that use a zero-length array.
1389 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com>
1391 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
1392 to handle inflated generic methods.
1394 * appdomain.c: Bump corlib version.
1396 * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
1399 * reflection.c (fixup_method): Same
1401 * reflection.c (resolve_object): Same.
1403 * reflection.c (inflate_method): Replace a g_assert_not_reached with a
1404 g_error and a decent message.
1406 2009-08-06 Massimiliano Mantione <massi@ximian.com>
1408 * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
1409 from the object because it could not yet be available globally
1410 (it happens if the profiler tries to create a gchandle on the
1411 MonoThread object of a thread that is still registering itself
1414 2009-08-04 Rodrigo Kumpera <rkumpera@novell.com>
1416 * reflection.c (mono_generic_class_get_object): Initialized the
1417 managed type arguments array.
1419 * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
1421 * appdomain.c: Bump corlib version.
1423 2009-08-04 Zoltan Varga <vargaz@gmail.com>
1425 * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
1428 2009-08-03 Zoltan Varga <vargaz@gmail.com>
1430 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
1431 Avoid a crash if synch_cs is not set.
1433 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
1434 Handle the case when the handle is 0.
1436 * appdomain.c: Bump corlib version.
1438 2009-08-02 Zoltan Varga <vargaz@gmail.com>
1440 * reflection.c (mono_type_get_object): Fix a warning.
1442 2009-08-01 Mark Probst <mark.probst@gmail.com>
1444 * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
1445 descriptor here. We assume it's already been computed.
1447 * generic-sharing.c (instantiate_other_info): Compute the GC
1448 descriptor for info type MONO_RGCTX_INFO_KLASS.
1450 2009-08-01 Mark Probst <mark.probst@gmail.com>
1452 * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
1453 type, so don't use MONO_OBJECT_SETREF to set a field.
1455 2009-08-01 Mark Probst <mark.probst@gmail.com>
1457 * gc.c: We were missing one case where invoking a finalizer would
1458 not reset the domain. Also, in the finalizer thread loop, assert
1459 that we're in the root domain.
1461 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1463 * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
1464 if the type is not an array.
1466 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1468 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
1469 method bound to the declaring type of the method. Raise an exception
1470 if the type is not a generic param.
1472 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1474 * class.c (print_unimplemented_interface_method_info): Print the
1477 * class.c (mono_class_setup_vtable_general): When dealing with a
1478 generic instance first check if the generic type definition is
1481 2009-02-11 Tom Hindke <tom_hindle@sil.org>
1483 * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
1485 * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
1487 * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
1489 * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
1491 * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
1493 Code is contributed under MIT/X11 license
1495 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
1497 * verify.c: Fix naming of stelem and ldelem.
1499 2009-07-30 Mark Probst <mark.probst@gmail.com>
1501 * generic-sharing.c: Replace the templates lock with the loader
1502 lock because of very hard to resolve deadlock issues.
1504 2009-07-30 Zoltan Varga <vargaz@gmail.com>
1506 * icall.c (ves_icall_Type_GetMethodsByName): Use
1507 mono_class_get_vtable_size () instead of accessing klass->vtable_size
1508 directly. Fixes #525338.
1510 * class.c (mono_class_get_vtable_size): New helper function.
1512 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
1513 the field belongs to the type. Fixes #525733.
1515 2009-07-30 Mark Probst <mark.probst@gmail.com>
1517 * sgen-gc.c: When we stop a thread and its stack top is not within
1518 its allocated stack (because it's in an altstack signal handler),
1519 restart it and stop it again, until it is.
1521 2009-07-30 Mark Probst <mark.probst@gmail.com>
1523 * sgen-gc.c: Take a thread's stack top and registers from the
1524 sigcontext in the suspend signal handler.
1526 * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
1527 stuff to sgen-archdep.h.
1529 * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
1530 caller, because have code in sgen-archdep.h to acquire that data.
1532 2009-07-29 Massimiliano Mantione <massi@ximian.com>
1534 * profiler.c, profiler.h, profiler-private.h:
1535 Added support for keeping track of code chunks and buffers.
1537 2009-07-29 Rodrigo Kumpera <rkumpera@novell.com>
1539 * metadata-verify.c: Fix endianness problems on decoding functions.
1540 Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
1542 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
1544 * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
1545 schema for vectors and one dimension SZARRAY.
1547 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
1549 * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
1550 schema for vectors and one dimension SZARRAY.
1552 2009-07-27 Mark Probst <mark.probst@gmail.com>
1554 * icall-def.h, thread-types.h, threads.c: New separate icalls for
1555 Interlocked.(Compare)Exchange with object arguments, which invoke
1558 2009-07-26 Miguel de Icaza <miguel@novell.com>
1560 * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
1561 passed invalid arguments. Fixes another crasher in the
1562 Silverlight test suite.
1564 * class.c (mono_class_array_element_size): Return 0 for the size
1565 of the class; This fixes the crasher exposed by :
1567 typeof (void).MakeArrayType ();
1569 * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
1570 if there is no method to dereference. Put all the code that
1571 depends on this inside the if (method) block.
1573 This fixes the crasher exposed by Microsoft's Silvelright CLR test
1574 suite ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
1576 With this change, we pass the test.
1578 * reflection.c (mono_reflection_sighelper_get_signature_local):
1579 Only dereference the assembly if it has been set. Fixes a
1580 crasher exposed by #525328
1582 2009-07-25 Mark Probst <mark.probst@gmail.com>
1584 * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
1585 don't perform the store in mono_gc_wbarrier_generic_nostore().
1586 Remove the second argument (value), which is not needed.
1588 2009-07-24 Zoltan Varga <vargaz@gmail.com>
1590 * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
1593 * boehm-gc.c: Ditto.
1595 2009-07-24 Mark Probst <mark.probst@gmail.com>
1597 * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
1598 not perform the store itself. Introduce
1599 mono_gc_wbarrier_generic_nostore(), which is the same as
1600 mono_gc_wbarrier_generic_store(), except it doesn't perform the
1603 2009-07-24 Mark Probst <mark.probst@gmail.com>
1605 * icall.c (ves_icall_System_Array_SetGenericValueImpl):
1606 mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
1607 we still need the memcpy().
1609 2009-07-22 Mark Probst <mark.probst@gmail.com>
1611 * sgen-gc.c: Align array bounds calculation to mono_array_size_t
1612 so that big arrays are handled correctly. Always use
1613 safe_object_get_size() to calculate array object sizes, which
1614 takes bounds into account.
1616 2009-07-22 Mark Probst <mark.probst@gmail.com>
1618 * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
1619 GC descriptor is computed before we use it.
1621 2009-07-22 Mark Probst <mark.probst@gmail.com>
1623 * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
1624 write barrier if necessary.
1626 2009-07-22 Mark Probst <mark.probst@gmail.com>
1628 * icall-def.h, icall.c, thread-types.h: New separate icall for
1629 VolatileWrite(object&,object) that uses a write barrier.
1631 * console-unix.c, file-io.c, icall.c, threads.c: Use write
1632 barriers in icalls which write to "ref" or "out" arguments.
1634 2009-07-21 Zoltan Varga <vargaz@gmail.com>
1636 * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
1637 handler in a separate icall, to reduce the size of the wrappers.
1639 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1641 * metadata-verify.c (is_valid_typespec_blob): Fix error message.
1643 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1645 * metadata-verify.c (parse_field): Allow byref field.
1647 * metadata-verify.c (parse_locals_signature): Allow byref locals.
1649 * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
1651 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1653 * verify.c (do_cast): Fail for any non reference type that isn't boxed.
1656 2009-07-20 Robert Jordan <robertj@gmx.net>
1658 * cominterop.c (cominterop_get_managed_wrapper_adjusted):
1659 Fix invalid IL in valuetype handling (STOBJ must push the
1660 corresponding class). Fixes bug #523149.
1662 Code is contributed under MIT/X11 license.
1664 2009-07-20 Geoff Norton <gnorton@novell.com>
1666 * gc.c: Use proper semaphores where available on posix and darwin.
1668 2009-07-19 Geoff Norton <gnorton@novell.com>
1670 * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
1672 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
1674 * refletion.c (is_sre_usertype): Change name to is_usertype and
1675 invert it's result so it returns true if the type is an user type
1676 and not the opposite.
1678 * reflection.c (is_*_type): Change all of those to use new macro
1679 check_corlib_type_cached that cached the type lookup so we don't
1680 need to do string comparisons all the type. Changed the signature
1681 to take a MonoClass instead.
1683 * reflection.c: Change mono_image_create_token and resolve_object
1684 to use is_sre_* functions.
1686 2009-07-18 Mark Probst <mark.probst@gmail.com>
1688 * sgen-gc.c: Check for writes to the stack in the managed
1691 2009-07-18 Mark Probst <mark.probst@gmail.com>
1693 * sgen-gc.c: When a thread is unregistered, don't free its remsets
1694 but put them on a list which is processed with the other thread's
1697 2009-07-18 Mark Probst <mark.probst@gmail.com>
1699 * sgen-gc.c: Fix and enable the internal allocator instead of
1700 using malloc/free (which causes deadlocks).
1702 2009-07-16 Rodrigo Kumpera <rkumpera@novell.com>
1704 * refletion.c: Fix builds with SRE disabled by adding a minimal
1705 implementation of mono_reflection_type_get_handle.
1707 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1709 * refletion.c: Make mono_reflection_type_get_handle non static.
1711 * object-internals.h: Export mono_reflection_type_get_handle.
1713 * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
1714 unmanaged handle using mono_reflection_type_get_handle.
1716 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1718 * refletion.c: Replace all reads of MonoReflectionType::type with
1719 calls to mono_reflection_type_get_handle. Only the functions that
1720 deal with constructing TypeBuilder::type have not been changed
1721 because they have to deal with NULL values.
1723 This is a first step into supporting reflection types that don't
1724 map directly into their unmanaged counterpart.
1726 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1728 * metadata-verify.c (parse_locals_signature): Don't complain
1729 on signature with zero locals since MS generates it and doesn't
1732 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1734 * reflection.c (mono_image_get_array_token): Resolve return
1735 type using mono_reflection_type_get_handle.
1737 * reflection.c (mono_image_get_array_token): Resolve array method
1738 parent type using mono_reflection_type_get_handle.
1740 2009-07-14 Zoltan Varga <vargaz@gmail.com>
1742 * reflection.c (mono_image_basic_init): Applied patch from
1743 <Dax@daxxfiles.net>. Set the public key token from the assembly
1744 builder. Fixes #518909.
1746 * appdomain.c: Bump corlib version.
1748 2009-07-13 Zoltan Varga <vargaz@gmail.com>
1750 * class.c (mono_class_needs_cctor_run): Make this return false if
1751 the class has no cctor.
1753 2009-07-13 Mark Probst <mark.probst@gmail.com>
1755 * sgen-gc.c: When the minor GC needs to allocate a new section,
1756 invoke the major GC afterwards.
1758 2009-07-14 Bill Holmes <billholmes54@gmail.com>
1760 * process.c (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
1761 Applying the window_style field to the SHELLEXECUTEINFO struct.
1763 Code is contributed under MIT/X11 license.
1765 2009-07-13 Mark Probst <mark.probst@gmail.com>
1767 * sgen-gc.c: Fix the race condition in the unmanaged allocator by
1768 locking earlier. Fix it in the managed allocator by making sure
1769 that no thread is stopped there before the GC runs. If we do stop
1770 a thread there, we restart it and let it run a but, until it stops
1773 * gc-internal.h, gc.c: Function for getting the IP from a signal
1774 context via a function registered by mini.
1776 2009-07-11 Zoltan Varga <vargaz@gmail.com>
1778 * object-internals.h (MonoIntPtr): New structure describing a boxed
1781 * object.c (mono_runtime_invoke_array): Handle ptr arguments and
1782 returns. Fixes #519953.
1784 * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
1786 2009-07-09 Mark Probst <mark.probst@gmail.com>
1788 * class-internals.h, generic-sharing.c: New RGCTX info type for
1789 getting a remoting invoke with check wrapper.
1791 2009-07-07 Geoff Norton <gnorton@novell.com>
1793 * icall-def.h: Fix the enable-minimal build.
1795 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1797 * object-internals.h: Add MonoReflectionDerivedType.
1799 * reflection.c: Implement support for PointerType.
1800 Fixed tons of warnings.
1802 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1804 * object-internals.h: Add MonoReflectionByRefType.
1806 * reflection.c: Implement support for ByRefType.
1808 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1810 * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
1812 * object-internals.h: Add MonoReflectionArrayType and
1813 mono_reflection_create_unmanaged_type.
1815 * reflection.c: Implement support for ArrayType.
1817 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1819 * metadata-verify.c (is_valid_method_header): Parse EH block
1822 2009-07-03 Mark Probst <mark.probst@gmail.com>
1824 * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
1825 processing the disappearing links, and process disappearing links
1826 in a loop until no new objects are copied.
1828 2009-07-03 Mark Probst <mark.probst@gmail.com>
1830 * object.c (handle_enum): Invoke the write barrier when copying
1831 value type instances.
1833 * sgen-gc.c: Register remsets for unmanaged write barriers only
1834 when the address written to is actually on the heap. This makes
1835 set_value() in object.c work without requiring that the result be
1838 2009-07-02 Rodrigo Kumpera <rkumpera@novell.com>
1840 The runtime wrappers are all bound to a given type that must
1841 exist in the same image. For regular images we use the <Module>
1842 type, which is required to exist for all images.
1844 The <Module> type can't be used for dynamic images because it
1845 might not exist at the time the wrapper is required, so we create
1846 a synthetic type to use instead.
1848 The current code works because of the 2 stage setup of MonoClass,
1849 but once this is gone it will no longer work.
1851 * icall-def.h: Add ModuleBuilder::set_wrappers_type.
1853 * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
1855 * object-internals.h: Export mono_image_set_wrappers_type icall
1856 as part of the internal API.
1858 * marshal.c (get_wrapper_target_class): If the image is dynamic,
1859 use MonoDynamicImage::wrappers_type instead of the <Module> type.
1861 reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
1862 image wrappers_type to the provided value.
1864 2009-07-01 Rodrigo Kumpera <rkumpera@novell.com>
1866 * appdomain.c (deregister_reflection_info_roots): No need
1867 to use the image lock here.
1869 2009-07-02 Mark Probst <mark.probst@gmail.com>
1871 * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
1873 2009-06-29 Zoltan Varga <vargaz@gmail.com>
1875 * threads.c: Store the thread start argument in a hash table instead of
1876 registering it as a root, as libgc doesn't support unregistering roots
1877 under windows, leading to 'too many root sets' errors when many threads
1880 * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
1881 shutdown, they can still be referenced by the other dying objects.
1884 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1886 * socket-io.c: DontLinger does not allow LingerOptions.
1888 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1890 * metadata-verify.c: The spec doesn't mention that it's possible to add
1891 custom attribute to a generic parameter. Fixed.
1893 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1895 * class.c (inflate_generic_type): Don't crash while trying to output a message
1896 on why we're aborting.
1898 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1900 * socket-io.c: DontLinger can take an int or a boolean too.
1902 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
1904 * gc.c: check for a null argument to SuppressFinalize () and
1905 ReRegisterForFinalize ().
1907 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1909 * loader.c (method_from_methodspec): Call into the verifier to check
1912 * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
1914 * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
1915 part of the internal API.
1917 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1919 * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
1922 * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
1924 * verify-internals.h: Export mono_verifier_verify_typespec_signature as
1925 part of the internal API.
1927 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1929 * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
1932 * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
1935 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1936 part of the internal API.
1938 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1940 * metadata-verify.c: Use is_valid_blob_object to verify blob validity
1941 when doing basic verification.
1943 This check must be done since the runtime peeks into signatures in much
1944 more places than it does decoding so it makes sense to ensure that all
1945 pointers to blob objects are well formed.
1947 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1949 * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
1950 Use proper overflow dectection. Fix usage of it.
1952 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1954 * loader.c (field_from_memberref): Call into the verifier to check
1957 * loader.c (mono_method_get_signature_full): Same.
1959 * loader.c (method_from_memberref): Same.
1961 * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
1963 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1964 part of the internal API.
1966 2009-06-25 Mark Probst <mark.probst@gmail.com>
1968 * threadpool.c (mono_thread_pool_add): If the domain is unloading
1969 or unloaded, still return an AsyncResult, but don't add it to the
1972 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1974 * threads.c: fix missing colon when DEBUG is defined.
1976 2009-06-25 Mark Probst <mark.probst@gmail.com>
1978 * threadpool.c: Don't add new calls to a threadpool if the domain
1979 of the call is unloading or unloaded. When dequeuing a job, null
1980 the reference in the queue.
1982 2009-06-25 Mark Probst <mark.probst@gmail.com>
1984 * sgen-gc.c (null_link_in_range): Add the dislink for the old
1985 generation if an object was moved.
1987 2009-06-25 Sylvain Dupont <duposyl@gmail.com>
1989 * cominterop.h cominterop.c marshal.c: Added support for marshalling out
1990 parameters of type SAFEARRAY[VARIANT].
1992 * reflection.c (encode_marshal_blob): Properly generate element type
1993 (SafeArraySubType marshal attribute option).
1995 Code is contributed under MIT/X11 license.
1997 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
1999 * reflection.c: in mono_method_clear_object () really ensure all the
2000 objects are removed.
2002 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2004 * loader.c (mono_method_signature): Call into the verifier to check
2005 the method signature.
2007 * metadata-verify.c (verify_method_table): Move signature verification
2008 to verify_method_table_full.
2010 * metadata-verify.c: Add mono_verifier_verify_method_signature.
2012 * verify-internals.h: Export mono_verifier_verify_method_signature as
2013 part of the internal API.
2015 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2017 * loader.c (mono_method_get_header): Call into the verifier to
2018 check the method header.
2020 * metadata-verify.c: Add mono_verifier_verify_method_header.
2022 * verify-internals.h: Export mono_verifier_verify_method_header as
2023 part of the internal API.
2025 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2027 * class.c (mono_class_find_enum_basetype): Call into the verifier to
2028 check the field signature. Replace an assert with an explicit check.
2030 * class.c (mono_class_setup_fields): Call into the verifier to check
2031 the field signature.
2033 * metadata-verify.c: Add mono_verifier_verify_field_signature.
2035 * verify-internals.h: Export mono_verifier_verify_field_signature as
2036 part of the internal API.
2038 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2040 * class.c (mono_class_find_enum_basetype): Simplify this function
2041 by moving code outside of the loop and not decoding static fields.
2043 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2045 * metadata-verify.c (verify_typedef_table): Check the extends
2046 token here. Move to here a flags check from verify_typedef_table_full.
2048 2009-06-24 Zoltan Varga <vargaz@gmail.com>
2050 * metadata-verify.c (is_valid_method_header): Fix a warning.
2052 * metadata-internals.h (MonoImage): Remove the unused
2053 static_rgctx_invoke_wrapper_cache.
2055 * image.c marshal.c: Ditto.
2057 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
2059 * image.c (do_mono_image_load): Enable table data verification.
2061 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
2063 * metadata-verify.c (is_valid_constant): Fix nullref check.
2065 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
2067 * metadata-verify.c (is_valid_constant): Fix string bounds check.
2069 2009-06-22 Mark Probst <mark.probst@gmail.com>
2071 * sgen-gc.c: Managed allocation with pthreads TLS.
2073 * threads.c, threads-types.h: Functions for the JIT to tell the
2074 runtime whether it supports the MONO_TLS opcode.
2076 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
2078 * metadata-verify.c (verify_param_table): Fix a crash for assemblies
2081 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
2083 * metadata-verify.c (is_valid_constant): Fix the string length check.
2084 Use safe overflow checking. Add decent error messages.
2086 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
2088 * metadata-verify.c: Move remaininh blob checks to the offline
2091 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
2093 * metadata-verify.c: Move more blob checks to the offline verification
2096 2009-06-22 Bill Holmes <billholmes54@gmail.com>
2098 * object-internals.h : Adding interrupt_on_stop field.
2100 * threads.c (mono_thread_request_interruption) : On Windows exit the
2101 thread if interrupt_on_stop is set.
2103 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
2104 Removing old interrupt logic and setting the interrupt_on_stop for the
2105 thread when calling accept.
2107 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
2108 setting the interrupt_on_stop for the thread when calling accept.
2110 Contributed under MIT/X11 license.
2112 2009-06-20 Martin Baulig <martin@ximian.com>
2114 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
2116 2009-06-21 Zoltan Varga <vargaz@gmail.com>
2118 * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
2119 running in no-exec mode.
2121 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2123 * metadata-verify.c (verify_method_table): Move header
2124 checking to verify_method_table_full.
2126 * metata-verify.c (mono_verifier_verify_full_table_data):
2127 Call verify_method_table_full.
2129 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2131 * metadata-verify.c (verify_field_table): Move signature
2132 checking to verify_field_table_full.
2134 * metata-verify.c (mono_verifier_verify_full_table_data):
2135 Call verify_field_table_full.
2137 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2139 * metadata-verify.c (verify_typedef_table): Move remaining
2140 stuff to verify_typedef_table_full.
2142 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2144 * metadata-verify.c: Kill is_corlib from VerifyContext.
2145 It is only used by the offline mode.
2146 So we better remove it from the runtime path.
2148 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2150 * metadata-verify.c: Add new mono_verifier_verify_full_table_data
2151 function that perform the offline metadata verification steps.
2153 * metadata-verify.c (verify_typedef_table): Move some checks to
2154 verify_typedef_table_full and make it been called by new function
2155 mono_verifier_verify_full_table_data.
2157 * pedump.c: Call mono_verifier_verify_full_table_data.
2159 * verify-internals.h: Export mono_verifier_verify_full_table_data as
2160 part of the internal API.
2162 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2164 * metadata-verify.c (typedef_is_system_object): Fix System.Object
2167 * metadata-verify.c (verify_implmap_table): Fix implmap invalid
2168 flags bits. SupportLastError was confused as bit 7 instead of 6.
2170 * metadata-verify.c (verify_implmap_table): Fix import scope verification
2171 to check against the module ref table instead of module.
2173 * metadata-verify.c (verify_implmap_table): Fix corlib check.
2175 * pedump.c: Call mono_image_load_names.
2177 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
2179 * image.c: Extract mono_image_load_names from do_mono_image_load.
2181 * metadata-internals.h: Export mono_image_load_names as part of
2184 2009-06-19 Zoltan Varga <vargaz@gmail.com>
2186 * metadata.c (mono_metadata_cleanup): Free the generic method cache
2187 first, as it could reference data in the other caches.
2189 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
2191 * metadata-verify.c: Finished with method header verification.
2193 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
2195 * metadata-verify.c: Added more header verification code.
2196 Now only EH clauses are missing.
2198 2009-06-17 Zoltan Varga <vargaz@gmail.com>
2200 * marshal.c (get_runtime_invoke_type): Don't share primitive types
2203 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
2205 * metadata-verify.c: Initial method header verification.
2207 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
2209 * metadata-verify.c (verify_import_table): The IAT contents
2210 might end been patched by the windows DL when running with
2213 2009-06-15 Rodrigo Kumpera <rkumpera@novell.com>
2215 * class.c (mono_class_from_typeref): If the enclosing type is not
2216 found return null instead of crashing. Fixes #508487.
2218 2009-06-15 Atsushi Enomoto <atsushi@ximian.com>
2220 * normalization-tables.h : updated to the latest unicode charcter
2222 * appdomain.c : bump corlib version.
2224 2009-06-14 Zoltan Varga <vargaz@gmail.com>
2226 * class.c (mono_class_from_name): Fix support for assembly references
2227 in the EXPORTEDTYPE table. Fixes #511704.
2229 2009-06-13 Geoff Norton <gnorton@novell.com>
2231 * domain.c: Ensure that mono_domain_assembly_open actually opens the
2232 assembly in the target domain.
2234 2009-06-12 Robert Jordan <robertj@gmx.net>
2236 * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
2237 because "this" of the managed signature has become an
2238 ordinary parameter in the unmanaged signature.
2240 2009-06-12 Zoltan Varga <vargaz@gmail.com>
2242 * class-internals.h (struct _MonoGenericContainer): Add an 'image'
2243 field for owner-less generic containers.
2245 * reflection.c (mono_reflection_initialize_generic_parameter): Set the
2246 image field of the owner-less generic containers created here.
2248 * metadata.c (mono_metadata_load_generic_params): Ditto, the
2249 contain is ownerless until the caller sets its owner.
2251 * metadata.c (type_in_image): Handle owner-less generic containers
2254 2009-06-11 Zoltan Varga <vargaz@gmail.com>
2256 * image.c (mono_image_close): Support debug_assembly_unload for
2259 2009-06-11 Andrés G. Aragoneses <aaragoneses@novell.com>
2261 * class.c: Fix some typos in comments.
2263 2009-06-11 Zoltan Varga <vargaz@gmail.com>
2265 * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
2267 * threads.c (mono_thread_execute_interruption): Avoid creating the
2268 abort exception object while holding the synch_cs lock.
2270 2009-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2272 * metadata-verify.c: Verify basic cattr content.
2274 2009-06-10 Zoltan Varga <vargaz@gmail.com>
2276 * reflection.c (add_exported_type): Don't set the FORWARDER flag on
2279 * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
2280 support for nested types. Fixes #511704.
2282 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2284 * metadata-verify.c: Verify methodspec signatures.
2286 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2288 * metadata-verify.c: Verify typespec signatures.
2290 2009-06-09 Zoltan Varga <vargaz@gmail.com>
2292 * metadata.c (free_inflated_method): Call
2293 mono_marshal_free_inflated_wrappers (), which was missed earlier.
2295 2009-06-08 Miguel de Icaza <miguel@novell.com>
2297 * mono-config.c: Small change to report the PPC64/ILP32 model.
2299 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2301 * metadata-verify.c (parse_type): Check szarray.
2303 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2305 * metadata-verify.c (parse_type): Check fnptr.
2307 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2309 * metadata-verify.c (parse_type): Check generic instances.
2311 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2313 * metadata-verify.c (parse_type): Check array shape.
2315 2009-06-05 Robert Jordan <robertj@gmx.net>
2317 * class.c (mono_class_create_from_typedef): Check only for
2318 mscorlib's System.Array.
2320 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2322 * metadata-verify.c (parse_type): Check pointer, class/valuetype
2325 * metadata-verify.c (parse_field): Check the signature.
2327 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2329 * metadata-verify.c: Implement locals signature check.
2331 2009-06-04 Marek Safar <marek.safar@gmail.com>
2333 * domain.c: Add .NET 4.0 Beta 1 version.
2335 2009-06-04 Bill Holmes <billholmes54@gmail.com>
2337 * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
2338 For QueryInterface on CCWs consider the base class
2341 Code is contributed under MIT/X11 license.
2343 2009-06-04 Zoltan Varga <vargaz@gmail.com>
2345 * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
2347 * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
2350 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
2351 adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
2353 * generic-sharing.c (inflate_other_data): Ditto.
2355 2009-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2357 * metadata-verify.c: Implement property signature check.
2359 2009-06-04 Mark Probst <mark.probst@gmail.com>
2361 * sgen-gc.h: Register saving support for PPC.
2363 2009-06-04 Mark Probst <mark.probst@gmail.com>
2365 * sgen-gc.c: Fixed a pthread TLS screwup.
2367 2009-06-04 Mark Probst <mark.probst@gmail.com>
2369 * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
2372 2009-06-04 Mark Probst <mark.probst@gmail.com>
2374 * sgen-gc.c: Disable TLA and managed allocation if the __thread
2375 keyword is not supported.
2377 2009-06-04 Zoltan Varga <vargaz@gmail.com>
2379 * marshal.c metadata.c: Applied patch from Ulrich Weigand
2380 <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
2381 the inflated method is freed. Fixes #508389.
2383 The code is contributed under the MIT/X11 license.
2385 2009-06-03 Zoltan Varga <vargaz@gmail.com>
2387 * marshal.c (get_wrapper_target_class): New helper function.
2388 (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
2389 the <Module> class of the image. Fixes #509049.
2391 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2393 * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
2394 Check if the thread was interrupted and proccess it straight away.
2395 Makes abortion much more responsive.
2397 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2399 * threads.c (mono_thread_execute_interruption): Use atomic cas with
2400 MonoThread::interruption_requested to match it's counterpart.
2402 Fixes a hang in abort-stress-1 on a 2 core x86.
2404 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
2407 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2409 Change MonoImage::name_cache to be protected by the image lock
2410 instead of the loader lock.
2412 * appdomain.c (deregister_reflection_info_roots): Protect access
2415 * class.c (mono_image_init_name_cache): Change from the loader lock
2416 to the image lock. Check if the cache wasn't already created.
2418 * class.c: Change from the loader to the image lock.
2420 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
2421 the code to hold the image lock while iterating over name_cache and
2422 not go into mono_array_new holding it.
2424 * metadata-internals.h: Add a comment about this change.
2426 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2428 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2429 Under the 2.0 profile raise the loader error.
2433 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2435 * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
2436 of ldind opcode for generic instances so we don't fail for direct wrappers.
2437 This only affect direct calls.
2439 2009-05-31 Zoltan Varga <vargaz@gmail.com>
2441 * reflection.c (create_dynamic_mono_image): Fix warnings.
2443 * generic-sharing.c (other_info_equal): Ditto.
2445 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2447 * metadata-verify.c: Implement field signature check.
2449 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2451 * metadata-verify.c: Implement standalone signature check.
2453 2009-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2455 * metadata-verify.c: Implement methodref signature check.
2457 2009-05-28 Zoltan Varga <vargaz@gmail.com>
2459 * object-internals.h (MonoRuntimeCallbacks): New structure containing
2460 callbacks supplied by the runtime.
2462 * object.c (mono_install_callbacks): New internal function to install
2465 * object.c (mono_create_ftnptr): Move the implementation of this to
2468 * object.c (mono_get_addr_from_ftnptr): Ditto.
2470 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2472 * metadata-verify.c (parse_return_type): Proper byref check.
2473 * metadata-verify.c (is_valid_method_signature): Check for zero arity
2474 generic signatures and method params.
2476 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2478 * metadata-verify.c (decode_signature_header): Fix bounds check.
2480 * metadata-verify.c (parse_custom_mods): Check custom mods.
2482 * metadata-verify.c (parse_type): Do initial basic verification
2485 * metadata-verify.c (is_valid_method_signature): Parse the generic
2488 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
2490 * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
2491 discarded based on their most specific definition so we set the method_slots
2492 array before checking if the method is acceptable or not.
2496 2009-05-26 Mark Probst <mark.probst@gmail.com>
2498 * icall.c: Free the old array when resizing a mono_ptr_array.
2500 2009-05-26 Mark Probst <mark.probst@gmail.com>
2502 * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
2503 for the hashes whose keys are managed objects.
2505 2009-05-26 Mark Probst <mark.probst@gmail.com>
2507 * object-internals.h, threads.c: Set the execution context on
2508 thread start here, not in corlib.
2510 * appdomain.c: Bump corlib version.
2512 2009-05-27 Martin Baulig <martin@ximian.com>
2514 * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
2515 if `_mono_debug_using_mono_debugger' is set to make things work
2516 properly when embedding Mono.
2518 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2520 * class.c (mono_class_setup_fields): Don't mark simd types as having
2521 16 bytes alignment as the whole runtime doesn't support.
2523 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2525 * metadata-verify.c (safe_read): Use endian safe read macros.
2527 2009-05-25 Zoltan Varga <vargaz@gmail.com>
2529 * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
2530 it is read-only when using full aot.
2532 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2534 * metadata-verify.c (is_valid_method_signature): Verify parts
2535 of the return type. Provide an error message in case of failure.
2537 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2539 * metadata-verify.c (is_valid_method_signature): Verify the call conv.
2541 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2543 * metadata-verify.c: Include the size prefix in the bounds check.
2545 2009-05-22 Miguel de Icaza <miguel@novell.com>
2547 * icall.c: Remove warnings.
2549 * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
2550 prevent auto-detection based on GCC defines.
2554 * metadata-verify.c: Do not include signal.h
2556 * generic-sharing.c, marshal.c: Add returns to avoid some warning
2557 messages. Not sure why the g_assert_not_reached is not enough to
2561 * appdomain.c: Remove code that is not used when
2562 DISABLE_SHADOW_COPY is set.
2564 * image.c: use g_getenv
2566 2009-05-21 Miguel de Icaza <miguel@novell.com>
2568 * reflection.c: Remove code that it not used with
2569 DISABLE_REFLECTION_EMIT is defined.
2571 2009-05-21 Zoltan Varga <vargaz@gmail.com>
2573 * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
2576 2009-05-20 Miguel de Icaza <miguel@novell.com>
2579 (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
2580 the ifdef here and instead put that on io-layer
2582 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2584 * metadata-verify.c: Verify the generic param constraint table.
2586 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2588 * metadata-verify.c (verify_generic_param_table): Fix
2589 thinko on the valid flags bits for generic params.
2591 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2593 * metadata-verify.c: Verify the methodspec table.
2595 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2597 * metadata-verify.c: Verify the generic param table.
2599 2009-05-19 Mark Probst <mark.probst@gmail.com>
2601 * sgen-gc.c: Store and use the count with REMSET_VTYPE.
2603 2009-05-19 Mark Probst <mark.probst@gmail.com>
2605 * sgen-gc.c: Use generation enum more consistently and use the
2606 correct generation in mono_gc_register_for_finalization().
2608 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
2610 * metadata-verify.c: Verify the nested class table.
2612 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
2614 * metadata-verify.c: Verify the manifest resource table.
2616 2009-05-17 Zoltan Varga <vargaz@gmail.com>
2618 * debug-helpers.c (dis_one): Add little-endian support for ldstr.
2620 2009-05-16 Zoltan Varga <vargaz@gmail.com>
2622 * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
2623 wrappers, this is now done in the JIT.
2625 * class.c (mono_set_generic_sharing_supported): New internal function.
2626 (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
2628 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2630 * metadata-verify.c: Verify the exported type table.
2632 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2634 * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
2636 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2638 * metadata-verify.c: Verify the file table.
2640 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2642 * metadata-verify.c (verify_assembly_table): Fix an error message.
2644 * metadata-verify.c: Verify the assemblyref table.
2646 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2648 * metadata-verify.c (verify_assembly_table): Fix the valid
2649 bits mask for flags.
2651 2009-05-15 Zoltan Varga <vargaz@gmail.com>
2653 * debug-helpers.c (mono_method_full_name): Print generic parameters of
2654 generic methods as well.
2656 2009-05-15 Geoff Norton <gnorton@novell.com>
2658 * gc.c: MachO/Darwin supports and uses semaphores fine for this
2659 use-case and is significantly more performant than the wapi layer.
2661 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2663 * metadata-verify.c: Verify the assembly table.
2665 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2667 * metadata-verify.c: Fix rows limit check.
2669 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2671 * metadata-verify.c: Verify the fieldrva table.
2673 2009-05-13 Mark Probst <mark.probst@gmail.com>
2675 * sgen.c: Speed up weak links and finalizers by grouping them by
2678 2009-05-13 Mark Probst <mark.probst@gmail.com>
2680 * marshal.c (delegate_hash_table_add): When overwriting an entry,
2681 free the old GCHandle (only applies to SGen).
2683 2009-05-13 Zoltan Varga <vargaz@gmail.com>
2685 * loader.c (mono_get_method_from_token): Avoid the expensive call to
2686 mono_metadata_load_generic_params () for non-generic methods.
2688 2009-05-12 Mark Probst <mark.probst@gmail.com>
2690 * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
2691 New function for returning a monitor's weak link if it has one.
2693 * sgen-gc.c: Remove an object's monitor's weak link (if it has
2694 one) when clearing a domain. These can still be around because
2695 the object might not have been collected.
2697 2009-05-12 Zoltan Varga <vargaz@gmail.com>
2699 * gc.c: Fix a warning.
2701 2009-05-12 Kornél Pál <kornelpal@gmail.com>
2703 * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
2704 prevous wait that resulted in a deadlock on Windows when initializing
2705 the runtime form DllMain. Also results in improved startup time.
2706 (finalizer_thread): Get rid of thread_started_event.
2707 * threads.c, threads-types.h (mono_thread_create_internal): Return the
2708 resulting MonoThread.
2710 Contributed under MIT/X11 license.
2712 2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
2714 * metadata-verify.c: Verify the implmap table.
2715 Don't require that #US and #Strings be present.
2717 2009-05-11 Sebastien Pouliot <sebastien@ximian.com>
2719 * security-core-clr.c: Delegate checks are done at creation time,
2720 not a invocation time. Fix exception for Telerik Silverlight demo
2722 2009-05-11 Mark Probst <mark.probst@gmail.com>
2724 * sgen-gc.c (need_remove_object_for_domain): Remove the special
2725 case for the Thread class.
2727 * threads.c: Do clean-up of abort exception/state in
2728 thread_cleanup() instead of Thread.free_internal(). Also clean up
2729 current_appcontext. The reason we have to do that is because
2730 those references might point into another domain and if that
2731 domain is unloaded before the thread is finalized, they point to
2734 2009-05-10 Andreas Faerber <andreas.faerber@web.de>
2736 * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
2739 Contributed unter MIT/X11 license.
2741 2009-05-09 Miguel de Icaza <miguel@novell.com>
2743 * verify.c, metadata-verifier.c: Add support for disabling the
2744 verifier in some builds.
2746 [ Sorry, my previous commit accidentally commited some work in
2749 2009-05-08 Zoltan Varga <vargaz@gmail.com>
2751 * class.c (mono_class_setup_fields): Set class->field.first for
2754 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
2756 * metadata-verify.c: Verify the typespec table.
2758 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
2760 * metadata-verify.c: Verify the module table.
2762 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2764 * metadata-verify.c: Verify the methodimpl table.
2766 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2768 * metadata-verify.c: Verify the property table.
2770 2009-05-06 Zoltan Varga <vargaz@gmail.com>
2772 * debug-helpers.c (mono_method_desc_match): Add support for generic
2775 2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
2777 * metadata-verify.c: Verify the propertymap table.
2779 2009-05-04 Rodrigo Kumpera <rkumpera@novell.com>
2781 * metadata-verify.c: Verify the event table.
2783 * metadata-verify.c (search_sorted_table): Fix offset
2786 2009-05-02 Zoltan Varga <vargaz@gmail.com>
2788 * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
2790 2009-05-01 Mark Probst <mark.probst@gmail.com>
2792 * gc.c (mono_gc_run_finalize): Don't set the domain too late,
2793 because mono_delegate_free_ftnptr() needs it.
2795 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2797 * metadata-verify.c: Verify the eventmap table.
2799 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2801 * metadata-verify.c: Verify the standalonesig table.
2803 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2805 * metadata-verify.c: Verify the field layout table.
2807 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2809 * class.c (mono_type_get_name_recurse): Don't crash
2810 for ownerless generic params.
2812 * debug-helpers.c (mono_type_get_desc): Correct the format
2813 for ownerless generic params.
2815 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2817 * metadata-verify.c: Verify the class layout table.
2819 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2821 * metadata-verify.c: Verify the decl security table.
2823 2009-04-30 Mark Probst <mark.probst@gmail.com>
2825 * domain.c (mono_domain_set_internal_with_options): Don't do
2826 anything if the old domain is the same as the old one. Fixes
2829 2009-04-30 Mark Probst <mark.probst@gmail.com>
2831 * appdomain.c: Deregister the reflection_info roots when unloading
2834 * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
2835 memory allocated by a domain and frees its disappearing links.
2837 * boehm-gc.c, null-gc.c: Empty implementation of
2838 mono_gc_clear_domain().
2840 2009-04-30 Mark Probst <mark.probst@gmail.com>
2842 * appdomain.c (clear_cached_vtable): Free the static fields memory
2845 2009-04-30 Mark Probst <mark.probst@gmail.com>
2847 * gc.c: Set the correct domain when invoking finalizers.
2849 * appdomain.c: Set the correct domain when creating threads.
2851 2009-04-30 Mark Probst <mark.probst@gmail.com>
2853 * sgen-gc.c: Fix skip size for vectors.
2855 2009-05-03 Martin Baulig <martin@ximian.com>
2857 * mono-debug-debugger.c
2858 (mono_debugger_check_breakpoints): Check class init handlers even
2859 if we don't have any method load handers.
2861 2009-04-30 Zoltan Varga <vargaz@gmail.com>
2863 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
2864 returning refonly assemblies if refonly is FALSE. Fixes #499013.
2866 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
2868 * metadata-verify.c: Verify the field marshal table.
2870 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
2872 * metadata-verify.c: Verify the custom attribute table.
2874 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2876 * metadata-verify.c: Verify the constant table.
2878 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2880 * metadata-verify.c: Verify the memberef table.
2882 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2884 * metadata-verify.c (get_coded_index_token): Remove
2887 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2889 * metadata-verify.c: Verify the interfaceimpl table.
2891 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2893 * verify.c: Improve error message.
2895 * debug-helpers.c (mono_type_get_desc): Harden the code that
2896 deals with VAR and MVAR.
2898 2009-04-28 Zoltan Varga <vargaz@gmail.com>
2900 * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
2903 2009-04-23 Tom Hindle <tom_hindle@sil.org>
2905 * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
2906 changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
2908 2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
2910 * security-core-clr.c: Avoid redundant checks for platform code,
2911 e.g. check for method and for class (very common) and check
2912 for class and outer class (less common)...
2914 2009-04-27 Zoltan Varga <vargaz@gmail.com>
2916 * reflection.c: Avoid returning random cattrs for synthetic methods.
2919 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2921 * assembly.c: assemblies in the GAC should never be shadow-copied.
2923 2009-04-26 Mark Probst <mark.probst@gmail.com>
2925 * domain.c, domain-internals.h: Disable
2926 track_resurrection_{objects,handles}_hash in MonoDomain if using
2929 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2931 * metadata-verify.c: Verify the param table.
2933 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2935 * metadata-verify.c (verify_typedef_table): Range check FieldList and
2938 * metadata-verify.c (verify_method_table): Proper check the ParamList
2941 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2943 * metadata-verify.c (verify_method_table): Check for runtime
2944 implemented functions such as delegate .ctors. Remove spurious
2947 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2949 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
2951 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2953 Don't allocate MonoGenericInfo for ownerless generic params.
2954 * class-internals.h (MonoGenericParam::info): Move field to ...
2955 (MonoGenericParamFull): ... this. New struct.
2956 (MonoGenericContainer::type_params): Change type to
2957 MonoGenericParamFull.
2958 (MonoGenericParam, MonoGenericContainer): Update accessors.
2959 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
2960 'info' field for ownerless generic param.
2961 (mono_metadata_load_generic_params): Update to changes.
2962 * reflection.c (mono_reflection_create_generic_class): Likewise.
2963 (reflection_methodbuilder_to_mono_method): Likewise.
2964 (mono_reflection_initialize_generic_parameter): Likewise.
2966 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2968 Don't use MonoGenericParamInfo for ownerless generic params.
2969 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
2970 use ParamInfo class at all.
2971 (mono_class_from_generic_parameter): Use them.
2972 (make_generic_param_class): Fix a couple of instances where 'pinfo
2973 == NULL' wasn't handle.
2975 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2977 * class.c (make_generic_param_class): Carve out of ...
2978 (mono_class_from_generic_parameter): ... here.
2980 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2982 Simplify mono_class_from_generic_parameter
2983 * class-internals.h (MonoGenericParamInfo::token): New field.
2984 * metadata.c (mono_metadata_load_generic_params): Initialize it
2986 * class.c (mono_class_from_generic_parameter): Use it instead of
2987 searching through metadata.
2989 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2991 * metadata-verify.c: Add verification of the method table.
2993 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2995 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
2996 Delegate::Invoke optimization.
2998 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3000 * appdomain.c (mono_domain_create_appdomain_internal): Free the
3001 string returned by get_shadow_assembly_location_base.
3003 * appdomain.c (get_shadow_assembly_location_base): Add a comment
3004 about caller's ownership.
3006 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3008 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
3009 reflection memory on domain unload.
3011 * domain.c (mono_domain_free): Don't free refobject_hash, let the
3012 reflection cleanup code do it.
3014 * domain-internals.h: Add mono_reflection_cleanup_domain.
3016 This fixes a memory leak for managed mirrors of reflection objects
3019 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
3021 * metadata-verify.c: Implement more verification of the field table.
3023 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
3025 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
3026 doesn't try to parse the input assembly, which can be broken.
3028 2009-04-23 Mark Probst <mark.probst@gmail.com>
3030 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
3031 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
3032 by using the lowest bit in the link to store whether the link is
3033 tracked. Move the track_resurrection hashes into boehm-gc.c.
3035 2009-04-22 Miguel de Icaza <miguel@novell.com>
3037 * Makefile.am: Split the console support in platform specific code
3038 and put together a framework for making this easy in the future so
3039 that we can start splitting code instead of having a mess of PLATFORM_WIN32
3041 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
3043 * pedump.c: Fix a warning.
3045 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
3047 * verify.c (mono_delegate_type_equal): Compare valuetypes using
3048 mono_class_from_mono_type to avoid bad interactions with the dual representation
3049 of the generic type definition.
3051 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
3053 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
3054 get the MonoClass for the call context type as it might be a generic
3059 2009-04-21 Mark Probst <mark.probst@gmail.com>
3061 * object-internals.h: The Thread object has no execution_context
3064 * threads.c, threadpool.c, threads-types.h: Accessor functions for
3065 the execution context.
3067 * appdomain.c: Bump corlib version.
3069 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3071 * verify.c (do_newobj): Improve error message.
3073 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3075 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
3076 is nested in the filter block.
3078 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
3079 block is not fully nested.
3083 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3085 * verify.c (verify_type_compatibility_full): Compare MonoClass and
3086 not MonoType to check for equality of valuetypes as the generic type
3087 definition allows for two different encodings: the generic type definition
3088 class or a generic instance over the GTD arguments.
3092 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3094 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
3096 * verify.c (do_initobj): Improve error message.
3098 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
3100 * metadata-verify.c: Enable pe verification as the issue with #496453
3101 is that the authenticode data directory have a different unspecified
3102 format. Ignore it for now.
3104 * pedump.c: Run the metadata verifier together with the IL verifier.
3108 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
3110 * metadata-verify.c: Temporarily disable pe verification due to #496453.
3112 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
3114 * class.c (can_access_type): Check visibility against
3115 the element type for pointers and arrays.
3119 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
3121 * metadata-verify.c: Fix cli and table verification to use information
3122 from the MonoImage. A lot of duplicated code got killed.
3124 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
3127 This patch starts to integrate the metadata verifier with the runtime code.
3129 This patch causes major regression in functionality for the metadata verifier
3130 as cli and table verification are disabled since they require to be ported to
3131 use MonoImage information.
3133 * image.c (do_mono_image_load): Split the code in this function
3134 into mono_image_load_pe_data and mono_image_load_cli_data.
3135 Add care_about_pecoff parameter to not load pecoff data.
3136 Call into the metadata verifier for pecoff and cli verification.
3138 * image.c (mono_image_open_raw): New function that doesn't perform
3139 any parsing of the image contents.
3141 The reason for the 3 new functions is to give pedump better control
3142 into the interaction with the verifier.
3144 * metadata-internals.h: Add new functions from image.c as part of the
3147 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
3148 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
3149 to make those functions work together with the runtime.
3151 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
3152 true if the image needs to be verified.
3154 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
3156 * pedump.c: Use new metadata verifier API.
3158 2009-04-19 Zoltan Varga <vargaz@gmail.com>
3160 * object.c (mono_install_vtable_trampoline): Make this receive a
3161 trampoline creation function instead of trampoline, allowing the JIT
3162 to use a different trampoline for each vtable.
3164 2009-04-18 Mark Probst <mark.probst@gmail.com>
3166 * object.c (mono_raise_exception): Don't reset the thread abort
3167 exception state here.
3169 2009-04-18 Mark Probst <mark.probst@gmail.com>
3171 * icall-def.h: New icall for getting the thread abort exception
3174 * object.c, thread.c, object-internals.h: A thread's abort
3175 exception state is now a GC handle. To get the object it stands
3176 for, we must move it into the current app domain, if it's
3177 different than the one where it originated from.
3179 * appdomain.c: Bump corlib version.
3181 * domain.c, domain-internals.h: New function for setting the
3182 domain and migrate the thread abort exception or not.
3184 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3186 * metadata-verify.c: Add initial verification of the
3189 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3191 * metadata-verify.c: Add a macro to conditionally enable
3192 dumping of verification information. Add make_coded_token
3193 and search_sorted_table to enable search sorted tables
3194 by a given coded token.
3196 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3198 * metadata-verify.c: Add array mapping from table index
3199 to description offset. Add get_col_offset and get_col_size
3202 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3204 * metadata-verify.c: Add remaining table descriptions offsets.
3205 Add remaining coded index descriptions.
3207 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3209 * metadata-verify.c: Fixed constant table description.
3210 Fixed calculation of HasCustomAttribute coded index size.
3211 Fixed calculation of size for many table indexes.
3213 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3215 * pedump.c (dump_metadata): Dump table offset instead
3216 of useless pointer in memory.
3218 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
3220 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
3222 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3224 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
3225 a missing of for interface types.
3227 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3229 * metadata-verify.c (verify_pe_optional_header): Add comment of why
3230 the code is commented.
3232 * metadata-verify.c (verify_resources_table): Remove spurious printf
3233 and don't fail if there are unmanaged resources. Gmcs generates a useless
3234 one for all assemblies - I bet it's some MS compatibility junk.
3236 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3238 * metadata-verify.c (verify_typedef_table): Verify the extends field.
3240 * metadata-verify.c (mono_image_verify): Add a is_corlib.
3242 * verify-internals.h: Same.
3244 * pedump.c: Fix for mono_image_verify new signature.
3246 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3248 * metadata-verify.c (verify_typedef_table): Verify for some invalid
3251 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3253 * metadata-verify.c (verify_module_table): Ignore the generation field.
3255 2009-04-15 Martin Baulig <martin@ximian.com>
3257 * debug-mono-symfile.c
3258 (mono_debug_symfile_lookup_location): Don't print a warning for
3259 unknown extended opcodes if they're within 0x40 and 0x7f.
3261 2009-04-15 Zoltan Varga <vargaz@gmail.com>
3263 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
3264 invoke signatures returning an enum. Fixes #494847.
3266 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3268 * metadata-verify.c: Initial code to verify the typedef table.
3270 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3272 * verify.c (mono_method_verify): Don't fail if an unconditional branch
3273 with non empty stack happens before the beginning of a try block.
3277 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3279 * metadata-verify.c: Verify typename and typenamespace fields of
3282 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
3284 * metadata-verify.c: Initial code to verify the typeref table.
3286 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
3288 * verify.c (verify_delegate_compatibility): Fix error message.
3290 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
3292 * security-core-clr.c: Fix typo
3294 2009-04-14 Zoltan Varga <vargaz@gmail.com>
3296 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
3297 a MonoGHashTable to keep its values alive.
3298 (emit_marshal_boolean): Fix a warning.
3300 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
3302 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
3303 not have any interface configured for IPv4/IPv6.
3305 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
3307 * assembly.c: fix typo in error message.
3309 2009-04-14 Zoltan Varga <vargaz@gmail.com>
3311 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
3312 allocating the location holding the this argument to prevent
3313 'too many root sets' errors.
3315 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
3316 to mark fields as special static.
3317 (mono_field_static_get_value): Handle special static fields.
3318 (mono_field_static_set_value): Ditto.
3320 * class-internals.h (struct _MonoClassField): Document this.
3322 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3324 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
3325 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
3326 case. This will handle when managed code returns null to native code.
3328 Code is contributed under MIT/X11 license.
3330 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3332 * object.c (build_imt_slots): Changing a free to a g_free to match
3333 the g_malloc0 in add_imt_builder_entry that allocated this memory.
3335 Code is contributed under MIT/X11 license.
3337 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3339 * marshal.c (emit_marshal_boolean): Adding code to ensure that
3340 the correct TRUE value is passed through the marshaling layer.
3342 Code is contributed under MIT/X11 license.
3344 2009-04-13 Zoltan Varga <vargaz@gmail.com>
3346 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
3347 correctly. Fixes #492330.
3349 * marshal.c: Fix the embedding of object pointers into JITted code in
3350 the native-to-managed wrappers by allocating some GC tracked memory, and
3351 embedding the address of that.
3353 2009-04-11 Zoltan Varga <vargaz@gmail.com>
3355 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
3356 pointers into the vtable.
3358 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
3360 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
3362 * verify.c (verify_ldftn_delegate): Improve error message.
3364 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
3366 * reflection.c (my_mono_class_from_mono_type): Remove.
3368 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
3370 Prepare to reduce memory usage of owner-less generic parameters (1/n)
3371 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
3372 and constraints fields into ...
3373 (MonoGenericParamInfo): ... this.
3374 (mono_generic_param_info, mono_generic_container_get_param_info):
3376 * class.c, debug-helpers.c, icall.c: Update to changes.
3377 * metadata.c, reflection.c, verify.c: Likewise.
3379 2009-04-09 Zoltan Varga <vargaz@gmail.com>
3381 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
3383 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
3385 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
3386 booleans with sbytes.
3388 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3390 * class.c (can_access_instantiation): Verify accesibility of element types
3391 for arrays and pointers.
3393 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
3395 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
3399 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3401 * verify.c (do_invoke_method): Improve error messages.
3403 2009-04-08 Bill Holmes <billholmes54@gmail.com>
3405 * verify.c: Fixing the MSVC build.
3407 Code is contributed under MIT/X11 license.
3409 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
3411 * security-core-clr.c: Simplify get_reflection_caller not to call
3412 mono_method_get_last_managed (another stack walk) and adjust the
3413 callers to handle a (should not happen) NULL return value.
3415 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3417 Add accessors to some MonoGenericParam fields
3418 * class-internals.h (mono_generic_param_owner): New accessor.
3419 (mono_generic_param_num): Likewise.
3420 (mono_type_get_generic_param_owner): New helper.
3421 (mono_type_get_generic_param_num): New helper.
3422 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
3424 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3426 * class-internals.h (mono_generic_container_get_param): New wrapper.
3427 * class.c, icall.c, metadata.c, verify.c: Use it.
3429 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3432 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
3433 the standard case/loop. In particular, don't complain about
3434 references to generic type definitions.
3436 2009-04-07 Zoltan Varga <vargaz@gmail.com>
3438 * debug-helpers.c (dis_one): Decode string arguments.
3440 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3442 * pedump.c (dump_verify_info): Dump type name correctly.
3444 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3446 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
3447 are larger than code size.
3449 This can happen in valid code if the try/catch block is not followed by any instruction
3450 and do a backward branch on the leave instruction.
3454 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
3456 * security-core-clr.c: Fix typo while comparing second method names
3457 in can_avoid_corlib_reflection_delegate_optimization
3459 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
3461 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
3465 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
3467 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
3468 a MVAR using a class context.
3472 2009-04-06 Zoltan Varga <vargaz@gmail.com>
3474 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
3476 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
3478 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
3479 functions supplied by the JIT for the SGEN GC.
3481 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
3483 2009-04-06 Massimiliano Mantione <massi@ximian.com>
3485 monitor.c (mono_monitor_try_enter_internal):
3486 Added calls to profile monitor contentions.
3487 Also duplicated a small piece of code (the "get the monitor" logic)
3488 from the fast path to the slow path, and changed the relevant goto
3489 statements, so that monitor acquisition events can be emitted from the
3490 slow path (this is by Paolo Molaro).
3492 2009-04-06 Massimiliano Mantione <massi@ximian.com>
3494 * profiler.c, profiler.h, profiler-private.h:
3495 Added support for profiling monitor contentions.
3497 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
3499 * metadata-verify.c: Verify the modules table.
3501 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
3503 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
3504 using the context of the method been verifier and not of the method been called.
3506 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
3507 safely inflate generic types.
3509 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
3511 * security-core-clr.c: Change the strategy for checking the
3512 "reflection using delegates optimization" to avoid unneeded
3513 attributes in multiple class libraries.
3515 2009-04-02 Mark Probst <mark.probst@gmail.com>
3517 * sgen-gc.c: Remove object element in the disappearing link struct
3518 by storing the object pointer in the link.
3520 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3522 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
3524 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3526 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
3528 * verify.c (mono_method_verify): Do proper bounds checking of exception
3531 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3533 * loader.c (mono_field_from_token): Don't crash if the field parent could
3536 2009-03-31 Mark Probst <mark.probst@gmail.com>
3538 * sgen-gc.c: Execute critical finalizers after ordinary
3541 * class-internals.h, domain.c: Add CriticalFinalizerObject to
3544 2009-03-31 Jb Evain <jbevain@novell.com>
3546 * verify.c (do_ldstr): don't check if a string is in the user strings
3547 heap if the current image is dynamic.
3549 2009-03-31 Mark Probst <mark.probst@gmail.com>
3551 * sgen-gc.c: Wait until the last finalizer has executed when
3552 returning from WaitForPendingFinalizers.
3554 2009-03-31 Martin Baulig <martin@ximian.com>
3556 * mono-debug-debugger.h (MonoDebuggerEvent): Add
3557 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
3558 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
3559 (mono_debugger_event_create_appdomain): New function.
3560 (mono_debugger_event_unload_appdomain): New function.
3562 * appdomain.c (mono_domain_create_appdomain_internal): Call
3563 mono_debugger_event_create_appdomain().
3565 2009-03-31 Martin Baulig <martin@ximian.com>
3567 * mono-debug-debugger.c
3568 (mono_debugger_register_class_init_callback): Also register the
3569 class init callback if the class is already initialized to make
3570 things work with shadow copied assemblies.
3572 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
3574 * security-core-clr.c
3575 (mono_security_core_clr_ensure_reflection_access_field): Let
3576 critical code access the field (just like we do for methods). Use
3577 check_field_access helper.
3578 (mono_security_core_clr_ensure_reflection_access_method): Use
3579 check_field_access helper.
3581 2009-03-31 Mark Probst <mark.probst@gmail.com>
3583 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
3584 call the run-finalize function directly.
3586 * gc.c, gc-internal.h: Make run_finalize() non-static.
3588 2009-03-31 Mark Probst <mark.probst@gmail.com>
3590 * sgen-gc.c: Use a separate struct for disappearing links.
3592 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
3594 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
3595 * MaxIOVectorLength enabled, just ignore them.
3598 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
3600 * metadata-verify.c: Fix eglib build.
3602 2009-03-30 Zoltan Varga <vargaz@gmail.com>
3604 * threads-types.h: Fix the win32 build.
3606 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
3608 * class.c: move coreclr inheritance/override checks to
3610 * security-core.clr.c|h: add code from class.c with additional
3611 documentation. Fix override check when the method is not critical.
3613 2009-03-28 Zoltan Varga <vargaz@gmail.com>
3615 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
3616 (match_class): Ditto.
3618 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
3620 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
3622 * metadata-verify.c: Implement table layout row size calculation. Verify
3623 the total size of the tables.
3625 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
3627 * metadata-verify.c: Verify heap sizes and size to decode row counts.
3629 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
3632 * console-io.[ch]: added new mono_console_init() to make sure that
3633 file descriptors 0, 1 and 2 are opened.
3636 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
3638 * appdomain.h: Export a new callback type and a new function to
3639 set this callback. This allow a mono host to provide it's own
3640 definition for "platform code".
3641 * metadata-internals.h: Add a core_clr_platform_code flag on
3642 _MonoImage to (cache and) know if it is representing platform
3644 * image.c (do_mono_image_open): Set core_clr_platform_code flag
3645 on platform code images.
3646 * security-core-clr.c|h
3647 (mono_security_set_core_clr_platform_callback): Allow the host
3648 to provide it's own platform check definition.
3649 (mono_security_core_clr_determine_platform_image): Detect if an
3650 image is platform code (using the specified callback).
3651 (mono_security_core_clr_is_platform_image): Return cached value
3654 2009-03-27 Zoltan Varga <vargaz@gmail.com>
3656 * threads.c (mono_create_thread): New helper function to wrap CreateThread
3657 which has different parameter types for the 'tid' argument in windows and
3660 * appdomain.c attach.c threads.c: Use the new helper.
3662 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
3664 * metadata-verify.c: Verify valid table bits.
3666 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
3668 * metadata-verify.c (verify_metadata_header): Store size in the size field.
3670 * metadata-verify.c: Add initial table schema verification.
3672 2009-03-26 Zoltan Varga <vargaz@gmail.com>
3674 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
3675 obtain the refclass argument needed by mono_param_get_objects (). Fixes
3678 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
3680 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
3682 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
3684 * security-core-clr.c: Add/update documentation
3686 2009-03-26 Zoltan Varga <vargaz@gmail.com>
3688 * marshal.c (emit_marshal_object): Generate code to throw an exception
3689 instead of throwing it. Fixes #488670.
3691 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
3693 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
3694 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
3695 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
3696 and add a call to mono_security_core_clr_ensure_delegate_creation
3697 to do the extra checks required by CoreCLR.
3698 * security-core-clr.c|h: Add function to check delegate creation,
3699 both in the binding and accessibility, under CoreCLR.
3701 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
3703 * reflection.c (mono_reflection_create_dynamic_method): when
3704 coreclr is enabled make sure that every resolved object are
3705 checked (e.g. field and method access).
3706 * security-core-clr.c|h: Add function to check objects resolved
3707 when a dynamic method is created.
3709 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3711 * metadata-verify.c: Cache directory rva translations.
3713 * metadata-verify.c: Add cli-header and streams verification.
3715 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3717 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
3718 the wrong offset (8 instead of 6).
3720 2009-03-23 Zoltan Varga <vargaz@gmail.com>
3722 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
3723 methods, return the native function address itself. Fixes
3726 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
3728 * console-io.c: some of the values for control characters might not be
3731 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
3733 * exception.c|h: Add helpers to create [Field|Method]AccessException
3734 * icall.c: Add required coreclr check calls for field reflection.
3735 Move the existing (method) check logic into security-core-clr.c
3736 * security-core-clr.c: Add functions to check if the access of a
3737 field or method is allowed when reflecting under coreclr. This is
3738 mostly done using a stack walk to find the "real" caller: i.e. the
3739 code that is calling the reflection
3741 2009-03-20 Zoltan Varga <vargaz@gmail.com>
3743 * gc-internal.h: Change location of gc_wrapper.h
3745 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
3747 * class.c: Simplification to coreclr checks for overrides that
3748 makes it easier to set breakpoints.
3750 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
3752 * security-core-clr.c|h: (mono_security_core_clr_class_level,
3753 mono_security_core_clr_method_level): Avoid potential
3754 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
3755 user/application code) and make it easier to set breakpoints
3757 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3759 * metadata-verify.c: Reject cli header tables that mono don't handle.
3761 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3763 * pedump.c: Fix CLI header dumping.
3765 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3767 * metadata-verify.c: More CLI header verification.
3769 2009-03-19 Zoltan Varga <vargaz@gmail.com>
3771 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
3773 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
3775 * metadata-verify.c: Initial verification of the CLI header.
3777 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
3779 * metadata-verify.c (verify_resources_table): Fix verification of zero
3780 sized resource section and id entries count.
3782 2009-03-18 Zoltan Varga <vargaz@gmail.com>
3784 * icall.c: Handle user types in many Type icalls. Fixes #486303.
3786 2009-03-17 Jb Evain <jbevain@novell.com>
3788 * profiler.c: call mono_gc_base_init from mono_profiler_load.
3790 2009-03-17 Zoltan Varga <vargaz@gmail.com>
3792 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
3793 (mono_gc_make_descr_for_array): Ditto.
3795 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
3797 * verify.c (mono_verifier_is_class_full_trust): Add support for
3798 CoreCLR security mode where trusted assemblies are defined as
3801 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3803 * metadata-verify.c: Add minimal PECOFF resource verification.
3805 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3807 * metadata-verify.c: Be less restrictive with some coff fields.
3809 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3811 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
3812 params as boxed values on stack. Fixes #485706.
3814 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3816 * console-io.c: the termios values may vary in different flavors of unix.
3818 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3820 * console-io.[ch]: return the entire set of control characters when
3821 initializing the terminal.
3822 * appdomain.c: bump corlib version.
3824 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
3826 * mono-perfcounters.c: added support for in-process custom
3827 performance counters.
3829 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3831 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
3833 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3835 * metadata-verify.c: Verify the data pointed by the import table.
3837 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3839 * metadata-verify.c (load_data_directories): Store data
3842 * metadata-verify.c: Verify the import table.
3844 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3846 * metadata-verify.c: Verify data directories.
3848 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3850 * metadata-verify.c: Check section header flags.
3852 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3854 * appdomain.c: if the assembly name is a shadow-copied file, return
3855 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
3856 in mono_make_shadow_copy.
3857 * icall.c: if the assembly name is a shadow-copied file, replace it
3858 with the original assembly path.
3860 Bug #484244 fixed. NUnit tests for corlib can be run without
3863 2009-03-12 Zoltan Varga <vargaz@gmail.com>
3865 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
3866 entries when the table is reallocated.
3868 * icall.c: Allocate the memory used by the mono_ptr_array macros using
3869 mono_gc_alloc_fixed () since it contains GC refs.
3871 2009-03-10 Zoltan Varga <vargaz@gmail.com>
3873 * reflection.c (ensure_complete_type): New helper function to call
3874 type resolve handlers for unfinished dynamic types.
3875 (resolve_object): Call it for MonoClassFields. Fixes #483852.
3877 2009-03-09 Zoltan Varga <vargaz@gmail.com>
3879 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
3882 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
3884 * appdomain.c (get_shadow_assembly_location): Fix memleak.
3886 2009-03-08 Zoltan Varga <vargaz@gmail.com>
3888 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
3889 between GCHandles of type WeakTrackResurrection and the objects they
3892 * gc.c: Partly implement the sematics of GCHandles of type
3893 WeakTrackResurrection: these handles should only be cleared after the
3894 finalizer of the object they are pointing to has ran.
3896 2009-03-06 Mark Probst <mark.probst@gmail.com>
3898 * icall.c: Partially revert r126631 because using the jump
3899 trampolines for generic shared methods makes it superfluous.
3901 2009-03-06 Zoltan Varga <vargaz@gmail.com>
3903 * threads.c (handle_store): Create the 'threads' hash table with the proper
3904 MONO_HASH_VALUE_GC type.
3906 2009-03-05 Zoltan Varga <vargaz@gmail.com>
3908 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
3911 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
3912 and LAST_GC_TRACKED as a GC root.
3914 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
3916 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
3917 the static data even if it consists of 1 reference.
3919 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
3920 if there is a GC descriptor.
3922 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
3923 instead of through the GC since they contain no object references.
3925 2009-03-05 Mark Probst <mark.probst@gmail.com>
3927 * generic-sharing.c (instantiate_other_info): Always return a jump
3928 trampoline for method code.
3930 2009-03-05 Marek Habersack <mhabersack@novell.com>
3932 * culture-info-tables.h: generated to include the en-tt culture.
3934 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3936 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
3937 capture the thread context.
3939 * object.c (mono_async_result_new): Cache the invoke wrappers to
3940 ExecutionContext::Capture.
3942 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3944 * marshal.h: Add a prototype for what mono_compile_method returns
3945 for invoke wrappers.
3947 * gc.c: Use the new prototype declaration.
3949 2009-03-04 Geoff Norton <gnorton@novell.com>
3951 * boehm-gc.c: Add some MONO_LOG tracing for the GC
3953 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
3955 2009-03-04 Martin Baulig <martin@ximian.com>
3958 (mono_debugger_runtime_invoke): Removed.
3960 * mono-debug-debugger.c
3961 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
3963 2009-03-02 Martin Baulig <martin@ximian.com>
3966 (mono_debugger_unhandled_exception): Removed.
3967 (mono_debugger_handle_exception): Removed.
3968 (mono_debugger_throw_exception): Removed.
3971 (mono_debug_debugger_version): Bump to 5.
3973 * mono-debug-debugger.c: Moved the exception handling code to
3974 ../mini/debug-mini.c
3976 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3978 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
3979 finalize_objects_hash.
3981 * gc.c: Use the separate lock to access the finalize_objects_hash field.
3983 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
3986 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
3989 * image.c (mono_image_close): Free it.
3991 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
3992 allowing a creation of a wrapper which invokes its method using a CALLVIRT
3993 on the this argument.
3995 * gc.c (run_finalize): Optimize the calling of the finalizers.
3997 2009-03-03 Martin Baulig <martin@ximian.com>
3999 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
4000 of the `MonoGenericInst' changes.
4002 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4004 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
4005 mono_array_class_get_cached to reduce locking contention. Extract
4008 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
4009 intermediary managed arrays. Use caching version of mono_array_new
4010 to allocate the result array.
4012 * icall.c (ves_icall_Type_GetEvents_internal): Same.
4014 * icall.c (ves_icall_Type_GetNestedTypes): Same.
4016 * locales.c (create_names_array_idx): Use mono_array_new_cached
4017 to reduce locking contention.
4019 2009-03-03 Zoltan Varga <vargaz@gmail.com>
4021 * object.c (mono_method_add_generic_virtual_invocation): Put back the
4022 thunk builder code for the non-interface case.
4024 2009-03-02 Zoltan Varga <vargaz@gmail.com>
4026 * object.c (get_generic_virtual_entries): New helper function to collect
4027 the virtual generic method instances which need to be added to an IMT
4029 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
4030 Instead of creating a new IMT thunk, reset the vtable slot to the
4031 trampoline, the thunk will be created the next time the trampoline is called.
4032 (build_imt_slots): Add support for virtual generic methods in interfaces by
4033 adding to the IMT thunk all the methods registered using
4034 mono_method_add_generic_virtual_invocation ().
4036 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
4037 (struct _MonoIMTCheckItem): Ditto.
4039 * object.c (mono_method_add_generic_virtual_invocation): Take a
4040 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
4041 the IMT thunk to include all items.
4043 * object.c (mono_class_create_runtime_vtable): Add a missing
4044 mono_loader_unlock ().
4046 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
4048 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4050 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
4052 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
4054 * object-internals.h: Rename _MonoReflectionEvent to
4055 MonoReflectionMonoEvent so it reflects the right managed type.
4056 Add a MonoReflectionEvent that correctly represents System.EventInfo.
4059 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
4062 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
4064 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
4065 intermediary managed arrays. Use caching version of mono_array_new
4066 to allocate the result array.
4068 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
4070 * reflection.c: Use cached version of mono_array_new alongside
4071 the mono_reflection_get_custom_attrs_by_type call path.
4073 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
4075 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
4076 intermediary managed arrays. Use caching version of mono_array_new
4077 to allocate the result array.
4079 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
4081 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
4083 * icall.c: Add small implementation of a growable stack bound array.
4085 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
4087 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
4088 intermediary managed arrays. Use caching version of mono_array_new
4089 to allocate the result array.
4091 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
4093 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
4094 helps Enum::CompareTo to be implemented without reboxing all enums
4095 to their underlying type.
4096 2009-02-27 Zoltan Varga <vargaz@gmail.com>
4098 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
4099 since it acquires a global lock leading to scalability problems.
4101 * profiler.c: Make the stat profiler work with multiple appdomains, this
4102 currently only works when no appdomains are unloaded.
4104 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
4106 * appdomain.c: make the check to avoid copying when the assembly is
4107 already shadow copied actually work.
4109 2009-02-26 Zoltan Varga <vargaz@gmail.com>
4111 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4113 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
4114 changes to the managed side.
4116 2009-02-25 Zoltan Varga <vargaz@gmail.com>
4118 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
4119 classes + a separate lock for it, as it is used frequently at runtime, not
4120 just during metadata loading/JIT compilation.
4122 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
4125 * object-internals.h (mono_class_from_name_cached): New macro to cache
4126 the results of the lookup locally without having to declare a static
4127 variable to hold it.
4128 (mono_class_get_field_from_name_cached): Ditto.
4129 (mono_array_class_get_cached): Ditto.
4131 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
4134 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
4135 slower search in metadata.
4137 * pedump.c: Fix a warning.
4139 2009-02-23 Zoltan Varga <vargaz@gmail.com>
4141 * reflection.c (encode_locals): Add checks for user types.
4142 (method_encode_clauses): Ditto.
4143 (method_encode_code): Ditto.
4144 (mono_image_create_token): Ditto.
4146 * object-internals.h: Change the type of more fields from MonoReflectionType*
4149 2009-02-22 Zoltan Varga <vargaz@gmail.com>
4151 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
4152 the a thread does not suspend within 100ms.
4154 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
4155 in addition to StopRequested as well.
4157 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
4159 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
4160 search the method_hash before inserting a new entry, to avoid crashes when
4161 the same method is inserted multiple times, causing the old
4162 MonoDebugMethodInfo structure to be freed by the value dtor function.
4164 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
4166 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
4167 SO_EXLUSIVEADDRUSE where available.
4169 2009-02-21 Zoltan Varga <vargaz@gmail.com>
4171 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
4172 runtime invoke wrappers, this time it is string ctor wrappers, which
4173 pass a dummy string as 'this' instead of their obj argument. Fixes
4176 2009-02-21 Jb Evain <jbevain@novell.com>
4178 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
4179 only get create_culture once.
4181 2009-02-20 Zoltan Varga <vargaz@gmail.com>
4183 * reflection.c (mono_reflection_setup_internal_class): Move the user type
4184 check before the locking.
4186 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
4187 (mono_reflection_create_runtime_class): Ditto.
4188 (mono_reflection_sighelper_get_signature_local): Ditto.
4189 (mono_reflection_sighelper_get_signature_field): Ditto.
4191 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
4192 is a System.MonoType object or similar.
4193 (monotype_cast): New helper function to cast a MonoObject to a
4194 MonoReflectionType object.
4196 * object-internals.h: Change MonoReflectionType* members in structures to
4197 MonoObject* members to force the usage of the monotype_cast () function.
4199 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
4200 structures/arrays. This causes us to assert instead of crashing when
4201 instances of user defined subclasses of System.Type are encountered.
4203 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
4207 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
4208 win32 resource loaded from a PE file.
4210 * image.c: fix mono_image_lookup_resource.
4212 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
4216 * threads.c: added internal call for WaitHandle.SignalAndWait.
4218 2009-02-19 Bill Holmes <billholmes54@gmail.com>
4220 * cominterop.c : Adding cominterop_type_from_handle and
4221 registering it as an icall. Replacing all references
4222 to type_from_handle.
4224 Code is contributed under MIT/X11 license.
4226 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
4228 * Makefile.am: Add lock-tracer.h and lock-trace.c.
4230 * appdomain.c: Call the tracer init function.
4232 * domain-internals.h: Enable the tracer for the domain locks.
4234 * image.c: Enable the tracer for image locks.
4236 * loader.c: Enable the trace for the loader lock.
4239 * lock-tracer.c: Initial implementation of the lock trace utility.
4240 The tracer requires a compile time define to be enabled and a env var
4241 to be enabled at runtime.
4243 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
4245 * domain.c (mono_domain_code_foreach): Improve documentation.
4247 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
4250 * generic-sharing.c:
4252 * reflection.c: Adjust locking order to the new semantics where the loader lock
4255 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
4257 * domain.c: Add mono_domain_code_* functions that perform locking
4258 around the domain codeman.
4260 * domain-internals.h: Export those functions.
4262 * object.c: Use new functions instead of acquiring the domain lock.
4264 2009-02-19 Zoltan Varga <vargaz@gmail.com>
4266 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
4267 delegate. Fixes #477396.
4269 2009-02-18 Zoltan Varga <vargaz@gmail.com>
4271 * reflection.c (create_custom_attr): Get rid of alloca.
4273 2009-02-18 Bill Holmes <billholmes54@gmail.com>
4275 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
4276 Adding exception handling for all CCW calls.
4278 Code is contributed under MIT/X11 license.
4280 2009-02-18 Zoltan Varga <vargaz@gmail.com>
4282 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
4284 * marshal.c (emit_marshal_boolean): Add null checks to the new
4285 native->managed marshalling code. Fixes #476247.
4287 2009-02-17 Zoltan Varga <vargaz@gmail.com>
4289 * class.c (mono_class_get_vtable_entry): Move the addition of
4290 static rgctx invoke wrappers for vtable methods here, this simplifies
4291 a lot of code and causes fewer rgctx wrappers to be created.
4293 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
4294 name of the statistics to begin with an uppercase.
4296 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4298 * reflection.c: Revert previous change as it breaks the build.
4300 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4302 * verify.c: Properly handle SZARRAY element type.
4306 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4308 * reflection.c (mono_image_create_method_token): Correctly encode
4309 MethodDef MemberRefParent token.
4313 2009-02-17 Zoltan Varga <vargaz@gmail.com>
4315 * image.c (mono_image_close): Delete the critical section before
4316 freeing the memory holding it.
4318 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4320 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
4323 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4325 * pedump.c (main): Call mono_marshal_init so pedump
4328 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4330 * loader.c (method_from_memberref): Properly fix #474271 and
4331 don't break the runtime bad.
4333 2009-02-16 Zoltan Varga <vargaz@gmail.com>
4335 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
4336 (mono_domain_alloc0): Ditto.
4338 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4340 * loader.c (method_from_memberref): Don't abort if the array
4341 method is not found. A regular loader failure is more informative
4346 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4348 *loader.c: Guard MonoImage::method_cache/methodref_cache
4349 using the image lock instead of the loader lock.
4351 * metadata.h: Add comments about which fields are protected by
4354 2009-02-16 Zoltan Varga <vargaz@gmail.com>
4356 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
4358 * generic-sharing.c (mono_method_construct_object_context): Remove the
4359 wrapper_type == NONE assert, it is not needed.
4361 2009-02-15 Zoltan Varga <vargaz@gmail.com>
4363 * reflection.c (clear_cached_object): New helper function.
4364 (mono_method_clear_object): New function to clear the cached reflection
4365 objects for a dynamic method.
4367 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
4368 Partly fixes # 463323.
4370 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
4374 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
4376 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
4378 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
4379 take the image lock instead of the loader lock.
4381 * metadata-internals.h: Export new functions.
4383 2009-02-12 Miguel de Icaza <miguel@novell.com>
4385 * domain.c (app_config_parse): Remove another use of stat that is
4386 not necessary as g_file_get_contents already does the presence
4389 2009-02-13 Zoltan Varga <vargaz@gmail.com>
4391 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
4393 * marshal.c: Move the bstr handling code to cominterop.c.
4395 * marshal.c: Remove some COM interop code missed previously.
4397 2009-02-12 Miguel de Icaza <miguel@novell.com>
4399 More Paolo patches from the Wii port:
4401 * security.c: Remove ves_icall_System_Environment_get_UserName
4404 * icall.c: And put ves_icall_System_Environment_get_UserName
4407 * appdomain.c (mono_set_private_bin_path_from_config): Remove
4408 redundant call to stat that was only used to test for the file
4409 existence. Patch from Paolo.
4411 * gc.c (run_finalize): If COM is disabled, do not link in
4412 mono_marshal_free_ccw.
4414 * generic-sharing.c: Use alloca.h here as well.
4416 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
4418 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
4420 2009-02-13 Zoltan Varga <vargaz@gmail.com>
4422 * cominterop.c cominterop.h: New files.
4424 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
4425 function/typedefs which are needed by cominterop.c global.
4427 2009-02-12 Mark Probst <mark.probst@gmail.com>
4429 * generic-sharing.c: Don't take the loader lock to guard image
4432 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4434 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
4435 called without the loader lock which is required to guard MonoImage:tokens.
4437 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4443 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
4445 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4447 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
4448 Rework the code to use regular mono_image_alloc/0.
4450 * loader.c: Rework the code to use regular mono_image_alloc/0.
4452 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
4454 2009-02-12 Bill Holmes <billholmes54@gmail.com>
4456 * object-internals.h : Fixing a typo in the
4457 MonoReflectionComVisibleAttribute struct.
4459 * marshal.c (cominterop_com_visible): Check the implemented
4460 interfaces for ComImport.
4462 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
4463 assume that bools should be treated as VARIANTBOOLs.
4465 * marshal.c (emit_marshal_boolean): Adding cases for
4466 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
4468 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
4469 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
4471 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
4472 should be treated as VARIANTBOOLs.
4474 Code is contributed under MIT/X11 license.
4476 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4478 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
4479 allocation with the image lock.
4481 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4483 This patch is the last of a series to remove explicit reference of MonoImage::mempool
4484 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
4486 * object.c: Add mono_string_to_utf8_image.
4488 * object-internals.h: Export mono_string_to_utf8_image.
4490 * reflection.c: Rework all explicit references to the the image mempool to go thought
4491 the mono_image_alloc set of functions.
4493 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4495 This patch is the third of a series to remove explicit reference of MonoImage::mempool
4496 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
4497 and generics-sharing.c.
4499 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
4500 as first argument. Note that this function remains broken as it doesn't perform locking around the
4503 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
4505 * image.c: Add g_slist_append_image.
4507 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
4508 the supplied image for allocation. Move code into mono_metadata_field_info_full.
4510 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
4511 Fix all related code to do the same.
4513 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
4515 * metadata-internals.h: Fix the signatures.
4517 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4519 This patch is the second of a series to remove explicit reference of MonoImage::mempool
4520 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
4521 and similar to work using MonoImage.
4523 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
4526 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
4528 * class.c (mono_metadata_signature_deep_dup): Same.
4530 * class.c (inflate_generic_type): Same.
4532 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
4534 * metadata.c (mono_metadata_signature_dup_full): Same.
4536 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
4537 mono_metadata_signature_dup_full.
4539 * metadata.c (mono_metadata_type_dup): Same.
4541 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
4543 * reflection.c: Same.
4545 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
4547 * metadata-internals.h: Fix the signatures.
4549 * class-internals.h: Same.
4551 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4553 This patch is the first of a series to remove explicit reference of MonoImage::mempool
4554 and use mono_image_alloc set of functions instead.
4556 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
4557 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
4560 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
4562 * class.c (g_list_prepend_mempool): Removed.
4564 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
4566 * image.c: Add g_list_prepend_image.
4568 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
4570 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
4573 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4575 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
4578 * image.c (mono_image_init): Init the lock field.
4580 * image.c (mono_image_init): Cleanup the lock field.
4582 * image.c: Add mono_image_(un)lock functions.
4584 2009-02-11 Mark Probst <mark.probst@gmail.com>
4586 * class.c, class-internals.h: mono_method_get_context_general()
4587 combines the functionality of mono_method_get_context() and
4588 mini_method_get_context().
4590 * generic-sharing.c, domain-internals.h:
4591 mono_method_construct_object_context() and
4592 mono_domain_lookup_shared_generic() moved from mini.
4594 * icall.c (ves_icall_InternalInvoke): Handle the case where the
4595 method doesn't have the correct instantiation because it's shared
4596 generic code. Fixes #473999.
4598 2009-02-11 Zoltan Varga <vargaz@gmail.com>
4600 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
4602 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
4604 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4606 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
4608 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
4610 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
4611 and recheck the cache for dups after it.
4613 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
4615 Fixes one of the deadlocks found in #473150.
4617 2009-02-11 Bill Holmes <billholmes54@gmail.com>
4619 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
4620 For Win32, add additional break conditions for accept.
4622 Code is contributed under MIT/X11 license.
4624 2009-02-10 Zoltan Varga <vargaz@gmail.com>
4626 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
4627 lazily initialize the native wrapper cache.
4628 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
4629 cache, since they are different from the normal wrappers.
4631 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
4633 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
4634 AOT compiled native wrappers.
4636 2009-02-09 Geoff Norton <gnorton@novell.com>
4639 * security-core-clr.c: Allow enabling core-clr from the embedding
4642 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4644 * socket-io.c: when requesting all the local ips, if there are no
4645 interfaces up and running, MS returns 127.0.0.1.
4647 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4649 * mono-perfcounters-def.h: processor time is an inverse time.
4652 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4654 * socket-io.c: an empty host name returns the list of local IPs.
4655 Fixes bug #386637 part 1/2.
4657 2009-02-07 Zoltan Varga <vargaz@gmail.com>
4659 * verify.c (mono_class_interface_implements_interface): Call
4660 mono_class_setup_interfaces ().
4661 (merge_stacks): Ditto.
4663 2009-02-06 Zoltan Varga <vargaz@gmail.com>
4665 * class.c (mono_class_setup_interfaces): New function to lazily initalize
4667 (mono_generic_class_get_class): Don't initalize klass->interfaces.
4668 (mono_generic_class_get_class): Ditto.
4670 2009-02-06 U-QUACK\miguel <miguel@quack>
4672 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
4673 they live in security.c
4675 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
4676 another bit from Paolo's code.
4678 2009-02-06 Zoltan Varga <vargaz@gmail.com>
4680 * object.c (build_imt_slots): Add a small optimization to avoid inflating
4681 methods which will be discarded by add_imt_builder_entry ().
4683 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
4686 * loader.c: Add a statistics for the size of the memberref signature cache.
4688 * loader.c (find_cached_memberref_sig): New helper function.
4689 (cache_memberref_sig): Ditto.
4691 * loader.c: Cache the result of parsing memberref signatures, since otherwise
4692 they will be parsed again for every generic instantiation, leading to unbounded
4695 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4697 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
4698 parameters of generic methods.
4700 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
4701 after the original method is copied to the inflated method.
4702 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
4704 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
4705 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
4707 * class.c metadata.c: Update after the changes above.
4709 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
4711 * metadata-verify.c: Simplified error handling and added
4712 section table validation.
4714 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4716 * class-internals.h (MonoClassExt): New structure containing rarely used
4717 fields of MonoClass.
4718 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
4719 through a new 'ext' field.
4721 * class.c (mono_class_alloc_ext): New helper function to allocate
4724 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
4726 2009-02-05 Mark Probst <mark.probst@gmail.com>
4728 * object.c (mono_object_get_virtual_method): Properly inflate
4729 generic methods. Fixes #472692.
4731 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
4733 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
4734 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
4735 for the parent type, the created type must be ready to be used on a generic
4737 We fill this_arg/byval_arg if the parent is a generic instance to make sure
4738 we won't have duplicated entries in generic_inst_cache.
4742 2009-02-05 Miguel De Icaza <miguel@novell.com>
4744 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
4745 replace with plain BSD per the comments on the bug MONO77637.
4747 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4749 * class.c (mono_class_get_generic_class): New accessor function.
4750 (mono_class_get_generic_container): Ditto.
4752 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
4753 fields, similar to the ones in MonoMethod.
4755 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
4756 (mono_class_create_from_typedef): Set klass->is_generic if needed.
4758 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
4760 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
4761 the same information as element_class->byval_arg.
4763 * class.c reflection.c: Remove references to class->byval_arg.
4765 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
4766 klass->enum_basetype directly.
4768 * verify.c metadata.c object.c icall.c reflection.c: Use
4769 mono_class_enum_basetype () instead of accessing klass->enum_basetype
4772 2009-02-04 Miguel de Icaza <miguel@novell.com>
4774 * icall-def.h: Remove internal calls for sockets when
4775 DISABLE_SOCKET is defined, file system writing features when the
4776 OS only support reading and not writing data and Policy support if
4777 the Policy is disabled.
4779 * image.c (do_mono_image_open): Apply Paolo's patches for using
4780 mono_file_map_ APIs here.
4782 * assembly.c: Add support for platforms to avoid prefix
4785 2009-02-04 Zoltan Varga <vargaz@gmail.com>
4787 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
4790 * class.c (mono_class_inflate_generic_class): New helper function.
4792 * class.c: Use mono_class_inflate_generic_class in a few places. Add
4793 statistics for inflated methods/classes.
4795 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
4797 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
4798 the call is made from Delegate.CreateDelegate () for the invoke method of
4801 * loader.c: Add a statistics for the memory occupied by inflated signatures.
4803 * metadata.c (mono_metadata_signature_size): New helper function.
4805 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
4808 * metadata.c (inflated_method_in_image): Avoid calling
4809 mono_method_signature () if the method does not already have a signature.
4811 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4813 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
4814 valuetype is compatible with target type, check by inheritance as a
4815 VT is not really compatible with System.ValueType, for example.
4817 * verify.c (do_invoke_method): Improve error message.
4819 * verify.c (do_box_value): If boxing a nullable, use the type argument
4822 * verify.c (do_newobj): Improve error message.
4826 2009-02-03 Miguel de Icaza <miguel@novell.com>
4828 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
4830 2009-02-03 Mark Probst <mark.probst@gmail.com>
4832 * generic-sharing.c: Don't hold domain lock when calling
4833 instantiate_other_info(). Fixes #471958.
4835 * domain-internals.h, loader.c: Describe locking policy of domain
4836 lock vs loader lock.
4838 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4840 * verify.c (mono_delegate_signature_equal): Make it possible to check
4841 first-arg-bound delegates to static method.
4843 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
4844 static methods with the first arg bound.
4848 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4850 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
4853 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
4854 under strict mode. Any type, when boxed can be seen as a reference type.
4858 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4860 * object.h: The lower bound of an array is a signed integer value.
4861 Introduce mono_array_lower_bound_t typedef. It should be used instead of
4862 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
4864 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
4865 calculate the upper bound.
4869 2009-02-02 Miguel de Icaza <miguel@novell.com>
4871 From Paolo's work, refactored, cleared up:
4873 * threadpool.c, icall.c: ifdef code that requires a working socket
4876 * metadata.c (mono_metadata_field_info): Do not attempt to return
4877 a value from a function declared as void.
4879 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
4880 from the console stack.
4882 * assembly.c: use strrchr instead of rindex.
4884 * class.c, object.c, marshal.c, icall.c, reflection.c: include
4885 alloca.h on systems that have it.
4887 * environment.c: Avoid code that uses stuff from
4890 * appdomain.c: Include sys/time.h.
4892 * console-io.c: include sys/ioctl.h if it is available.
4894 2009-02-03 Zoltan Varga <vargaz@gmail.com>
4896 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
4898 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
4901 * marshal.c: Set mb->skip_visibility instead of setting it on the method
4902 after it was created and cached, as the later is not thread safe.
4904 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4906 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
4907 called while the debugging module is not initialized. Fixes #471669.
4909 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
4911 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
4915 2009-02-02 Mark Probst <mark.probst@gmail.com>
4917 * generic-sharing.c (lookup_or_register_other_info): Make sure the
4918 loader lock is not taken while the templates lock is held. Fixes
4921 2009-02-02 Mark Probst <mark.probst@gmail.com>
4923 * metadata.c (type_in_image): Added a check to fix a monodis
4926 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4928 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
4931 * object.c (mono_runtime_invoke_array): Ditto.
4933 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
4934 freeing wrappers of dynamic methods.
4936 * loader.c (mono_free_method): Call it. Fixes #463323.
4938 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
4939 methods taking vtype/byref arguments, to fix yet another bug caused by
4940 the sharing of runtime invoke wrappers. Partly fixes #471259.
4942 2009-02-01 Zoltan Varga <vargaz@gmail.com>
4944 * debug-mono-symfile.c (check_line): Return NULL instead of returning
4945 <first file in file table>:1 when the IL offset does not have an associated
4948 2009-01-31 Zoltan Varga <vargaz@gmail.com>
4950 * mono-debug.c (mono_debug_lookup_locals): New function to return local
4951 variable info for a method.
4953 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
4955 2009-01-30 Jb Evain <jbevain@novell.com>
4957 * pedump.c: reuse code from monodis to make sure pedump honors
4958 MONO_PATH, which is needed to verify net_2_1 assemblies.
4960 2009-01-29 Zoltan Varga <vargaz@gmail.com>
4962 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
4963 there is no line number info.
4965 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
4967 Avoid some MonoType allocations
4968 * reflection.c (mono_reflection_initialize_generic_parameter):
4969 Reuse MonoType from param->pklass rather than allocating one.
4970 (mono_dynamic_image_free): Update to changes.
4972 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4974 Rearrange some code to improve consistency
4975 * reflection.c (mono_reflection_setup_generic_class): Move body ...
4976 (mono_reflection_initialize_generic_parameter): ... here.
4978 2009-01-28 Zoltan Varga <vargaz@gmail.com>
4980 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
4981 with type constraints as an experiment.
4983 * boehm-gc.c (on_gc_notification): Update mono_stats.
4985 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4987 Avoid some allocations
4988 * class-internals.h (_MonoGenericInst::type_argv): Convert from
4989 pointer to tail array to avoid extra allocation.
4990 * metadata.c (free_generic_inst): Update to changes.
4991 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
4994 2009-01-27 Zoltan Varga <vargaz@gmail.com>
4996 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
4997 return TRUE if the two type objects are the same.
4999 2009-01-26 Zoltan Varga <vargaz@gmail.com>
5001 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
5002 (mono_class_native_size): Use klass->marshal_info->min_align instead of
5003 klass->min_align, since klass->min_align contains the managed alignment,
5004 while the native alignment can be different, like for longs on x86.
5007 * class-internals.h (MonoMarshalType): Add a min_align field.
5009 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
5011 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
5014 2009-01-26 Zoltan Varga <vargaz@gmail.com>
5016 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
5017 some comments about the usage of the used_regs field.
5019 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
5022 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
5024 * appdomain.c: return NULL instead of throwing FileNotFoundException
5025 when LoadAssembly() fails.
5027 2009-01-23 Mark Probst <mark.probst@gmail.com>
5029 * metadata.c (mono_metadata_generic_param_equal): Only compare the
5030 image if the owner is NULL. Fixes the AOT failures.
5032 2009-01-23 Zoltan Varga <vargaz@gmail.com>
5034 * metadata.c (mono_metadata_load_generic_params): Initialize the
5035 MonoGenericParam structure using memset so the image field is initialized
5038 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5040 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
5043 2009-01-21 Zoltan Varga <vargaz@gmail.com>
5045 * class.c (mono_class_setup_vtable_general): In the generic instance
5046 optimization, set method->slot for abstract virtual methods. Fixes part of
5049 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
5051 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
5052 which signals that the unloading has started but all appdomain services must
5055 * appdomain.c (mono_domain_unload): The initial state for unloading now
5056 is unloading_start and we switch to unloading after the managed call to
5057 AppDomain::DomainUnload has finished.
5059 The new unloading state has to be created because managed code in the
5060 DomainUnload event can depend on things like the threadpool still working.
5061 The domain must remain fully functional while the event executes.
5063 This shown as an issue due to Process::WaitForExit, which waits for
5064 async reads of stdout and stderr to complete. Since those are processed
5065 in the threadpool the code deadlocks because the DomainUnload callback
5066 waits for the async read finished event, which should have been set by a
5067 threadpool job but has been discarded due to the domain been in unload
5070 2009-01-21 Mark Probst <mark.probst@gmail.com>
5072 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
5075 2009-01-21 Mark Probst <mark.probst@gmail.com>
5077 * reflection.c (resolve_object): For fields, inflate the class and
5078 then get the field in the inflated class.
5080 2009-01-20 Mark Probst <mark.probst@gmail.com>
5082 * object-internals.h (struct _MonoException): Added a comment
5083 explaining the new use of trace_ips.
5085 2009-01-20 Mark Probst <mark.probst@gmail.com>
5087 * generic-sharing.c (inflate_other_data): Inflate array methods
5090 * loader.c, class-internals.h: Rename search_in_array_class() to
5091 mono_method_search_in_array_class() and make it non-static.
5093 2009-01-19 Zoltan Varga <vargaz@gmail.com>
5095 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
5096 Hopefully fixes #458168.
5098 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
5100 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
5101 as it is performed elsewhere.
5103 Code is contributed under MIT/X11 license
5105 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
5107 * mono-perfcounters-def.h: Add counters for asp.net requests total and
5109 * object.c (mono_raise_exception): Increment the exceptions total
5110 counter when an exception is thrown.
5111 * class-internals.h: Add a location for storing the total number of
5112 asp.net requests served.
5113 * mono-perfcounters.c: Implement update support for asp.net counters
5114 from the class libraries. Implement read support for asp.net counters
5115 and exceptions total counter.
5117 2009-01-19 Zoltan Varga <vargaz@gmail.com>
5119 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
5120 accessing klass->methods. Fixes #467385.
5122 2009-01-18 Zoltan Varga <vargaz@gmail.com>
5124 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
5125 for byval arguments without an [Out] attribute. Fixes #467212.
5127 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
5128 Fix compilation under android.
5130 * sgen-gc.c: Instead of scanning gray objects after all roots have been
5131 processed, scan them directly after they are copied, to achieve better locality
5134 * socket-io.c: Applied patch from Koushik Dutta
5135 (koush@koushikdutta.com). Disable IPV6 when running under android.
5137 2009-01-18 Zoltan Varga <vargaz@gmail.com>
5139 * icall.c (ves_icall_InternalExecute): Add write barriers.
5141 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
5144 * sgen-gc.c: Implement write barriers in IL code.
5146 2009-01-17 Geoff Norton <gnorton@novell.com>
5148 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
5150 2009-01-17 Geoff Norton <gnorton@novell.com>
5152 * image.c: When unloading the image->references table, there can be gaps
5153 in it. Ensure that we iterate every entry to avoid leaking assembly references
5154 when unloading an appdomain.
5156 2009-01-16 Zoltan Varga <vargaz@gmail.com>
5158 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
5159 speed up ptr-in-nursery checks.
5161 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
5162 threads_lock () to prevent deadlocks.
5164 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
5165 does not need to be scanned during minor collections, since writes to it
5166 must use write barriers.
5168 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
5170 * metadata-verify.c: Add pe nt header verification.
5172 2009-01-15 Zoltan Varga <vargaz@gmail.com>
5174 * gc.c: Fix a few warnings when using SGEN.
5176 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
5178 * metadata-verify.c: Add pe optional header verification.
5180 2009-01-15 Zoltan Varga <vargaz@gmail.com>
5182 * sgen-gc.c: Add support for user defined marker functions, used by
5183 MonoGHashTable to avoid registering a GC root for every hash node.
5185 2009-01-14 Zoltan Varga <vargaz@gmail.com>
5187 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
5188 non-pinned roots into separate hashes to avoid having to traverse them
5189 in functions which are only interested in one kind.
5191 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
5193 * metadata-verify.c: Add pe header machine field verification.
5195 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
5197 * metadata-verify.c: Add pe header size verification.
5199 2009-01-14 Zoltan Varga <vargaz@gmail.com>
5201 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
5202 using the GC, they don't contain references.
5204 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
5206 2009-01-13 Geoff Norton <gnorton@novell.com>
5208 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
5209 AppDomains created on the native side can be cleaned up on the native side.
5211 2009-01-13 Geoff Norton <gnorton@novell.com>
5213 * appdomain.c: Ensure that we call mono_context_init for the embedding api
5214 as well as the managed api.
5216 2009-01-13 Geoff Norton <gnorton@novell.com>
5218 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
5219 with a MonoAppDomain initialized against it.
5221 2009-01-13 Zoltan Varga <vargaz@gmail.com>
5223 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
5225 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
5227 * marshal.c: Avoid setting the exception clauses after a method has been entered
5228 into the wrapper caches. Fixes #465700.
5230 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
5232 (mono_mb_create_method): Set the clauses from the method builder.
5234 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5236 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
5237 Patch from Makoto Kishimoto.
5239 2009-01-13 Zoltan Varga <vargaz@gmail.com>
5241 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
5242 encoding them as ROOT_DESC_COMPLEX.
5243 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
5245 2009-01-12 Zoltan Varga <vargaz@gmail.com>
5247 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
5248 no longer point to the nursery.
5250 * sgen-gc.c: Add a few comments/FIXMEs.
5252 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
5254 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
5255 initialization of the various _method variables thread safe. Fixes
5258 2009-01-12 Mark Probst <mark.probst@gmail.com>
5260 * domain.c, domain-internals.h: Remove the shared_generics_hash
5261 and its lookup functions.
5263 2009-01-12 Bill Holmes <billholmes54@gmail.com>
5265 * socket-io.c: Fixing the MSVC build.
5267 Code is contributed under MIT/X11 license.
5269 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
5271 * metadata-verify.c: Add pe header watermark verification.
5273 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5275 * metadata-verify.c: Add lfanew verification.
5277 2009-01-12 Jb Evain <jbevain@novell.com>
5279 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
5280 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
5282 2009-01-10 Zoltan Varga <vargaz@gmail.com>
5284 * socket-io.c: Fix the build.
5286 * environment.c: Fix an #ifdef.
5288 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5290 * threadpool.c (async_invoke_thread): Handle the wait function returning
5291 WAIT_IO_COMPLETION as well.
5292 (async_invoke_io_thread): Ditto.
5294 2009-01-09 Bill Holmes <billholmes54@gmail.com>
5296 * threads.c: Fixing the Windows build.
5298 Code is contributed under MIT/X11 license.
5300 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5302 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
5304 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
5305 the thread to wait again.
5307 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5309 * metadata-verify.c: Initial skeleton of the metadata verifier.
5311 * pedump.c: Add support for the metadata verifier.
5313 * verify-internal.h: Export the whole assembly metadata verifier function.
5315 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5317 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
5319 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5321 * Makefile.am: Upgrade dtrace-prelink.sh location.
5323 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
5325 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
5326 well. Otherwise the shutdown deadlock that happens on unix will can happen
5328 If the main thread code finishes too fast it's possible that the finalizer
5329 thread won't have executed yet, won't record itself as the finalizer thread
5330 and the shutdown sequence will wait on it forever.
5332 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
5334 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
5337 2009-01-08 Miguel de Icaza <miguel@novell.com>
5339 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
5340 Robert Jordan for pointing this out.
5342 2009-01-08 Christian Prochnow <cproch@seculogix.de>
5345 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
5346 ves_icall_System_IO_DriveInfo_GetDriveType.
5348 2009-01-07 Miguel de Icaza <miguel@novell.com>
5350 * icall.c: Wrap calls to mono_strtod in CriticalSection
5351 invocations when using eglib, to work around #464316.
5353 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
5355 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
5356 return value of GetCurrentDirectory to never access unitialized memory.
5358 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
5360 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
5361 return value of GetCurrentDirectory and expand the buffer if needed.
5365 2009-10-07 Tom Hindle <tom_hindle@sil.org>
5367 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
5368 Adding a call to mono_init_com_types.
5370 Code is contributed under MIT/X11 license.
5372 2009-01-07 Geoff Norton <gnorton@novell.com>
5374 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
5375 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
5376 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
5377 be the value of the ip buffer.
5379 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5381 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
5382 interfaces_packed here.
5384 Fixes part of #463294.
5386 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5388 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
5390 Fixes part of #463294.
5392 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5394 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
5395 is a boxed complex as well.
5397 Fixes part of #463294.
5399 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5401 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
5402 control if a methodspec should be created for the generic method definition from external assemblies.
5403 Caching of methodspec is done using the handleref hash table.
5407 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
5409 * loader.c (find_method): When searching the interfaces of a class
5410 check the transitive closure of implemented interfaces.
5414 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
5416 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
5418 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
5420 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
5421 interfaces calculation to fill_valuetype_array_derived_types.
5423 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
5424 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
5427 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
5428 interfaces for valuetypes if needed.
5430 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
5431 for their basetype as well. Types are array expanded if rank is > 0.
5435 2008-12-30 Bill Holmes <billholmes54@gmail.com>
5437 * socket-io.h : Changing the signature of
5438 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
5441 * icall-def.h : Changing the signature of
5442 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
5444 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
5445 For Windows only. Avoid blocking when calling accept by
5446 querying for a connection via select. The loop also queries
5447 the thread state every 1000 micro seconds for the thread
5448 stop state. This will avoid the process hanging on shutdown
5449 when using a TcpChannel that is never connected to.
5451 Code is contributed under MIT/X11 license.
5453 2008-12-30 Marek Safar <marek.safar@gmail.com>
5455 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
5457 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
5459 * class.c (get_implicit_generic_array_interfaces): Extract common
5460 code to a helper function making it a lot easier on the eyes.
5462 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
5464 * class.c (get_implicit_generic_array_interfaces): If the internal
5465 enumerator is an interface inflate System.Object instead of itself.
5469 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
5471 * object.c (mono_runtime_invoke_array): Don't assert with
5472 byref nullable types.
5474 * marshal.c (mono_marshal_get_runtime_invoke): To handle
5475 byref nullables we unbox the object and store it on the
5477 We can't use the boxed object since it is the T of Nullable<T>
5478 and the boxed representation of a nullable it's underlying type
5480 We could cheat and create a boxed nullable and use the same
5481 machinery of other byref VTs but this feels like a hack and
5482 using the stack has the bonus of reducing heap pressure.
5486 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
5488 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
5493 2008-12-19 Bill Holmes <billholmes54@gmail.com>
5495 * icall-def.h : Adding an internal call definition for
5496 System.Environment.internalBroadcastSettingChange.
5498 * icall.c : Adding a Windows only implementation to broadcast a
5499 WM_SETTINGCHANGE when an environment variable has changed.
5501 Code is contributed under MIT/X11 license.
5503 2008-12-19 Mark Probst <mark.probst@gmail.com>
5505 * class.c, class-internals.h: Made
5506 mono_class_has_parent_and_ignore_generics() non-static.
5508 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
5510 * image.c: deal with the mmap failing when loading an image.
5512 2008-12-17 Geoff Norton <gnorton@novell.com>
5514 * threadpool.c: Ensure that the io_queue_lock is initialized
5515 in all circumstances, as we always attempt to cleanup against it.
5517 2008-12-17 Miguel de Icaza <miguel@novell.com>
5519 * icall.c (ves_icall_System_Environment_get_Platform): For
5520 compatibility reasons for existing client code we will keep
5521 returning 4 for a while.
5523 For how long will depend on the documentation being updated, and
5524 for us to give client code a chance to be updated.
5526 This reverts the original decison on #433108 since we did not
5527 catch roughly 33 instances of the broken code in our own source
5528 code base, we did not catch failures on the buildbots, and QA did
5529 not bring this as a problem.
5531 Only today I found some customer's code breaking due to our own
5532 class libraries not being fully updated and tracked it down to
5533 this change. I am reverting it because if we could not even get
5534 our story straight in our own code base, how can we hope that our
5535 end user code be fixed?
5537 As of this morning, our Wiki page that documents how to detect
5538 Unix had not been fixed.
5540 2008-12-16 Zoltan Varga <vargaz@gmail.com>
5542 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
5544 * class.c (mono_class_get_fields): Handle loading errors.
5546 2008-12-12 Mark Mason <mmason@upwardaccess.com>
5548 * 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.
5550 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
5552 * mono-perfcounters.c: avoid warning.
5554 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5556 * reflection.c (ensure_runtime_vtable): Work on generic instances and
5557 make sure all interfaces have MonoClass::interface_id set.
5559 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
5560 method table is property set.
5562 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5564 * class.c: New function mono_class_setup_interface_id that setup
5565 MonoClass::interface_id if needed.
5567 * class-internals.h: Export new function.
5569 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5571 * class.c: Add code to sanity check the vtable after setup_vtable_general
5574 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
5576 * icall.c: make Assembly.GetExecutingAssembly work properly when
5577 reflection is used to invoke the method.
5580 2008-12-11 Mark Probst <mark.probst@gmail.com>
5582 * metadata/generic-sharing.c: Look for constraints in all type
5583 arguments, not just the first one.
5585 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5587 * appdomain.c: return the correct CodeBase for an Assembly instance
5588 that was loaded from the shadow-copy directories.
5591 2008-12-10 Zoltan Varga <vargaz@gmail.com>
5593 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
5595 * sgen-gc.c (check_object): New debugging helper function.
5597 * object.c: Fix calls to mono_value_copy_array ().
5599 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5601 * class.c (mono_class_setup_fields): If working on an inflated class
5602 first check if the generic definition did init with success.
5606 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5608 pedump.c (main): Fix a warning.
5610 2008-12-10 Bill Holmes <billholmes54@gmail.com>
5612 * object-internals.h : Adding a definition for
5613 MonoReflectionComVisibleAttribute.
5615 * marshal.c (cominterop_com_visible) : Method added to check the
5616 ComVisible attribute of a class.
5618 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
5619 cominterop_raise_hr_exception added to consolidate common code
5620 to raise hr exceptions.
5622 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
5623 if a managed class should support IDispatch.
5626 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
5627 Added additional checks for managed object when getting
5628 an IDispatch interface.
5630 Code is contributed under MIT/X11 license.
5632 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5634 pedump.c (main): Handle mono_get_method () returning NULL.
5636 2008-12-09 Zoltan Varga <vargaz@gmail.com>
5638 * marshal.h: Fix a warning.
5640 2008-12-09 Bill Holmes <billholmes54@gmail.com>
5642 * marshal.c : Adding cominterop_release_all_rcws to release all
5643 runtime callable wrappers held by the runtime.
5645 * marshal.h : Adding declaration for cominterop_release_all_rcws.
5647 Code is contributed under MIT/X11 license.
5649 2008-12-09 Zoltan Varga <vargaz@gmail.com>
5651 * metadata.c (mono_image_alloc_lock): New helper function.
5652 (mono_image_alloc0_lock): Ditto.
5654 * metadata.c: Use the alloc_lock () helper functions for allocating
5655 memory from the image mempool.
5657 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5659 * class.c (mono_class_from_generic_parameter): Document it's
5660 locking behavior. Fix double checked locking here, we stored in
5661 param->pklass a partially initialized MonoClass and no membar was used.
5663 2008-12-05 Marek Habersack <mhabersack@novell.com>
5665 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
5666 (3) functions are present in the C library use them to do the
5667 job. If they are absent, make sure that the sum of int_part and
5668 dec_part is rounded before returning. This is necessary due to the
5669 division of dec_part by the power of 10 before the final addition
5670 is performed - if the result is not rounded in some cases it will
5671 yield invalid results.
5673 2008-12-04 Zoltan Varga <vargaz@gmail.com>
5675 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
5676 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
5677 instruction instead of a pointer constant.
5679 2008-12-03 Zoltan Varga <vargaz@gmail.com>
5681 * loader.c (mono_method_get_header): Do most of the work outside the
5682 loader lock, to avoid assembly load hook deadlocks.
5684 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
5685 (mono_metadata_parse_type_full): Ditto.
5687 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
5689 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
5690 Make the stack depth fixed. Ensure proper argument passing to the backtrace
5691 funtions. Finally, use a lock to produce well ordered output.
5693 The lock looks silly, as all calls to the corlib mempool should be guarded
5694 with the loader lock, but for some reason this fact doesn't help.
5696 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
5698 2008-12-02 Mark Probst <mark.probst@gmail.com>
5700 * socket-io.c: 64 bit big-endian fixes.
5702 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
5704 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
5705 targets that require strict compatibility between the types.
5707 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
5708 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
5709 Kill the strict argument and create a new one valuetype_must_be_boxed.
5711 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
5712 state that all valuetypes must be boxed.
5716 2008-11-29 Kornél Pál <kornelpal@gmail.com>
5718 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
5719 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
5721 Contributed under MIT/X11 license.
5723 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
5725 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
5726 the inflate_generic_type machinery should handle it.
5728 This avoids a crash when the field's flags is zero and it's type is
5730 What happens is that mono_metadata_parse_type_full will see that opt_attrs
5731 is zero and will return one of the cached built-in primitive types. Since
5732 those types live in read-only memory, the code that copies it crashes.
5734 2008-11-28 Mark Probst <mark.probst@gmail.com>
5736 * object.c: Don't put function descriptors into generalized IMT
5739 2008-11-28 Mark Probst <mark.probst@gmail.com>
5741 * class.c: Enable generic code sharing on PPC64.
5743 2008-11-27 Mark Probst <mark.probst@gmail.com>
5745 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
5748 * generic-sharing.c: Allocate the method template slists from the
5749 image mempool so it doesn't leak.
5751 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
5753 * class.c (generic_array_methods): Release the linked list.
5755 2008-11-27 Mark Probst <mark.probst@gmail.com>
5757 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
5758 invocation to g_utf16_to_utf8().
5760 2008-11-26 Mark Probst <mark.probst@gmail.com>
5762 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
5763 arguments on big endian archs.
5765 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5767 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
5768 the type name (test added in corlib).
5770 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5772 * pedump.c: initialize perf. counters. Fixes a segv.
5774 2008-11-25 Martin Baulig <martin@ximian.com>
5776 * mono-debug-debugger.c
5777 (mono_debugger_runtime_invoke): Return the exception object if an
5778 exception was thrown. Visual Studio displays the exception object
5779 in the locals window.
5781 2008-11-24 Mark Probst <mark.probst@gmail.com>
5783 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
5786 2008-11-24 Mark Probst <mark.probst@gmail.com>
5788 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
5789 MONO_TYPE_U are sizeof (gpointer), too.
5791 2008-11-24 Mark Probst <mark.probst@gmail.com>
5793 * marshal.c (mono_type_native_stack_size): Fixed size and
5794 alignment for reference types.
5796 2008-11-23 Mark Probst <mark.probst@gmail.com>
5798 * class.c (mono_class_generic_sharing_enabled): Disable generic
5799 code sharing for PPC64.
5801 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
5803 * icall.c (mono_method_get_equivalent_method): Make sure
5804 method->klass->methods is inited before looping over it.
5806 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
5808 * object.c: when calling ExecuteAssembly in a newly created domain,
5809 the configuration file and application base are already set up.
5810 Bug #446353 take 2 fixed.
5812 2008-11-20 Zoltan Varga <vargaz@gmail.com>
5814 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
5815 Fixes #444715. Fix a warning.
5817 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
5819 * appdomain.c: write the full path of the assembly to the .ini file
5820 created when "shadow-copying"
5823 2008-11-18 Zoltan Varga <vargaz@gmail.com>
5825 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
5826 if signature==FALSE.
5828 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5830 * marshal.h : Fix the cygwin build.
5831 marshal.c:12442: undefined reference to `_IID_IMarshal'
5833 Code is contributed under MIT/X11 license.
5835 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5837 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
5838 free threaded marshaler when QueryInterface is called on a COM callable
5839 wrapper requesting the IMarshal interface.
5841 Code is contributed under MIT/X11 license.
5843 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5845 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
5847 * reflection.c (mono_type_get_object): Special case the very common
5850 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
5853 2008-11-13 Bill Holmes <billholmes54@gmail.com>
5855 * process.h : Adding method declaration for
5856 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5858 * process.c : Adding implementation for
5859 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5861 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
5862 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5864 Code is contributed under MIT/X11 license.
5866 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
5868 * appdomain.c (unload_thread_main): Clean up threadpool by
5869 calling mono_thread_pool_remove_domain_jobs.
5871 * domain-internals.h (struct _MonoDomain): Add new fields to
5872 help coordinate the cleanup of the threadpool.
5874 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
5875 that cleans up the threadpool of all jobs associated with an appdomain.
5876 It does that by cleaning up the queues and making sure all active
5877 threads are accounted.
5879 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
5880 unloaded or in the process of. Take this is such way that there is
5881 no race condition between another thread starting the unload and the
5882 current thread acknowledging it.
5884 * threadpool.c (async_invoke_thread): Same.
5886 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
5887 firing the new thread.
5889 * threadpool.c (start_tpthread): Same.
5891 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
5893 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
5895 2008-11-06 Jonathan Chambers <joncham@gmail.com>
5897 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
5898 Add support for DuplicateHandle.
5900 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5901 Add support for DuplicateHandle.
5903 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5904 Add support for DuplicateHandle.
5906 Code is contributed under MIT/X11 license.
5908 2008-11-06 Mark Probst <mark.probst@gmail.com>
5910 * class-internals.h: Make min_align into a whole byte.
5912 * class.c: Set min_align for SIMD types to 16.
5914 2008-11-05 Geoff Norton <gnorton@novell.com>
5916 * attach.c: Default the attacher to enabled for all cases including
5919 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5921 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
5924 2008-11-04 Mark Probst <mark.probst@gmail.com>
5926 * monitor.c, monitor.h: New function for querying offsets of
5927 members of MonoThreadsSync.
5929 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5931 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
5932 to speed up this function and to avoid the boundless memory growth caused by
5933 the signature_dup () calls.
5935 2008-11-02 Zoltan Varga <vargaz@gmail.com>
5937 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
5940 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
5943 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
5945 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5948 * domain-internals.h: made mono_set_private_bin_path_from_config()
5950 * object.c: call the above function after setting the configuration
5951 file path for the root domain.
5954 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5956 * assembly.c: when the assembly is loaded from an absolute path, end
5957 basedir with a directory separator.
5960 2008-10-30 Mark Probst <mark.probst@gmail.com>
5962 * monitor.c (mono_monitor_get_fast_enter_method): If
5963 CompareExchange is not available, don't create the fastpath
5964 instead of asserting. (The method is missing in the 1.1 profile.)
5966 2008-10-30 Mark Probst <mark.probst@gmail.com>
5968 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
5970 * monitor.c, monitor.h: Code for generating Monitor.Enter and
5971 Monitor.Exit IL fastpaths.
5973 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5975 * class.c (mono_class_create_from_typedef): Added Vector2ul.
5977 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5979 * class.c (mono_class_create_from_typedef): Added Vector2l.
5981 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5983 * class.c (mono_class_create_from_typedef): Added Vector2d.
5985 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5987 * appdomain.c: translate \ into / for cache_path.
5988 * domain-internals.h: new mono_is_shadow_copy_enabled().
5989 * icall.c: (fill_reflection_assembly_name) do the same path
5990 manipulations that get_code_base does.
5991 (get_code_base) use mono_is_shadow_copy_enabled.
5993 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
5995 * appdomain.c: shadow-copied assemblies go to CachePath +
5996 ApplicationName when both are set. DynamicBase has nothing to do with
6000 2008-10-26 Zoltan Varga <vargaz@gmail.com>
6002 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
6003 STANDALONESIG table.
6005 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
6006 standalone signatures.
6008 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
6009 comparison code: instead of comparing the signatures using a custom
6010 equals function, transform them to a common signature and compare that. This
6011 works better with AOT.
6013 2008-10-25 Zoltan Varga <vargaz@gmail.com>
6015 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
6017 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
6018 call for generic instances.
6019 (mono_class_setup_properties): Call setup_properties () before accessing
6022 * class.c (mono_class_get_virtual_methods): New helper function to iterate
6023 over the virtual methods of a class using metadata if possible, avoiding the
6024 creation of MonoMethod's for non-virtual methods.
6026 * class.c (mono_class_setup_vtable_general): Rewrite this to use
6027 get_virtual_methods () to iterate over the virtual methods of classes.
6029 2008-10-25 Martin Baulig <martin@ximian.com>
6031 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
6033 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6035 * class.c (mono_class_create_from_typedef): Added Vector4i.
6037 2008-10-24 Mark Probst <mark.probst@gmail.com>
6039 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
6040 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
6041 special-casing applies to eliminate the call completely.
6043 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
6045 * class.c (mono_class_create_from_typedef): Added Vector8s.
6047 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
6049 * class.c (mono_class_create_from_typedef): Added Vector16sb.
6051 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6053 * icall.c: get rid of annoying warning.
6055 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6057 * threadpool.c: in 1.x, if you change the background status of the
6058 threadpool thread, it's not reset.
6059 Remove unnecessary calls to SetState.
6061 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6063 * threadpool.c: asynchronously create a set of idle threads upon first
6064 use of the threadpool. SetMinThreads will now start the appropriate
6065 number of idle threads if they are not already running. The default is
6066 1 threadpool thread per CPU. Increased the maximum number of threads
6069 2008-10-22 Martin Baulig <martin@ximian.com>
6071 Revert r116521 from Zoltan, it breaks the debugger:
6073 * class.c (mono_class_get_virtual_methods): New helper function to iterate
6074 over the virtual methods of a class using metadata if possible, avoiding the
6075 creation of MonoMethod's for non-virtual methods.
6077 * class.c (mono_class_setup_vtable_general): Rewrite this to use
6078 get_virtual_methods () to iterate over the virtual methods of classes.
6080 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6082 * threads.c: when creating a threadpool thread, set its state to
6084 * threadpool.c: reset the background state of a threadpool thread
6085 after finishing each work item
6088 2008-10-22 Zoltan Varga <vargaz@gmail.com>
6090 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
6092 * class.c (mono_class_setup_vtable_general): Add an optimized version for
6093 generic instances which works by inflating the methods in the container
6096 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
6097 variant which doesn't make a copy if no inflation was done.
6098 (mono_class_setup_fields): Use it.
6100 * metadata.c (mono_metadata_get_shared_type): New helper function to
6101 return a shared instance of a given MonoType.
6103 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
6104 a copy of most non-generic types.
6106 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6108 * threadpool.c: remove one more GetSystemInfo () call.
6110 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
6112 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
6113 use the code in mono-proclib.h to get processor information.
6115 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6117 * appdomain.c: fixed the logic that determines whether assemblies in a
6118 directory are "shadow-copied" or not. Bug #433483 fixed.
6120 2008-10-22 Zoltan Varga <vargaz@gmail.com>
6122 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
6125 2008-10-21 Zoltan Varga <vargaz@gmail.com>
6127 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
6130 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
6131 reflection.c: Use mono_field_get_name () for accessing a field's name.
6133 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
6136 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
6139 * loader.c (find_method_in_class): Reenable the metadata optimization by
6140 not using it for generic instances.
6142 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
6143 data/def_type fields from MonoClassField into a separate structure.
6144 (struct MonoClassField): Remove data/def_type fields.
6145 (struct _MonoClass): Add a 'field_def_values' array to store the default
6146 values/RVA for fields.
6148 * class.c reflection.c: Update after the changes.
6150 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
6151 for accessing field->data.
6153 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
6155 * loader.c (find_method_in_class): Revert the last change for now as
6156 it breaks Mono.C5 unit tests.
6158 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
6159 'field_generic_types' and 'field_objects' which contain the information
6160 previously stored in MonoInflatedField.
6161 (MonoInflatedField): Delete.
6162 (struct _MonoClassField): Delete 'generic_info' field.
6164 * reflection.c: Store the information which was previously in
6165 field->generic_info in MonoDynamicGenericClass instead.
6167 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
6168 MonoClassField changes.
6170 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
6172 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
6173 store the value inside the data array of the MonoMethodWrapper.
6174 This saves memory, is faster and fixes the lifetime issues (methods
6175 were never removed from the hash previously). May also fix bug#436996.
6177 2008-10-21 Zoltan Varga <vargaz@gmail.com>
6179 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
6180 generic instances, compute the type from the generic definition instead of
6181 looking in field->generic_info.
6183 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
6184 for inflated fields, the only user was get_fieldref_token () which no
6187 * class.c (mono_class_init): Revert the last change as it seems to cause
6190 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
6191 bytes on 64 bit platforms.
6193 * object.c (mono_class_create_runtime_vtable): Fix a warning.
6195 * object.c (mono_class_create_runtime_vtable): Don't initalize
6196 field->data/field->def_type here, it is done lazily by
6197 mono_class_get_field_default_value ().
6199 * icall.c (ves_icall_get_enum_info): Call
6200 mono_class_get_field_default_value () instead of directly accessing
6201 field->data and field->def_type.
6203 * object.c (get_default_field_value): Ditto.
6205 * class.c (mono_field_get_data): Ditto.
6207 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
6208 call for generic instances.
6210 * loader.c (find_method_in_class): If klass != from_class, then inflate
6211 the method with the context of from_class, since the caller assumes this.
6213 2008-10-20 Zoltan Varga <vargaz@gmail.com>
6215 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
6216 for accessing method->slot.
6218 2008-10-20 Cedric Vivier <cedricv@neonux.com>
6220 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
6222 2008-10-19 Zoltan Varga <vargaz@gmail.com>
6224 * class.c (mono_method_get_vtable_index): Use
6225 mono_method_get_vtable_slot () for accessing method->slot.
6227 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
6228 accessing klass->methods.
6230 * class.c (mono_method_get_vtable_slot): New helper function.
6231 (mono_class_get_vtable_entry): Ditto.
6232 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
6233 accessing method->slot.
6235 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
6236 method to get_inflated_method ().
6238 * class.c (mono_class_get_inflated_method): New helper method to obtain
6239 a method of an inflated class without calling setup_methods ().
6240 (mono_class_get_cctor): Use get_inflated_method.
6242 * generic-sharing.c (mono_class_get_method_generic): Ditto.
6244 * marshal.c image.c: Lazily create all the marshal caches.
6246 * image.c (mono_image_init): Move initialization of runtime_invoke
6247 caches to marshal.c.
6249 * marshal.c (get_cache): New helper function to lazily initialize a
6251 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
6253 * debug-helpers.c (mono_method_full_name): Include generic arguments.
6255 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
6257 * loader.c: fixed check for interface type.
6259 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6261 * appdomain.c: check for NULL setup before it's referenced.
6264 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6266 * class.c: remove the unused old vtable setup code.
6268 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6270 * class.c: don't depend on interface order in
6271 setup_interface_offsets (bug #435777).
6272 * reflection.c: sort the InterfaceImpl table (patch from
6273 Jb Evain <jbevain@novell.com>).
6275 2008-10-13 Zoltan Varga <vargaz@gmail.com>
6277 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
6278 the low level assemblies lock.
6280 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
6282 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
6283 object.c, reflection.c, socket-io.c, threads.c: introduced
6284 mono_framework_version () to return the major framewrok version,
6285 changed the code that was using more complex patterns to use it.
6286 Return the correct value for PlatformID for OSX.
6288 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
6290 * icall-def.h, process.h, process.c: added an icall to get info about
6291 processes using mono-proclib.
6293 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
6295 * mono-perfcounters.c: use the mono-proclib functions to
6296 access process information.
6298 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6300 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
6301 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
6302 reflection.c: remove rawbuffer usage: mmap support is more sanely
6303 provided by utils/mono-mmap.
6305 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
6307 * gc.c: use posix semaphores when possible so that
6308 mono_gc_finalize_notify() is signal safe.
6310 2008-10-11 Zoltan Varga <vargaz@gmail.com>
6312 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
6313 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
6314 be #ifdef-ed out, the linker will remove the rest.
6316 * marshal.c: Implement DISABLE_COM.
6318 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
6320 2008-10-11 Miguel de Icaza <miguel@novell.com>
6322 * locales.c (string_invariant_compare_char): Optimization: do not
6323 call g_unichar_type unless we actually need the information.
6325 2008-10-10 Mark Probst <mark.probst@gmail.com>
6327 * object.c, class-internals.h: Also create remoting trampolines
6328 for generic methods. Pass the domain to the remoting trampoline
6329 creation function, too.
6331 2008-10-10 Zoltan Varga <vargaz@gmail.com>
6333 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
6335 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6337 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
6340 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
6343 * locales.c: remove the use of g_strdown. Fixes bug #322313.
6345 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
6347 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
6348 for the least possible amount of time (extending the fix in r113458).
6350 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6352 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
6354 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6356 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
6357 as possible simd intrinsic types.
6358 Optimized the test to check for the common prefix first.
6360 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
6362 * class.c: back out part of a broken optimization committed on
6363 May 23th (bug #433908).
6365 2008-10-09 Mark Probst <mark.probst@gmail.com>
6367 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
6368 Win32. Should fix #432388 for most cases until we have the new
6371 2008-10-08 Zoltan Varga <vargaz@gmail.com>
6373 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
6374 instead of using inst->id so the hash is stable for AOT.
6376 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6379 * icall.c: create a .ini file for shadow-copied assemblies that
6380 contains the location of the original assembly. Use this to return the
6381 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
6382 Also fix the number of '/' for windows when returning the CodeBase.
6385 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6387 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
6389 Code is contributed under MIT/X11 license.
6391 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6393 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
6394 if if the class vtable needs initialized.
6396 Code is contributed under MIT/X11 license.
6398 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6400 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
6401 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
6402 STRING->BSTR, and CLASS->INTERFACE.
6404 Code is contributed under MIT/X11 license.
6406 2008-10-07 Marek Habersack <mhabersack@novell.com>
6408 * sysmath.h: changed the declaration of the
6409 ves_icall_System_Math_Round2 icall by adding an extra
6410 away_from_zero parameter.
6412 * sysmath.c (ves_icall_System_Math_Round2): added support for
6413 away from zero rounding. The icall now takes an extra boolean
6414 parameter to signal that away from zero operation is requested.
6416 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6418 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
6419 the delegate klass so it can work with full-aot.
6420 (mono_marshal_get_delegate_end_invoke): Ditto.
6421 (mono_marshal_get_delegate_invoke): Ditto.
6423 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
6425 * gc.c, attach.h, attach.c: remove a bad pattern:
6426 add_finalizer_callback () is not implemented correctly, it can't
6427 without adding more overhead to the finalizer loop and it's not
6428 even needed, since we know exactly what we need to call, so there is
6429 no need to do so through an expensive function pointer.
6431 2008-10-04 Zoltan Varga <vargaz@gmail.com>
6433 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
6435 * attach.c (mono_attach_init): Remove the #ifdef.
6437 2008-10-04 Andreas Färber <andreas.faerber@web.de>
6439 * attach.c (mono_attach_init): Don't use
6440 mono_gc_add_finalizer_thread_callback when compiling without GC.
6443 Code is contributed under MIT/X11 license.
6445 2008-10-03 Zoltan Varga <vargaz@gmail.com>
6447 * class.c (mono_class_create_from_typedef): Remove the
6448 #ifndef DISABLE_SIMD stuff.
6450 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
6452 * class-internals.h (MonoClass): Added simd_type bit field.
6454 * class.c (mono_class_create_from_typedef): Check if type is a simd
6457 2008-10-03 Mark Probst <mark.probst@gmail.com>
6459 * object.c (mono_method_add_generic_virtual_invocation): Only add
6460 instantiations to the thunk whose count is at least as large as
6463 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
6465 * icall.c: changed the Type of the exception thrown when trying to
6466 invoke a constructor on an abstract class. Part of the fix for bug
6469 2008-10-02 Mark Probst <mark.probst@gmail.com>
6471 * class.c, class-internals.h (mono_method_get_vtable_index): New
6472 function which returns the index into the vtable and properly
6473 handles inflated virtual generic methods.
6475 2008-10-01 Mark Probst <mark.probst@gmail.com>
6477 * object.c, domain.c, object-internals.h, domain-internals.h:
6478 Generalize IMT thunk machinery to also handle thunks for virtual
6479 generic method invokes. When a virtual generic method is invoked
6480 more than a number of times we insert it into the thunk so that it
6481 can be called without lookup in unmanaged code.
6483 * generic-sharing.c, class-internals.h: Fetching a
6484 MonoGenericInst* for a method from an (M)RGCTX.
6486 2008-10-01 Zoltan Varga <vargaz@gmail.com>
6488 * marshal.c (emit_marshal_string): Applied a variant of a patch by
6489 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
6490 marshalling. Fixes #431304.
6492 2008-10-01 Bill Holmes <billholmes54@gmail.com>
6494 * marshal.c (emit_marshal_variant) : Change the attribute checks to
6495 handle when ref is specified without In or Out.
6497 Code is contributed under MIT/X11 license.
6499 2008-09-30 Mark Probst <mark.probst@gmail.com>
6501 * loader.c (mono_get_method_constrained): Don't expand method with
6502 the class's context, because it's already a method of that class.
6504 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
6506 * attach.c : should be correct build fix.
6508 2008-09-29 Zoltan Varga <vargaz@gmail.com>
6510 * attach.c: Fix the previous change.
6512 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
6514 * attach.c : quick w32 build fix.
6516 2008-09-27 Miguel de Icaza <miguel@novell.com>
6518 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
6519 crashes MonoDevelop: #430455.
6521 2008-09-27 Zoltan Varga <vargaz@gmail.com>
6523 * domain-internals.h (struct _MonoDomain): Move most fields used only by
6524 the JIT do MonoJitDomainInfo in ../mini/mini.h.
6526 * domain.c: Remove initialization/cleanup of the removed fields.
6528 2008-09-27 Mark Probst <mark.probst@gmail.com>
6530 * class.c (mono_class_generic_sharing_enabled): Enable generic
6531 code sharing for PPC.
6533 2008-09-26 Bill Holmes <billholmes54@gmail.com>
6535 * attach.c : Fixing the Windows builds.
6537 Code is contributed under MIT/X11 license.
6539 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6541 * class.c (mono_class_generic_sharing_enabled): Experimentally change
6542 the default generic sharing mode to 'all'.
6544 2008-09-25 Mark Probst <mark.probst@gmail.com>
6546 * generic-sharing.c, class-internals.h: New function for checking
6547 whether a method needs a static RGCTX invoke wrapper. A few
6548 funtions moved from mini/generic-sharing.c.
6550 * icall.c: New function used.
6552 2008-09-25 Mark Probst <mark.probst@gmail.com>
6554 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
6555 Static RGCTX invoke wrapping applies to value type methods, too.
6557 * class.c (mono_class_setup_vtable_general): In generic-shared
6558 value types, wrap methods with a static RGCTX invoke wrapper.
6560 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6562 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
6565 2008-09-24 Zoltan Varga <vargaz@gmail.com>
6567 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
6568 register a callback which is called when the finalizer thread is woken
6570 (finalizer_thread): Call the callback if it exists.
6572 * attach.h attach.c: New files, implementing the attach mechanism.
6574 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
6576 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
6577 by the previous change.
6579 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
6581 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
6582 loader.c, marshal.c, metadata-internals.h, metadata.c,
6583 method-builder.c, object.c, reflection.c: introduced specific functions
6584 to allocate from the domain and image mempools and cleaned up most of
6585 the code to use them (still missing a few in reflection.c).
6586 Keep the loader bytes counter updated.
6588 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
6590 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
6591 loader-related counters.
6593 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
6595 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
6596 added more MS-compatible counters.
6598 2008-09-22 Zoltan Varga <vargaz@gmail.com>
6600 * class.c (mono_class_setup_fields): Call setup_fields before accessing
6601 class->blittable. Fixes #428217.
6603 2008-09-21 Zoltan Varga <vargaz@gmail.com>
6605 * reflection.c (mono_image_get_field_on_inst_token): Call
6606 field_encode_signature () since that handles custom modifiers too.
6609 2008-09-20 Zoltan Varga <vargaz@gmail.com>
6611 * reflection.c (add_custom_modifiers): New helper function to merge custom
6612 modifiers stored in objects to a MonoType.
6613 (fieldref_encode_signature): Encode custom modifiers.
6614 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
6615 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
6617 2008-09-19 Kornél Pál <kornelpal@gmail.com>
6619 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
6620 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
6621 64-bit IL only images because imports are not resolved for IL only images.
6622 Special thanks to Bill Holmes for finding this bug and testing the patch.
6623 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
6625 Contributed under MIT/X11 license.
6627 2008-09-19 Miguel de Icaza <miguel@novell.com>
6629 * mono-config.c (dllmap_start): Add support for the bits keyword
6630 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
6632 2008-09-19 Mark Probst <mark.probst@gmail.com>
6634 * reflection.c (inflate_mono_method): When the class the method is
6635 to be inflated for is itself not inflated, just return the method.
6637 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
6639 * mono-perfcounters.c: use more user friendly process instance names.
6641 2008-09-18 Bill Holmes <billholmes54@gmail.com>
6643 * marshal.c (emit_marshal_variant) : Change the attribute checks to
6644 handle "[in] ref" and "[in][out] ref" cases.
6646 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
6647 to mono_mb_create_method. This was causing problems calling native to
6648 managed passing Variants by value.
6650 Code is contributed under MIT/X11 license.
6652 2008-09-18 Zoltan Varga <vargaz@gmail.com>
6654 * class.c (can_access_internals): Call mono_assembly_load_friends ()
6655 before accessing the friend_assembly_names field.
6657 * assembly.c (mono_assembly_load_friends): Make this callable multiple
6659 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
6660 called lazily when it is needed.
6662 * metadata-internals.h (struct _MonoAssembly): Add
6663 'friend_assembly_names_inited' flag.
6665 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
6667 * mono-perfcounters-def.h: fix the types of a few counters.
6668 * mono-perfcounters.c: implemented the instance names getter
6671 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
6673 * culture-info-table.h : regenerated.
6675 2008-09-17 Robert Jordan <robertj@gmx.net>
6677 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
6678 context bound objects. Fixes #415577.
6680 Code is contributed under MIT/X11 license.
6682 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
6684 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
6685 implementation (bug #423582).
6687 2008-09-16 Zoltan Varga <vargaz@gmail.com>
6689 * object.c (mono_object_get_virtual_method): Handle the case method->slot
6690 is not set. Fixes #426309.
6692 2008-09-16 Jb Evain <jbevain@novell.com>
6694 * class.c (mono_class_from_name): fix the exported type look up
6695 when the type is defined in a referenced assembly.
6697 2008-09-16 Jb Evain <jbevain@novell.com>
6699 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
6700 increment the next index counter on each iteration to make that work
6701 for more than one type forwarder. Unmanaged part to fix #422929.
6703 2008-09-15 Mark Probst <mark.probst@gmail.com>
6705 * object-internals.h: enum ComInterfaceType in
6706 MonoInterfaceTypeAttribute is guint32, not guint16.
6708 2008-09-12 Mark Probst <mark.probst@gmail.com>
6710 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
6713 2008-09-11 Mark Probst <mark.probst@gmail.com>
6715 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
6718 2008-09-11 Mark Probst <mark.probst@gmail.com>
6720 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
6721 Endianness fixes for MonoSymbolFileOffsetTable.
6723 2008-09-10 Bill Holmes <billholmes54@gmail.com>
6725 * process.c (complete_path) : Removing quotes from the
6726 input path. The glib file routines do not handle file paths
6727 that have quotes around them.
6729 Code is contributed under MIT/X11 license.
6731 2008-09-10 Bill Holmes <billholmes54@gmail.com>
6733 * socket-io.h : Adding a comment to provide locations where
6734 changes to MonoSocketAsyncResult need to be synced.
6736 Code is contributed under MIT/X11 license.
6738 2008-09-10 Zoltan Varga <vargaz@gmail.com>
6740 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
6741 parameters as well. Fixes #425001.
6743 2008-09-08 Miguel de Icaza <miguel@novell.com>
6745 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
6748 2008-09-07 Miguel de Icaza <miguel@novell.com>
6750 * console-io.c: Add support for tracking the window size if it
6753 The setup is very simple: the TtySetup function will now return a
6754 pointer to a location in memory that tracks the current console
6755 size. The managed code checks its current value every time its
6756 queried against the last value set, and updates accordingly.
6758 With this setup we can work with multiple consoles, and we do not
6759 require to poke into managed code from a signal handler.
6761 Additionally, the environment for COLUMNS and LINES is now handled
6764 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
6766 2008-09-07 Mark Probst <mark.probst@gmail.com>
6768 * marshal.c (mono_type_native_stack_size): Treat
6769 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
6771 2008-09-04 Jb Evain <jbevain@novell.com>
6773 * class.c (mono_class_is_assignable_from): fix assignability of nullables
6776 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
6778 * verify.c (verify_type_compatibility_full): Revert change
6779 to allow converting a native int to unmanaged pointer be verifiable
6780 under non-strict mode.
6781 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
6783 * verify.c: Added some TODOs.
6785 2008-09-02 Bill Holmes <billholmes54@gmail.com>
6787 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
6788 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
6789 Changed to use GlobalAlloc for the memory returned on Windows platforms.
6791 Code is contributed under MIT/X11 license.
6793 2008-09-02 Jb Evain <jbevain@novell.com>
6795 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
6797 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
6799 reflection.c (typebuilder_setup_fields): Handle classes with
6802 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
6804 class.c (mono_class_setup_events): Add memory barrier due to
6805 double checked locking.
6807 class.c (mono_class_setup_properties): Same.
6809 2008-08-31 Zoltan Varga <vargaz@gmail.com>
6811 * class.c (mono_class_is_assignable_from): Fix the build.
6813 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
6814 before accessing klass->interface_bitmap. Fixes #421744.
6816 2008-08-28 Zoltan Varga <vargaz@gmail.com>
6818 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
6819 the runtime into no-exec mode, useful when running the AOT compiler.
6821 * appdomain.c gc.c object.c: Avoid executing managed code when running
6824 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
6826 * reflection.c (_mono_reflection_get_type_from_info): Handle the
6827 special case when the mono_assembly_loaded () returns NULL because the
6828 search hook is not installed.
6830 2008-08-25 Zoltan Varga <vargaz@gmail.com>
6832 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
6833 crashes in bstr marshalling on linux.
6835 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6837 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
6838 with more than one parameter.
6840 2008-08-24 Miguel de Icaza <miguel@novell.com>
6842 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
6843 start/stop flow control as well when turning off ICANON (allows
6844 C-s and C-q to be read by Console.ReadKey).
6846 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6848 * class.c (mono_class_init): Move the initialization of nested classes
6849 into mono_class_get_nested_types (). Fixes #418433.
6851 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
6854 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
6855 iterating tough the nested classes of a class.
6857 2008-08-23 Zoltan Varga <vargaz@gmail.com>
6859 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
6862 2008-08-22 Miguel de Icaza <miguel@novell.com>
6864 * console-io.c (sigcont_handler): Support signal chaining for
6867 (console_set_signal_handlers): Use best practices with sigaction,
6868 clear the structure before using it.
6870 2008-08-22 Robert Jordan <robertj@gmx.net>
6872 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
6873 Fix the Windows build.
6875 2008-08-22 Zoltan Varga <vargaz@gmail.com>
6877 * class.c (mono_class_generic_sharing_enabled): Make the default
6878 sharing mode 'corlib'.
6880 2008-08-21 Zoltan Varga <vargaz@gmail.com>
6882 * console-io.c (console_set_signal_handlers): Fix a warning.
6884 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
6885 method normally, the JIT will take care of avoiding recursion.
6887 2008-08-20 Bill Holmes <billholmes54@gmail.com>
6889 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
6891 Code is contributed under MIT/X11 license.
6893 2008-08-20 Miguel de Icaza <miguel@novell.com>
6895 * console-io.c (sigcont_handler): We need to restore the entire
6896 termios state, not only the original settings, as things like echo
6897 can be controlled after this (Booish exposes this issue with its
6898 own ReadLine implementation).
6900 Additionally, we need to set the terminal back into keypad_xmit
6903 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
6904 string as a paramter as well. Otherwise we get different
6907 2008-08-20 Zoltan Varga <vargaz@gmail.com>
6909 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
6910 delegates with byref out parameter passing. Fixes #351520.
6912 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
6914 (mono_type_get_desc): Add the type arguments for GENERICINST.
6915 (mono_method_full_name): Stringify the class name using mono_type_full_name
6916 so it picks up generic arguments.
6918 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
6920 * console-io.c: Removed debug output.
6922 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
6924 reflection.c (mono_reflection_create_runtime_class): Alloc
6925 the nested classes linked list using the dynamic image mempool.
6926 Fixes leak in corlib compilation.
6928 2008-08-19 Miguel de Icaza <miguel@novell.com>
6930 * console-io.c: Fix incredibly annoying behavior on the console
6931 after resuming execution after control-z. This affected every
6932 console application.
6934 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
6936 * mempool-internals.h: Header for mono private mempool functions. The first
6937 two function are for allocating glib linked lists using pools.
6939 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
6941 * Makefile.am: Added mempool-internals.h.
6943 2008-08-16 Zoltan Varga <vargaz@gmail.com>
6945 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
6946 (mono_domain_free): Ditto.
6948 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
6949 be used by the JIT to store its domain-specific information, instead of putting
6950 it directly into MonoDomain.
6952 * domain.c (mono_install_create_domain_hook): New helper function to install
6953 a hook which initializes domain->runtime_info.
6955 * domain.c (mono_install_free_domain_hook): Ditto.
6957 2008-08-15 Zoltan Varga <vargaz@gmail.com>
6959 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
6960 asserting if the ares parameter is null.
6962 * mono-perfcounters.c: Fix warnings.
6964 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
6965 is not needed, don't check for interruptions either.
6966 (mono_marshal_get_delegate_end_invoke): Ditto.
6968 2008-08-15 Marek Habersack <mhabersack@novell.com>
6970 * mono-perfcounters.c (predef_readonly_counter): added support for
6971 reading the ASP.NET Requests Queued counter from another process.
6973 2008-08-12 Zoltan Varga <vargaz@gmail.com>
6975 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
6976 MonoImage to simplify the AOT code.
6978 2008-08-10 Zoltan Varga <vargaz@gmail.com>
6980 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
6981 marshalling. Fixes #416078.
6983 2008-08-08 Zoltan Varga <vargaz@gmail.com>
6985 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
6986 it is set, looking up the icall address is deferred to the JIT, since
6987 in embedded scenarios, the icall might not be registered in the runtime
6988 doing the AOT compilation. Backported from the 2.0 branch.
6990 2008-08-08 Zoltan Varga <vargaz@gmail.com>
6992 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
6995 2008-08-05 Marek Habersack <mhabersack@novell.com>
6997 * Makefile.am: added support for cross-compilation.
6999 2008-08-04 Zoltan Varga <vargaz@gmail.com>
7001 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
7003 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
7005 * mono-perfcounters.c: jitted methods and jitted bytes counters.
7007 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
7009 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
7010 mono-perfcounters.c: performance counters implementation.
7012 2008-07-31 Zoltan Varga <vargaz@gmail.com>
7014 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
7015 to gpointer, letting the AOT code decide what to store in it.
7017 2008-07-31 Bill Holmes <billholmes54@gmail.com>
7019 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
7020 mono_class_setup_methods if the methods are not initialized.
7022 Code is contributed under MIT/X11 license.
7024 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
7026 * verify.c: Remove some debug code I commited by accident.
7028 * verify.c (mono_method_is_valid_in_context): Change the return value
7029 to make possible to distinguish between invalid and unverifiable.
7031 * verify.c (verifier_load_method): Don't return NULL for unverifiable
7034 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
7036 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
7037 constraints. Fixes regression in gtest-253.
7039 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
7041 * verify.c (mono_verifier_verify_class): Don't allow generic types
7042 with explicit layout.
7044 * verify.c (mono_method_verify): Check locals and argument types.
7046 2008-07-29 Zoltan Varga <vargaz@gmail.com>
7048 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
7049 wait if the thread is in StopRequested state.
7051 * class.c (mono_class_from_name): Refactor the module searching code into
7052 a separate function so it can be reused in the AOT case too.
7054 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
7056 * verify.c (mono_type_is_valid_in_context): Improve the error message.
7057 Check both the type and it's generic type definition for loader errors.
7059 * verify.c (mono_method_is_valid_in_context): Don't generate another
7060 error when a type errors occur, this leads to the wrong exception been
7063 2008-07-28 Dick Porter <dick@ximian.com>
7067 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
7068 New internal calls to duplicate and close a process handle.
7070 2008-07-27 Andreas Färber <andreas.faerber@web.de>
7072 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
7074 2008-07-27 Zoltan Varga <vargaz@gmail.com>
7076 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
7078 2008-07-27 Robert Jordan <robertj@gmx.net>
7080 * class.c (mono_class_init): Don't compute class.has_finalize for
7081 valuetypes. Fixes #412477.
7083 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
7085 * verify.c: Implement constraint equivalence checking.
7086 This is required when a generic parameter is used as
7087 argument to a constrained one.
7091 2008-07-24 Zoltan Varga <vargaz@gmail.com>
7093 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7095 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
7097 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
7098 synch with managed object layout.
7100 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
7102 * verify.c (do_branch_op): Handle valuetypes and generic
7105 * verify.c (do_cmp_op): Same.
7109 2008-07-24 Mark Probst <mark.probst@gmail.com>
7111 * generic-sharing.c: Fix memory leaks.
7113 * class.c, class-internals.h: Make
7114 mono_class_inflate_generic_type_with_mempool() non-static.
7116 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
7118 * pedump.c (dump_verify_info): Dump full class name.
7120 2008-07-24 Mark Probst <mark.probst@gmail.com>
7122 * generic-sharing.c: Removed some old code that didn't do anything.
7124 2008-07-24 Massimiliano Mantione <massi@ximian.com>
7125 * profiler.c: Added runtime_initialized_event,
7126 mono_profiler_install_runtime_initialized and
7127 mono_profiler_runtime_initialized. This new hook tells the profiler
7128 when the runtime is sufficiently initialized to be able to call
7129 mono_thread_attach on the root appdomain.
7130 * profiler.h, profiler-private.h: Likewise.
7132 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
7134 * verify.c (do_cast): Do boxing for generic arguments as well.
7136 * class.c (is_nesting_type): Drop generic instantiations before
7137 checking for nesting.
7139 * class.c (can_access_instantiation): Allow access to generic
7142 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
7144 * verify.c (verify_class_for_overlapping_reference_fields):
7145 On some cases, the field size might be zero, guard against that.
7146 Fix the explicit layout check to work as expected.
7148 2008-07-23 Zoltan Varga <vargaz@gmail.com>
7150 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
7151 mono_thread_resume () during shutdown, since the thread we want to abort
7154 2008-07-22 Zoltan Varga <vargaz@gmail.com>
7156 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
7159 * debug-mono-symfile.c: Fix a warning.
7161 * mono-perfcounters.c (get_cpu_times): Fix a warning.
7163 * object.c (mono_class_vtable): Check if exception_type is set, and return
7164 NULL as defined by the function comments.
7166 2008-07-22 Mark Probst <mark.probst@gmail.com>
7168 * mempool.c: Use malloc for every single mempool allocation if the
7169 configure option is set. This makes it easier to track mempool
7170 allocations with tools like Valgrind.
7172 2008-07-22 Jb Evain <jbevain@novell.com>
7174 * reflection.c (create_dynamic_mono_image): emit the same
7175 metadata version that SL2 does when creating a SL2 image.
7177 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
7180 * icall.c: New icall System.Enum:get_hashcode. This function
7181 avoids the overhead of boxing the enum to the underlying type.
7183 2008-07-21 Mark Probst <mark.probst@gmail.com>
7185 * reflection.c (mono_method_get_object): Don't let static RGCTX
7186 invoke wrappers get into MonoReflectionMethods.
7188 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
7190 * object-internals.h:
7191 * object.c: New mono_runtime_class_init_full function
7192 that makes throwing the exception optinal.
7194 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
7195 for the case where the exception object is supplied.
7197 2008-07-16 Kornél Pál <kornelpal@gmail.com>
7199 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
7202 Contributed under MIT/X11 license.
7204 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
7206 * string-icalls.c (ves_icall_System_String_InternalSplit):
7207 Optimize array allocation by caching the MonoClass of the
7210 * icall.c (ves_icall_Type_GetMethodsByName): Same.
7212 * reflection.c (mono_param_get_objects): Same.
7214 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
7217 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
7218 It inflates the given type using the class context.
7220 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
7222 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
7223 the vtable if it already exists.
7225 * object-internals.h: Add mono_class_try_get_vtable as part of the
7228 * reflection.c (mono_type_get_object): Use the MonoObject from the
7229 vtable when possible. Reduces locking contention on reflection heavy
7232 2008-07-15 Zoltan Varga <vargaz@gmail.com>
7234 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
7235 g_bit_nth_msf () since that macro is not implemented in eglib.
7237 2008-07-13 Zoltan Varga <vargaz@gmail.com>
7239 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
7240 on platforms which do not support it.
7242 2008-07-12 Zoltan Varga <vargaz@gmail.com>
7244 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
7246 2008-07-11 Martin Baulig <martin@ximian.com>
7248 * mono-debug-debugger.h
7249 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
7251 * mono-debug-debugger.c
7252 (_mono_debugger_interruption_request): New global volatile variable.
7253 (mono_debugger_check_interruption): New public function.
7256 (mono_thread_current_check_pending_interrupt): Call
7257 mono_debugger_check_interruption().
7258 (mono_thread_interruption_checkpoint_request): Likewise.
7260 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7262 * verify.c: Add more type checks for loaded types. Verify the result
7263 handle from ldtoken.
7265 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7267 * loader.c (field_from_memberref): Don't crash if the field
7270 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7272 * verify.c: Verify if type and method instantiations
7273 don't have invalid VAR or MVAR arguments.
7275 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7277 * verify.c: Fix double free of function pointer list.
7279 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7281 * object.c (mono_string_to_utf8): Comment the new code as it
7284 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
7286 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
7288 2008-07-07 Bill Holmes <billholmes54@gmail.com>
7290 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
7291 is not throw too many times.
7293 Code is contributed under MIT/X11 license.
7295 2008-07-07 Zoltan Varga <vargaz@gmail.com>
7297 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
7298 debugging is turned off.
7300 2008-07-06 Zoltan Varga <vargaz@gmail.com>
7302 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
7304 2008-07-04 Mark Probst <mark.probst@gmail.com>
7306 * class-internals.h, class.c: Added new generic sharing option:
7307 Share only stuff in System.Collections.Generic, which is now the
7310 2008-07-04 Mark Probst <mark.probst@gmail.com>
7312 * generic-sharing.c, class-internals.h: New function for getting a
7313 generic method in a generic class given the corresponding method
7314 for a different instantiation of the class. Partly refactored
7315 from mini-trampolines.c.
7317 * class.c: Make sure generic methods have a class_inst if they are
7318 part of a generic class.
7320 * metadata.c (mono_type_stack_size_internal): Handle type
7323 2008-07-04 Mark Probst <mark.probst@gmail.com>
7325 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
7326 Signifies whether information on the this/vtable/mrgctx variable
7329 2008-07-04 Mark Probst <mark.probst@gmail.com>
7331 * object.c, object-internals.h, icall.c: New function
7332 mono_delegate_ctor_with_method(), which does the same as
7333 mono_delegate_ctor(), but takes an explicit method argument
7334 instead of taking the method from the jit info.
7336 * marshal.c: When creating a delegate with an inflated method take
7337 the "this" argument as the target class for the castclass.
7339 2008-07-03 Mark Probst <mark.probst@gmail.com>
7341 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
7342 mono_jit_info_table_find() to perform very badly in some cases.
7344 2008-07-02 Zoltan Varga <vargaz@gmail.com>
7346 * icall.c (type_from_typename): Handle 'string'.
7348 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
7349 wrappers into the wrapper_hash, since the key is not a MonoMethod.
7351 2008-07-01 Zoltan Varga <vargaz@gmail.com>
7353 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
7355 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
7356 number of available managed allocator types.
7358 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
7359 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
7361 2008-06-30 Zoltan Varga <vargaz@gmail.com>
7363 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
7364 which is a low level lock protecting just the 'jit_code_hash' hash table.
7366 * domain.c: Initialize+cleanup jit_code_hash_lock.
7368 2008-06-30 Kornél Pál <kornelpal@gmail.com>
7370 * coree.c (mono_load_coree): Set coree_module_handle global variable only
7371 after initialization.
7373 * coree.h: Make MonoFixupExe internal.
7375 Contributed under MIT/X11 license.
7377 2008-06-30 Kornél Pál <kornelpal@gmail.com>
7379 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
7380 because that is platform independent. Check NumberOfRvaAndSizes in PE32
7382 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
7383 image being loaded is a CLI image and _CorValidateImage gets called.
7385 * coree.h: Add MonoLoadImage.
7387 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
7388 instead of LoadLibrary.
7390 Contributed under MIT/X11 license.
7392 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
7394 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
7395 for any primitive type.
7397 2008-06-29 Zoltan Varga <vargaz@gmail.com>
7399 * object.c (mono_array_new_specific): Optimize this and the other allocation
7402 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
7403 domains too if mono_dont_free_domains is set.
7405 * domain-internals.h (mono_dont_free_domains): New internal option controlling
7406 whenever to free appdomain data after it has been unloaded.
7408 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
7410 2008-06-28 Zoltan Varga <vargaz@gmail.com>
7412 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
7413 (mono_method_get_equivalent_method): Fix a warning.
7415 * object.c (mono_message_init): Avoid looking up array types for each call.
7417 2008-06-27 Zoltan Varga <vargaz@gmail.com>
7419 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
7422 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
7425 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
7428 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
7431 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
7433 * object.c (mono_value_box): Fix boxing of nullables.
7435 2008-06-26 Kornél Pál <kornelpal@gmail.com>
7437 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
7438 mono_module_handle that is defined by the linker; no initialization required.
7439 * coree.h: Remove mono_module_handle, add __ImageBase, update
7440 mono_image_open_from_module_handle.
7441 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
7442 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
7443 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
7444 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
7445 to 4 GB away from image base address. IA64 version is not tested but was very
7446 easy to implement and should work if we ever need it.
7447 * domain.c (mono_init_internal): Avoid system error message boxes.
7448 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
7449 with has_entry_point. Handle do_mono_image_load fauilre correctly.
7450 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
7451 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
7452 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
7454 Contributed under MIT/X11 license.
7456 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7458 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
7459 as part of the private mono API.
7461 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
7462 Do proper argument checking for methods that belong to generic classes.
7463 Do proper type resolution for GMFH/2.
7466 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7468 * verify.c (do_switch): Fix a memory corruption bug with
7469 the jump index is out of bound.
7471 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7473 * verify.c: Disable debug code.
7475 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7477 * reflection.c (mono_image_get_methodbuilder_token): Use
7478 mono_image_get_methodspec_token_for_generic_method_definition
7479 instead of mono_image_get_memberref_token. We cache more memberef
7482 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7484 * verify.c: Inflate exception clause types.
7487 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7489 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
7492 * reflection.c (mono_image_get_ctorbuilder_token): Same.
7494 * reflection.c (mono_image_create_method_token): Same.
7496 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7498 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
7499 It does the same as mono_image_get_methodref_token but works on
7502 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
7503 and always generate a methodspec. This follows the old behavior and fixes
7504 the regressions in System.Core.
7506 2008-06-24 Zoltan Varga <vargaz@gmail.com>
7508 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
7509 don't event mono_class_get () succeeds. Fixes #402182.
7511 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
7513 * metadata-internals.h: Added MonoDynamicImage::methodspec
7514 hashtable to store methodspec tokens created for MethodBuilders.
7516 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
7517 MethodBuilders as open instantiations if a methodspec was requested.
7519 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
7521 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
7523 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
7527 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
7529 * loader.c (method_from_methodspec): Avoid crashing if the
7530 method lookup fails.
7532 2008-06-20 Dick Porter <dick@ximian.com>
7534 * socket-io.c (get_socket_assembly): Cope with Moonlight network
7535 classes being in a different assembly. Fixes bug 399184.
7537 2008-06-20 Zoltan Varga <vargaz@gmail.com>
7539 * loader.c (mono_loader_init): Make this callable multiple times.
7540 (mono_dllmap_insert): Call mono_loader_init () so this works even before
7541 the runtime is initialized. Fixes #401755.
7543 2008-06-19 Dick Porter <dick@ximian.com>
7545 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
7548 2008-06-19 Dick Porter <dick@ximian.com>
7551 * icall-def.h: Implement Socket generic Send() and Receive()
7552 methods. Fixes bug 395168.
7554 2008-06-19 Kornél Pál <kornelpal@gmail.com>
7556 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
7558 Contributed under MIT/X11 license.
7560 2008-06-18 Martin Baulig <martin@ximian.com>
7562 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
7563 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
7564 set to 80.0. The debugger <-> runtime interface is now frozen as
7568 (mono_debug_debugger_version): Bump to 4.
7570 2008-06-18 Martin Baulig <martin@ximian.com>
7572 * debug-mono-symfile.c
7573 (load_symfile): Don't check the minor version.
7575 * debug-mono-symfile.h: Bump the version number to 50.0.
7577 2008-06-18 Martin Baulig <martin@ximian.com>
7579 * debug-mono-symfile.c
7580 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
7581 minimum required version.
7583 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
7585 * reflection.c (mono_custom_attrs_from_property): Fix support for
7586 retriveving cattrs of dynamic inflated generic types.
7588 * reflection.c (mono_custom_attrs_from_event): Same.
7590 * reflection.c (mono_custom_attrs_from_field): Same;
7592 * reflection.c (typebuilder_setup_events): Same cattrs of events.
7594 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
7595 Moved to metadata.c.
7597 * metadata.c: New functions to retrive the equivalent field, event
7598 of property from the generic type definition.
7600 * metadata-internals.h: Added new functions from metadata.c.
7602 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
7604 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
7605 to cached in a mempool is used.
7607 * metadata.c (free_generic_class): In some situations field generic_info type
7608 is not properly dup'ed and leads to double free'ing.
7612 2008-06-17 Mark Probst <mark.probst@gmail.com>
7614 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
7615 this arguments (will be needed later for generic methods).
7618 2008-06-17 Mark Probst <mark.probst@gmail.com>
7620 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
7621 Create a static RGCTX invoke wrapper for methods which require it.
7623 2008-06-17 Mark Probst <mark.probst@gmail.com>
7625 * object.c, class-internals.h: New function for checking whether
7626 an individual field is special static.
7628 2008-06-15 Zoltan Varga <vargaz@gmail.com>
7630 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
7631 linear search since the table is sorted.
7633 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
7636 2008-06-14 Zoltan Varga <vargaz@gmail.com>
7638 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
7639 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
7641 * gc.c (mono_domain_finalize): Allow an infinite timeout.
7643 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
7645 * threads.c (mono_thread_request_interruption): Get rid of locking, use
7646 InterlockedCompareExchange to query and modify
7647 thread->interruption_requested.
7649 * object-internals.h (struct _MonoThread): Change interruption_requested
7650 to a gint32 so it can be modified by atomic operations. Add
7651 'critical_region_level' from the managed side, change small_id to a guint32,
7652 add new set of 'unused' fields.
7654 * appdomain.c: Bump corlib version.
7656 2008-06-13 Zoltan Varga <vargaz@gmail.com>
7658 * class.c (mono_class_from_name): Search modules as well. Fixes
7661 2008-06-13 Mark Probst <mark.probst@gmail.com>
7663 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
7664 templates. Templates are generalized with an additional type_argc
7665 argument. RGCTX templates have type_argc==0, MRGCTX templates
7668 * domain-internals.h, domain.c: New hash table for looking up
7671 * metadata.c, metadata-internals.h: Rename hash and equal
7672 functions for MonoGenericInst's and make them public.
7674 * class-internals.h: New data structures for the MRGCTX. Macros
7675 for distinguishing slots in the RGCTX and the MRGCTX.
7677 2008-06-13 Mark Probst <mark.probst@gmail.com>
7679 * object.c (mono_method_get_imt_slot): Put the same methods of
7680 different instantiations of the same generic interface in the same
7681 IMT slots, to make generic sharing simpler.
7683 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7685 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
7687 * metadata.c (mono_metadata_field_info_with_mempool): Added.
7688 This function works just like mono_metadata_field_info, but
7689 accept a mempool as argument to be used allocating memory.
7691 * marshal.c (mono_marshal_load_type_info): Use new function
7692 to load marshal data into image mempool.
7694 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7696 * class.c (mono_class_inflate_generic_type_with_mempool):
7697 This function allows to inflate a generic type using
7700 * class.c (inflate_generic_type): Take a mempool as argument
7701 and use it to do type dup'ing.
7703 * class.c (mono_class_setup_fields): Field type for generic
7704 generic classes are allocated from the image mempool.
7706 * metadata.c (free_generic_class): Inflated field type is
7707 now allocated in the image mempool.
7709 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7711 * threads.c (thread_cleanup): Free MonoThread::name.
7713 2008-06-12 Marek Habersack <mhabersack@novell.com>
7715 * appdomain.c (ensure_directory_exists): avoid unnecessary
7716 mkdir(2) calls when the shadow directory already exists.
7717 (mono_make_shadow_copy): copy also satellite assemblies from the
7718 private bin directories.
7720 2008-06-11 Zoltan Varga <vargaz@gmail.com>
7722 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
7724 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
7725 a page boundary. Fixes #396219.
7727 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7729 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
7730 due to double-checked locking.
7732 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7734 * assembly.c (build_assembly_name): Release memory on failure.
7736 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
7738 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7740 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
7743 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7745 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
7748 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7750 * loader.c (field_from_memberref): Check if field signature type is equal
7751 to the non-inflated type of the field. Fixes #398980.
7753 2008-06-11 Zoltan Varga <vargaz@gmail.com>
7755 * assembly.c (mono_assembly_load_from_full): Call
7756 mono_assembly_load_friends () outside the assemblies lock, since it can
7757 acquire the loader lock. Fixes #323696.
7759 * reflection.c (resolve_object): Inflate the inst with the context for
7760 FieldOnTypeBuilderInst. Fixes #399010.
7762 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7764 * reflection.c (mono_image_get_field_on_inst_token): Don't
7765 inflate the field to encode it's signature. If it's a
7766 VAR or MVAR it should stay that way in the signature.
7769 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7771 * reflection.c (resolve_object): Release memory of inflated types.
7773 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7775 * loader.c (mono_method_get_signature_full): Remove assert about
7776 loading a methodspec to a generic method. We have such methods, such as
7777 System.Threading.Interlocked::CompareExchange<T>.
7778 This assert was removed since it crashes the verifier when it checks
7779 methods calling CompareExchange<T>.
7781 2008-06-10 Marek Safar <marek.safar@gmail.com>
7783 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
7784 of Type array and not MonoType.
7786 2008-06-10 Marek Habersack <mhabersack@novell.com>
7788 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
7791 2008-06-10 Martin Baulig <martin@ximian.com>
7793 * debug-mono-symfile.h
7794 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
7795 changes to the file format, but we were generating incorrect
7796 source file indices in the line number table due to a bug, which
7797 made backtraces report an incorrect source file.
7799 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7801 * mono-debug.c: Moved mono_debug_free_method_jit_info from
7802 mini/debug-mini.c to here.
7804 * mono-debug.c (il_offset_from_address): Free memory from find_method.
7806 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
7807 use it to release structs returned by mono_debug_find_method.
7809 2008-06-10 Zoltan Varga <vargaz@gmail.com>
7811 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
7812 since it needs to set method->slot for all interface methods.
7814 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7816 * class-internals.h: Forgot to add.
7818 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7820 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
7822 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
7823 Lookup the custom attributes from property_hash.
7825 * reflection.c (mono_save_custom_attrs): Save the custom attributes
7826 in property_hash. Allocate all data using the image mempool.
7828 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
7829 for dynamic_custom_attrs to checks if the image is dynamic.
7831 2008-06-09 Zoltan Varga <vargaz@gmail.com>
7833 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
7836 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
7837 runtime functions while holding the domain assemblies lock.
7839 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7841 * verify.c: Reapplied the last bit of the reverted changes.
7843 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7845 * verify.c: Reapplied more of the reverted changes.
7847 2008-06-09 Martin Baulig <martin@ximian.com>
7849 * debug-mono-symfile.c (load_symfile): Check the major version
7850 first; if it's wrong, don't print the minor version in the error message.
7852 2008-06-09 Zoltan Varga <vargaz@gmail.com>
7854 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
7855 lock instead of the domain lock to avoid deadlocks, since the thread might
7856 already hold the loader lock.
7858 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
7859 (mono_thread_attach): Ditto.
7861 * monitor.c: Use a TLS variable for holding the current thread id instead
7862 of calling pthread_self ().
7863 (mono_monitor_init_tls): New internal function to initialize the TLS
7865 (mono_monitor_try_enter_internal): Put the owner == id check after the
7868 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
7869 missed optimizations when using gcc-4.3.
7871 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
7873 * reflection.c (mono_dynamic_image_free): Free the memory
7874 used by MonoGenericParam in MonoDynamicImage::gen_param.
7876 * reflection.c (mono_reflection_setup_generic_class): Allocate
7877 container from mempool.
7879 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
7880 container from mempool.
7882 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7884 * threads.c (mono_set_pending_exception): New internal function to set the
7885 pending exception of the current thread.
7886 (mono_thread_get_and_clear_pending_exception): Check for
7887 thread->pending_exception as well.
7889 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
7891 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
7892 it can trigger a collection.
7894 2008-06-06 Martin Baulig <martin@ximian.com>
7896 Merged the `debugger-kahalo' branch.
7899 (MONO_DEBUGGER_VERSION): Bumped to 72.
7901 * debug-mono-symfile.h
7902 (MonoSymbolFileMethodIndexEntry): Removed.
7903 (MonoSymbolFileMethodEntry): New public typedef.
7904 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
7905 (MonoSymbolFileSourceEntry): Remove everything except `index' and
7907 (MonoSymbolFileMethodEntry): Removed.
7908 (MonoSymbolFileLexicalBlockEntry): Removed.
7909 (MonoSymbolFileLineNumberEntry): Removed.
7910 (MonoDebugLexicalBlockEntry): Removed.
7911 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
7912 removed `num_il_offsets' and `il_offsets'.
7913 (MonoSymbolFile): Replace `version' with `major_version' and
7915 (MONO_SYMBOL_FILE_VERSION): Replace with
7916 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
7917 `MONO_SYMBOL_FILE_MINOR_VERSION'.
7919 * debug-mono-symfile.c
7920 (mono_debug_symfile_lookup_location): Add support for the new line
7921 number table format.
7923 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7925 * metadata.c (free_generic_class): Release the inflated
7926 MonoClass of dynamic generic classes if it's not a generic
7929 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7931 * verify.c: Reapplied more of the reverted changes.
7933 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7935 * reflection.c (lookup_custom_attr): Clean the cached flag or
7936 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
7939 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7941 * verify.c: Reapplied a small part of the reverted changes.
7943 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7945 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7947 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
7948 previously in managed code.
7949 (mono_monitor_exit): Ditto.
7950 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
7952 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
7953 the managed definition.
7955 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7957 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
7959 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7961 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
7963 * monitor.c: Add some micro optimizations.
7965 * icall.c (type_from_typename): Handle 'bool'.
7967 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7969 * verify.c: Implement constructor verification per P III 1.8.1.4.
7972 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7974 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
7975 holding the assemblies lock here too.
7977 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7979 * verify.c: Kill stack_top function.
7981 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7983 * verify.c: Kill stack_get function.
7985 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7987 * verify.c (mono_method_verify): Last change broke the build. Fixed.
7989 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7991 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
7994 * verify.c (mono_method_verify): Inflate params and locals to avoid
7995 mismatch when checking for compatibility.
7997 2008-06-05 Jonathan Chambers <joncham@gmail.com>
7999 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
8000 Length prefix should be size in bytes. Fix bug #339530.
8002 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
8003 Length prefix should be size in bytes. Fix bug #339530.
8005 Code is contributed under MIT/X11 license.
8007 2008-06-05 Bill Holmes <billholmes54@gmail.com>
8009 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
8011 Contributed under MIT/X11 license.
8013 2008-06-05 Martin Baulig <martin@ximian.com>
8015 * mono-debug-debugger.c
8016 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
8018 2008-06-05 Zoltan Varga <vargaz@gmail.com>
8020 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
8021 while holding the assemblies lock to prevent deadlocks. Handle the case
8022 where the search hook returns NULL but the assembly was still loaded.
8025 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
8026 modify domain state.
8028 2008-06-05 Andreas Färber <andreas.faerber@web.de>
8030 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
8031 * Makefile.am (pedump_LDADD): Post-process object files and
8032 add dtrace-generated object file, if necessary.
8034 Code is contributed under MIT/X11 license.
8036 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
8038 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
8040 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
8042 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
8044 2008-06-04 Mark Probst <mark.probst@gmail.com>
8046 * threads.c: Try to free everything from the delayed free table
8047 when shutting down threads, and set the variable to NULL after the
8048 table is freed so that calling
8049 mono_thread_hazardous_try_free_all() when shutting down the root
8050 domain doesn't crash.
8052 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
8054 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
8055 the caller if resulting type was inflated.
8057 * class.c (mono_class_create_from_typespec): Free the MonoType if it
8060 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
8063 2008-06-04 Zoltan Varga <vargaz@gmail.com>
8065 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
8066 class library tests.
8068 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
8069 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
8072 2008-06-04 Mark Probst <mark.probst@gmail.com>
8074 * domain.c, domain-internals.h: The JIT infos are now freed by the
8075 JIT info table code. They are freed immediately if there only a
8076 single JIT info table in circulation. If there is more, the free
8077 is delayed via a queue.
8079 * threads.c, threads-types.h: New hazard pointer function for
8080 freeing all freeable delayed items in one sitting.
8082 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8084 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
8086 * reflection.c (typebuilder_setup_properties): Same.
8088 * reflection.c (typebuilder_setup_events): Same.
8090 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8092 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
8093 and use it for allocating memory.
8095 * reflection.c (mono_marshal_spec_from_builder): Same.
8097 * reflection.c: Change code to use new signatures.
8099 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
8101 2008-06-03 Zoltan Varga <vargaz@gmail.com>
8103 * decimal.c (rescale128): Put back one line which was accidently commented
8106 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
8109 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8111 * reflection.c (mono_reflection_generic_class_initialize): Name must
8112 be always malloc'ed so we can free it later on. Do this for field, property
8115 * metadata.c (free_generic_class): Free field, property and event names.
8117 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8119 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
8120 instead of g_memdup.
8122 * reflection.c (typebuilder_setup_fields): Same.
8124 2008-06-03 Zoltan Varga <vargaz@gmail.com>
8126 * decimal.c (rescale128): Optimize this function a bit more.
8128 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8130 * metadata.c (free_generic_class): Release some memory from
8131 SRE generic classes.
8133 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
8135 * reflection.c (mono_image_get_generic_field_token): No reference
8136 to name is kept, free it.
8138 * reflection.c (mono_reflection_generic_class_initialize): Free
8139 more memory of the inflated field.
8141 2008-06-03 Zoltan Varga <vargaz@gmail.com>
8143 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
8146 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
8148 * reflection.c (mono_dynamic_image_free): Release memory used by
8149 MonoDynamicImage::array_methods elements.
8151 * reflection.c (assembly_add_win32_resources): Release memory after
8154 2008-06-02 Zoltan Varga <vargaz@gmail.com>
8156 * decimal.c (log2_32): Use an optimized version for this function too.
8158 * decimal.c (log2_64): Fix this on 32 bit machines.
8160 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
8162 * class.c (mono_dup_array_type): Implement allocation using a mempool.
8164 * class.c (mono_metadata_signature_deep_dup): Same.
8166 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
8169 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
8171 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
8173 * metadata-internals.h: Added mono_metadata_signature_dup_full.
8175 * class-internals.h: Update signatures to take a MonoMemPool.
8177 2008-06-02 Dick Porter <dick@ximian.com>
8179 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
8181 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
8182 FormatMessage API to get the error text. Fixes bug 321827.
8184 2008-06-02 Zoltan Varga <vargaz@gmail.com>
8186 * decimal.c: Add some micro optimizations to make decimal operations faster.
8188 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
8190 * reflection.c (method_encode_clauses): Take a mempool
8191 as parameter and use it to allocate the clause array.
8193 * reflection.c (mono_image_get_field_on_inst_token): Free
8194 the inflated type after encoding it.
8196 * reflection.c (mono_dynamic_image_free): Free each element
8197 of MonoDynamicImage::gen_params.
8199 * reflection.c (reflection_methodbuilder_to_mono_method):
8200 Allocate the generic param array from the mempool.
8201 Allocate signature params from the mempool.
8203 * reflection.c (mono_reflection_generic_class_initialize):
8204 Free inflated fields after been used.
8206 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
8208 * icall.c: Reapply the memory leak fixes as they no
8209 longer make mono crash.
8211 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
8213 * reflection.c (mono_type_get_object): Don't store the suplied
8214 MonoType with type_hash. A caller which pass a type that
8215 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
8216 might end with a pointer to freed memory.
8217 The solution is to use byval_arg or this_arg from the associated
8218 MonoClass of the supplied type.
8220 2008-05-29 Zoltan Varga <vargaz@gmail.com>
8222 * icall.c: Revert the rest of the last change as it breaks the build too.
8224 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
8226 * icall.c: Revert a leak fix as it's breaking the build.
8228 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
8230 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
8232 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
8234 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
8236 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
8238 * icall.c: Fix some memory leaks.
8240 2008-05-29 Dick Porter <dick@ximian.com>
8242 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
8243 async socket operations from the pending list when a socket
8244 closes. Leaving it until the threadpool services the event
8245 exposes a race condition when a socket descriptor is reused.
8248 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8250 * object.c: Fix negative index check for array alocation.
8252 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8254 * icall.c, marshal.c: Delegate wrappers should skip visibility.
8255 This check is performed by the verifier for IL created delegates
8256 and by Delegate::CreateDelegate for programatically created ones.
8259 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8261 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
8262 Fix code to use mono_array_size_t instead of int.
8264 Based on patch by Luis F. Ortiz.
8265 Contributed under X11 license.
8266 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8268 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8270 * icall.c: Added ves_icall_System_Array_GetLongLength and
8271 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
8274 * icall.h: Export both new functions.
8276 Based on patch by Luis F. Ortiz.
8277 Contributed under X11 license.
8278 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8280 2008-05-28 Martin Baulig <martin@ximian.com>
8282 The debugger now requires exactly r103463.
8284 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
8285 This version is not supported by the debugger, wait for 72.
8287 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8289 * object.h: Changed array related functions to use
8290 mono_array_size_t instead of guint32. Forgot to commit this file.
8292 Patch by Luis F. Ortiz.
8293 Contributed under X11 license.
8294 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8297 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8299 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
8300 don't define it. Use the number literal instead.
8302 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8304 * icall.c: Changed array related functions to use
8305 mono_array_size_t instead of guint32.
8307 * icall.c (ves_icall_System_Array_GetLength): Check for length
8308 overflow under MONO_BIG_ARRAYS.
8310 Based on patch by Luis F. Ortiz.
8311 Contributed under X11 license.
8312 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8314 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8316 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
8318 Based on patch by Luis F. Ortiz.
8319 Contributed under X11 license.
8320 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8322 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8324 * object.c, object.h: Changed array related functions to use
8325 mono_array_size_t instead of guint32.
8327 Patch by Luis F. Ortiz.
8328 Contributed under X11 license.
8329 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8331 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8333 * object.h: Introduced mono_array_size_t typedef. This must be used
8334 in all places an array length is expected. This is 64bits wide if
8335 MONO_BIG_ARRAYS is enabled.
8337 Patch by Luis F. Ortiz.
8338 Contributed under X11 license.
8339 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8341 2008-05-27 Zoltan Varga <vargaz@gmail.com>
8343 * security-manager.c class.c: Set the class exception info by calling
8344 mono_class_set_failure ().
8346 * class.c (mono_class_get_exception_data): New accessor function.
8347 (mono_class_set_failure): Store exception_data in the property hash.
8349 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
8350 the struct as a property.
8352 * loader.c (mono_get_method_full): Store the lookup result for method
8353 tokens in method_cache, the others in methodref_cache to decrease the memory
8354 usage of hash tables.
8356 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
8357 (mono_image_init): method_cache is lazy inited now.
8359 * metadata-internals.h (struct _MonoImage): Change method_cache to
8360 a MonoValueHashTable, add a separate methodref_cache.
8362 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
8364 * number-formatter.h: Fix tables to avoid arithemtic overflow in
8365 Double.ToString as exposed by Bug #383531.
8367 2008-05-26 Zoltan Varga <vargaz@gmail.com>
8369 * number-formatter.h: Make some tables static.
8371 * class.c (mono_method_set_generic_container): New accessor function.
8372 (mono_method_get_generic_container): Ditto.
8374 * class-internals.h (struct _MonoMethod): Remove rarely used
8375 'generic_container' field, store it in the property hash instead. Add
8376 'is_generic' boolean field instead.
8378 * image.c (mono_image_init): Initialize property_hash.
8379 (mono_image_close): Destroy property_hash.
8381 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
8382 hold rarely used fields of runtime structures belonging to this image.
8384 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
8385 to get/set method->generic_container.
8387 * loader.c (mono_get_method_from_token): Avoid loading the method header for
8390 2008-05-25 Zoltan Varga <vargaz@gmail.com>
8392 * class.c (mono_class_inflate_generic_method_full): Don't increase
8393 mono_stats.inflated_method_count for methods found in the cache.
8395 * threads.c (mono_thread_request_interruption): Add a comment about
8398 2008-05-24 Zoltan Varga <vargaz@gmail.com>
8400 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
8401 interface_offsets_packed table.
8403 * class.c (mono_class_init): Remove some dead code.
8405 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
8406 mono_class_setup_vtable () when CAS is active to detect security problems.
8408 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
8410 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
8412 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
8413 parameters as it's irrelevant for delegate checking.
8415 2008-05-23 Zoltan Varga <vargaz@gmail.com>
8417 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
8419 * class.c (mono_class_init): Control the creation of a generic vtable using
8420 a global which is true by default, but set to false by the runtime startup code.
8422 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
8423 Disabled for now since it breaks the embedding API.
8424 Move the setup of class->methods for arrays to mono_class_setup_methods ().
8425 (mono_class_setup_methods): Add a memory barrier.
8427 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
8428 when mono_class_init () doesn't compute the generic vtable.
8430 2008-05-23 Massimiliano Mantione <massi@ximian.com>
8431 * profiler.c: Added mono_profiler_install_statistical_call_chain,
8432 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
8433 to support call chains (backtrace) in the stat profiler.
8434 * profiler.c, profiler-private.h: Likewise.
8436 2008-05-22 Mark Probst <mark.probst@gmail.com>
8438 * generic-sharing.c: Init generic class when a method of it is
8439 requested via a runtime generic context.
8441 2008-05-22 Zoltan Varga <vargaz@gmail.com>
8443 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
8445 * reflection.c (mono_type_get_object): Add a FIXME.
8447 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
8449 * class.c (mono_class_get_method_by_index): New helper function, returning an
8450 entry in the class->methods array.
8452 2008-05-21 Zoltan Varga <vargaz@gmail.com>
8454 * class.c (mono_class_init): Only do the array optimization for szarrays.
8455 Avoid creating a generic vtable for generic instances as well.
8456 (mono_class_get_method_from_name_flags): Don't search in the metadata for
8459 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
8461 * loader.c (mono_get_method_constrained): Inflate the signature
8462 with class context. Fix #325283.
8464 2008-05-21 Zoltan Varga <vargaz@gmail.com>
8466 * object.c (mono_class_create_runtime_vtable): Add a comment.
8468 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
8470 (setup_interface_offsets): Handle the case when this is called twice for arrays.
8471 (mono_class_setup_vtable_general): Add an assert.
8472 (mono_class_init): Avoid creating a generic vtable for arrays.
8474 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
8475 here, let mono_class_init () do that.
8477 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
8478 interfaces in mscorlib.
8480 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
8481 interfaces. Add some comments.
8482 (mono_class_init): Call mono_class_setup_methods () here since it is no
8483 longer called by mono_class_setup_vtable ().
8485 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
8486 not set in class->vtable.
8487 (mono_class_create_runtime_vtable): Reenable the disabled code.
8489 * object.c (mono_class_create_runtime_vtable): Disable the last change for
8490 now as it causes some test failures.
8492 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
8493 if using the vtable trampoline. Also remove some strange code which put the
8494 generic methods themselves into the vtable slots. Remove the AOT init_vtable
8495 stuff as it is no longer needed.
8497 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
8499 * pedump.c: Give make --verify all option check code as well.
8500 Using --verify code won't check for metadata now.
8502 2008-05-19 Martin Baulig <martin@ximian.com>
8504 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
8507 (_mono_debug_using_mono_debugger): New global variable; it's set
8508 directly by the debugger, so mono_debug_using_mono_debugger() also
8509 works after attaching.
8511 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
8513 * object.c (mono_class_create_runtime_vtable): Use memory barriers
8514 as we do double checked locking on MonoClass::runtime_info and
8515 MonoClassRuntimeInfo::domain_vtables.
8517 2008-05-18 Zoltan Varga <vargaz@gmail.com>
8519 * debug-helpers.c (print_field_value): Fix a warning.
8521 2008-05-16 Zoltan Varga <vargaz@gmail.com>
8523 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
8524 set in the AOT case.
8526 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
8528 * class.c (mono_class_setup_vtable_general): Use memory barriers
8529 as we do double checked locking on MonoClass::vtable.
8531 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
8533 * reflection.c (resolve_object): Inflate only if the generic context
8534 is not null. Fixes #389886.
8536 2008-05-15 Jonathan Chambers <joncham@gmail.com>
8538 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
8541 Code is contributed under MIT/X11 license.
8543 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8545 * class.c: Revert unrelated change.
8547 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8549 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
8550 a generic instantiation, use mono_class_from_mono_type instead of playing
8551 with MonoType directly.
8553 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8555 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
8556 checks must ignore generic instantiations, so mono_class_has_parent is not
8557 suitable. Fixes #390128.
8559 2008-05-14 Zoltan Varga <vargaz@gmail.com>
8561 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
8562 it to avoid registering tokens during metadata generation. Fixes #390023.
8564 2008-05-14 Kornél Pál <kornelpal@gmail.com>
8566 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
8569 Contributed under MIT/X11 license.
8571 2008-05-14 Kornél Pál <kornelpal@gmail.com>
8573 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
8574 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
8575 to fixup the EXE image.
8576 (mono_cleanup): Use mono_close_exe_image.
8577 (mono_close_exe_image): New function.
8578 * image.c: Include "marshal.h".
8579 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
8580 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
8581 counting when the image is loaded outside of mono_image_open_full. Set status
8582 based on GetLastError.
8583 * coree.c: Include required headers. Add init_from_coree.
8584 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
8585 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
8586 (_CorExeMain): Set init_from_coree.
8587 (CorExitProcess): Only call ExitProcess for now.
8588 (CorBindToRuntimeEx): New stub implementation.
8589 (CorBindToRuntime): New function.
8590 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
8591 (MonoFixupExe): ILONLY executables require no fixups.
8592 (mono_set_act_ctx): New function to set activation context.
8593 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
8594 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
8595 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
8596 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
8598 * domain-internals.h: Add mono_close_exe_image.
8600 Contributed under MIT/X11 license.
8602 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
8604 * metadata.c (mono_metadata_compute_size): Correctly calculate field
8605 size for generic param and event tables. Fixes #388977.
8607 2008-05-13 Zoltan Varga <vargaz@gmail.com>
8609 * loader.c (mono_method_signature): Use memory barriers because of the double
8610 checked locking pattern.
8612 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
8613 aborting or aborted as well. Fixes #376391.
8615 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
8616 existing runtime state in the Suspend handler during shutdown.
8618 2008-05-12 Zoltan Varga <vargaz@gmail.com>
8620 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
8622 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
8623 which are starting up or shutting down.
8625 * threads.c (mono_threads_set_shutting_down): Don't return a value since
8626 this function never returns if the runtime is already shutting down.
8628 * icall.c (ves_icall_System_Environment_Exit): Update after
8629 mono_threads_set_shutting_down () signature change.
8631 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
8633 * class.c: Added can_access_instantiation to verify if the instantiation
8634 is visible. Fix access check for nested types as they returned TRUE
8635 before doing type and generic instantiation visibility checks.
8637 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
8639 * reflection.c (mono_reflection_create_generic_class): The created type
8640 must have a different container from its TypeBuilder. Otherwise they
8641 will end sharing generic arguments, which is wrong.
8643 Due to the sharing, making a generic instance of the created type using
8644 the TypeBuider generic arguments resulted in the generic type definition
8645 been returned, which is wrong as well.
8647 As a bonus the code was leaking the type_params array. This memory should
8648 be allocated from the image mempool.
8650 This fixes bug #354047.
8652 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
8654 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
8655 to here as they are now used in assembly.c new code.
8656 Added a skipverification flag to MonoAssembly.
8657 New internal function mono_assembly_has_skip_verification.
8659 * assembly.c: New function mono_assembly_has_skip_verification. It checks
8660 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
8663 2008-05-07 Zoltan Varga <vargaz@gmail.com>
8665 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
8666 needed. Fixes #387034.
8668 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
8670 2008-05-06 Miguel de Icaza <miguel@novell.com>
8672 * assembly.c (mono_assembly_load_reference): Prevent crash while
8673 disassembling Silverlight 2.0 executables while we still do not
8674 have GACed libraries.
8676 2008-05-07 Zoltan Varga <vargaz@gmail.com>
8678 * reflection.c: Special case generic type definitions as well. Fixes #383444.
8680 2008-05-06 Zoltan Varga <vargaz@gmail.com>
8682 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
8683 of the dynamic case. Fixes #387404.
8685 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8687 *verify.c (mono_verifier_is_class_full_trust): If under
8688 verify_all and the verifier mode was not set, only
8689 gac and corlib types are fulltrust. This makes --verify-all
8690 usable to detect unverifiable code, which is the expected
8693 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8695 * verify.h: Ops, commited the header with debug
8698 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8700 * verify.c (merge_stack): Use the new value on unverifiable
8703 * verify.c (verify_type_compatibility_full): Comparison
8704 of nullable types can't use mono_class_is_assignable_from.
8706 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
8707 that makes all verification errors be reported.
8709 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
8712 2008-05-05 Robert Jordan <robertj@gmx.net>
8714 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
8715 support for value types. See #386415.
8717 * object.c: comments.
8719 Code is contributed under MIT/X11 license.
8721 2008-05-05 Martin Baulig <martin@ximian.com>
8723 * debug-mono-symfile.h
8724 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
8725 for old pre-terrania symbol files.
8727 2008-05-05 Andreas Färber <andreas.faerber@web.de>
8729 * mono-config.c: Add ppc64 architecture.
8731 Code is contributed under MIT/X11 license.
8733 2008-05-05 Andreas Färber <andreas.faerber@web.de>
8735 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
8736 PPC64 uses function descriptors as well.
8738 Code is contributed under MIT/X11 license.
8740 2008-05-04 Zoltan Varga <vargaz@gmail.com>
8742 * object.c (compute_class_bitmap): Ignore literal static fields.
8744 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
8745 var has an invalid format.
8746 (describe_ptr): Add some sanity checks for the vtable.
8747 (add_nursery_frag): Clear unused nursery fragments.
8748 (major_collection): Clear all remaining nursery fragments.
8750 2008-05-03 Robert Jordan <robertj@gmx.net>
8752 * image.c, metadata-internals.h: add thunk_invoke_cache.
8754 * marshal.c, marshal.h: implement
8755 mono_marshal_get_thunk_invoke_wrapper ().
8757 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
8759 Code is contributed under MIT/X11 license.
8761 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
8763 * verify.c (do_leave): Empty the stack.
8765 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
8767 * class.c (mono_class_is_assignable_from): Variance
8768 doesn't work between reference and value types. For example,
8769 given type C<T+>, C<int32> is not assignable to C<object>.
8770 Break the argument checking loop on first error.
8772 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
8774 * icall.c : base64_to_byte_array() needs some more strict
8775 check for sequence of '=' characters. Patch by Santa
8776 Marta (http://deee.g.hatena.ne.jp/santamarta).
8778 Contributed under MIT/X11 license.
8779 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
8781 2008-05-02 Jonathan Chambers <joncham@gmail.com>
8783 * domain.c: Disable LoadLibrary support to fix Win32 build.
8785 Code is contributed under MIT/X11 license.
8787 2008-05-02 Zoltan Varga <vargaz@gmail.com>
8789 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
8790 to help with cache behaviour.
8792 2008-05-01 Miguel de Icaza <miguel@novell.com>
8794 * appdomain.c (mono_domain_from_appdomain): Add new accessor
8797 2008-05-01 Zoltan Varga <vargaz@gmail.com>
8799 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
8801 2008-05-01 Dick Porter <dick@ximian.com>
8803 * process.c (process_get_fileversion): Only pass 16 bits of
8804 language ID to VerLanguageName. Fixes bug 381204.
8806 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
8808 * verify.c (mono_method_verify): Fix the comparison
8809 operator for code bounds check.
8811 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
8813 * verify.c (mono_method_verify): Check the bounds of
8814 all access of the code array.
8816 2008-04-29 Kornél Pál <kornelpal@gmail.com>
8818 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
8820 2008-04-28 Zoltan Varga <vargaz@gmail.com>
8822 * image.c (mono_image_strong_name_position): Fix return value when the rva is
8825 2008-04-28 Kornél Pál <kornelpal@gmail.com>
8827 * loader.c (mono_get_method_from_token, mono_method_signature): Add
8828 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
8829 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
8830 fixup main EXE images when using mono.exe for mixed-mode assembly support.
8831 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
8833 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
8834 runtime initialization from metadata.
8835 * assembly.c: Remove obsolete ceGetModuleFileNameA.
8836 (mono_set_rootdir): Use mono_get_module_file_name.
8837 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
8839 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
8840 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
8841 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
8842 MonoCLIImageInfo. Add support for module handles.
8843 (load_cli_header): Update mono_cli_rva_image_map signature.
8844 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
8845 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
8846 (mono_image_rva_map): Add support for module handles.
8847 (mono_image_ensure_section_idx): Add support for module handles.
8848 (mono_image_close): Add support for module handles.
8849 (do_load_header): Add support for module handles.
8850 (mono_image_open_from_module_handle): New function for internal use.
8851 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
8852 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
8853 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
8855 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
8856 * image.h: Add mono_image_fixup_vtable.
8857 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
8859 * coree.h: New file.
8860 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
8861 unsupported native code.
8862 (mono_marshal_set_callconv_from_modopt): New function splitted from
8863 mono_marshal_get_managed_wrapper.
8864 (mono_marshal_get_managed_wrapper): Use
8865 mono_marshal_set_callconv_from_modopt.
8866 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
8867 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
8868 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
8869 that results in a deadlock when the runtime is loaded in _CorDllMain.
8870 * Makefile.am: Add coree.c and coree.h.
8872 Contributed under MIT/X11 license.
8874 2008-04-28 Mark Probst <mark.probst@gmail.com>
8876 * generic-sharing.c: Search for type arguments in array element
8879 2008-04-28 Mark Probst <mark.probst@gmail.com>
8881 * class-internals.h, generic-sharing.c: New, small runtime generic context.
8883 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
8885 * object.c: Don't setup the RGCTX when the vtable is created,
8886 because we're setting it up lazily now.
8888 2008-04-26 Zoltan Varga <vargaz@gmail.com>
8890 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
8893 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8895 * verify.c (verify_class_for_overlapping_reference_fields):
8896 If class is under fulltrust allow reference types to overllap
8897 if they have the same RVA.
8899 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8901 * pedump.c: Added new flag valid-only, that makes the verifier
8902 behaves just like --security=validil. It won't fail type load
8903 due to unverifiable restrictions.
8905 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8907 * class-internals.h (struct MonoMethod): Added a verification_success
8908 field to cache verifier executions. Reduced MonoMethod:slot size by
8911 2008-04-23 Zoltan Varga <vargaz@gmail.com>
8913 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
8914 instead of a 'vt' argument to save an indirection and to allow these to be used
8916 (scan_vtype): New helper function to scan an area using a gc descriptor.
8917 (mono_gc_wbarrier_value_copy): Implement this.
8918 (handle_remset): Add support for REMSET_VTYPE.
8919 (find_in_remset_loc): Ditto.
8920 (mono_gc_base_init): Allow some debugging options to be controlled through the
8921 use of the MONO_GC_DEBUG env variable.
8922 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
8923 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
8925 2008-04-23 Martin Baulig <martin@ximian.com>
8927 * domain.c (mono_domain_create): Move the call to
8928 mono_debug_domain_create() down, after allocating the domain id.
8930 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8932 verify.c (verify_class_for_overlapping_reference_fields): Skip
8933 static fields while verifying for overlapping fields as they
8934 don't matter at all.
8936 2008-04-23 Marek Habersack <mhabersack@novell.com>
8938 * domain-internals.h: added a declaration of
8939 mono_make_shadow_copy.
8941 * assembly.c (mono_assembly_open_full): shadow copying of
8942 assemblies moved to here, so that all the assemblies within the
8943 application domain's private binary directories can be
8944 processed. Fixes bug #380546
8946 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
8947 mono_make_shadow_copy and made non-static. The decision whether
8948 to shadow-copy an assembly is made based on its location - it's
8949 copied if it's in one of the private application domain binary
8950 directories and its different to the target file in the shadow
8951 directory. Fixes bug #380546
8953 2008-04-22 Zoltan Varga <vargaz@gmail.com>
8955 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
8957 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
8960 * reflection.c (mono_image_create_token): Handle
8961 Method/ConstructorOnTypeBuilderInst.
8962 (resolve_object): Ditto.
8963 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
8964 so it can be called from resolve_object. Also handle the case when the inflated
8965 class already has its methods setup.
8967 2008-04-21 Martin Baulig <martin@ximian.com>
8969 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
8971 2008-04-20 Geoff Norton <gnorton@novell.com>
8973 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
8974 pointer dereference.
8976 2008-04-15 Marek Habersack <mhabersack@novell.com>
8978 * appdomain.c (try_load_from): if IOMAP is in effect, call the
8979 portability API to look up the assembly file. Fixes behavior in
8980 situations when the application has a bin/ directory, but the
8981 assembly search patch refers to Bin/ (and thus the requested file
8982 name is Bin/SomeLibrary.dll). Fixes bug #379888
8984 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
8986 verify.c (mono_type_is_generic_argument): Extracted this check
8987 from a dozen places to here.
8989 verify.c: Fixed all issues related to boxing generic arguments
8990 and their constraints.
8992 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
8994 verify.c (mono_class_interface_implements_interface): Fix win32 build.
8996 2008-04-14 Zoltan Varga <vargaz@gmail.com>
8998 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
8999 isn't finished yet. Fixes #363447.
9001 2008-04-13 Zoltan Varga <vargaz@gmail.com>
9003 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
9006 2008-04-13 Jb Evain <jbevain@novell.com>
9008 * domain.c: update the 2.1 profile versions.
9009 Merged from the Moonlight 2 branch.
9011 2008-04-12 Zoltan Varga <vargaz@gmail.com>
9013 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
9014 mscorlibs for the non-refonly case as well.
9016 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
9017 in mono_assembly_load_from_full (). Fixes #378924.
9019 2008-04-11 Geoff Norton <gnorton@novell.com>
9021 * icall.c: The global extern environ doesn't exist on Mac. We
9022 need to call NSGetEnviron instead.
9024 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9026 verify.c: Add generic method constraint verification.
9028 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9030 class.c (mono_class_inflate_generic_method_full): Add a long
9031 explanation to the is_mb_open hack. Remove the FIXME.
9033 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9035 * verify.c (mono_method_verify): Mark all unknown opcodes
9036 as invalid. Mark jmp as unverifiable.
9038 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9040 * verify.c: Add code to do type constraint verification on class instances.
9042 * verify.c (mono_verifier_verify_class): Use the type constraint
9045 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
9047 * class.c (mono_class_get_field_default_value): Don't pass cindex
9048 as hint to mono_metadata_get_constant_index. The local is not initialized
9049 and should contain garbage most of the time. This could only work
9052 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
9054 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
9056 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
9058 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
9060 * class.c (mono_class_from_generic_parameter): Save the token of the
9061 generic param in MonoClass::sizes.generic_param_token.
9063 * reflection.c (mono_custom_attrs_from_class): If the class type is
9064 VAR or MVAR retrieve the attributes of the generic param.
9066 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
9068 * class.c (mono_class_init): Do class verification if the verifier
9071 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
9073 * verify-internal.h: Added mono_verifier_verify_class.
9075 * verify.c: Added mono_verifier_verify_class. It checks for
9076 classes with explicit layout that have overlapping reference fields.
9078 * pedump.c: Init the verifier state prior to verification. Fixed
9079 command line arguments.
9081 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
9083 * Makefile.am: Added verify-internals.h, hopefully fix the build.
9085 2008-04-08 Zoltan Varga <vargaz@gmail.com>
9087 * verify-internals.h: Fix a warning.
9089 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
9091 * verify-internals.h: New header with the verifier configuration
9092 extracted from mini.c.
9094 * verify.c: Implemented the new functions exported by verify-internals.h.
9096 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
9098 * verify.c: Add proper verification of ckfinite.
9100 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
9102 * verify.c (do_conversion): Improved error message to something
9105 * verify.c (check_is_valid_type_for_field_ops): Fix to work
9106 with primitive types.
9108 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
9110 * verify.c: Added tail prefix checking. Marked icall
9113 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
9115 * verify.c: Fix the detection of branches to the middle
9118 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
9120 * verify.c: Implemented verification of volatile. and
9121 unaligned. prefix. Check if a type is valid after retrieving it.
9123 2008-04-01 Dick Porter <dick@ximian.com>
9125 * process.c (process_get_fileversion): If there's no string block,
9126 set the file language to en_US. Fixes the other new part of bug
9129 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
9131 * class.c: New functions mono_method_can_access_field_full and
9132 mono_method_can_access_method_full. They perform type visibility
9133 and type site check.
9135 * class-internal.h: Added exported functions.
9137 * verify.c: Use new functions to implement proper visibility checks.
9139 2008-03-29 Zoltan Varga <vargaz@gmail.com>
9141 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
9143 2008-03-28 Dick Porter <dick@ximian.com>
9145 * process.c (process_get_fileversion): Use the first language ID
9146 we see, rather than insisting on an invariant language. Fixes bug
9149 2008-03-28 Zoltan Varga <vargaz@gmail.com>
9151 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
9152 the streams to fix reading of invalid memory later.
9154 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
9157 2008-03-26 Zoltan Varga <vargaz@gmail.com>
9159 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
9160 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
9162 2008-03-26 Massimiliano Mantione <massi@ximian.com>
9163 * threads.h: Added MonoThreadManageCallback type and
9164 mono_thread_set_manage_callback prototype
9165 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
9166 (used to store the mono_thread_manage callback).
9167 * threads.c: Added mono_thread_set_manage_callback, and handle
9168 "MonoThread->manage_callback" in build_wait_tids.
9170 2008-03-26 Dick Porter <dick@ximian.com>
9172 * process.c (process_get_fileversion): Set FileVersionInfo strings
9173 to Empty when the resource doesn't have the particular info.
9176 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
9178 * verify.c (mono_method_verify): Proper prefix validation.
9180 2008-03-25 Zoltan Varga <vargaz@gmail.com>
9182 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
9183 itself in a separate argument instead of throwing them. Fixes #373448.
9185 * appdomain.c: Bump corlib version.
9187 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
9189 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
9191 2008-03-20 Kornél Pál <kornelpal@gmail.com>
9193 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
9196 2008-03-20 Mark Probst <mark.probst@gmail.com>
9198 * generic-sharing.c, class-internals.h: Code for putting
9199 reflection types into the runtime generic context.
9201 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
9203 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
9207 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
9209 * verify.c (VerifyContext): Added instruction prefix data to the struct.
9211 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
9213 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
9215 * verify.c (do_cast): Let the result value keep the boxed status.
9217 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
9219 2008-03-17 Jb Evain <jbevain@novell.com>
9221 * reflection.c: when running on a 2.0 runtime, emit
9222 unconditionally the #~ header version as 2.0, and the
9223 CLI header version as 2.5, for symmetry's sake with csc.
9225 2008-03-16 Zoltan Varga <vargaz@gmail.com>
9227 * class.c: Remove the unused cache_interface_offsets stuff.
9229 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
9230 profiler.c: Fix warnings.
9232 2008-03-16 Mark Probst <mark.probst@gmail.com>
9234 * generic-sharing.c, class-internals.h: Support for putting
9235 methods into the runtime generic context.
9237 2008-03-16 Zoltan Varga <vargaz@gmail.com>
9239 * class.c (mono_class_setup_fields): Ignore calls made to this function for
9240 classes which are generic instances of not-yet finished typebuilders. Fixes
9243 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
9245 2008-03-15 Zoltan Varga <vargaz@gmail.com>
9247 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
9249 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
9250 field, replace it with a hash table in MonoDynamicImage.
9252 * reflection.c (inflate_mono_method): Access the generic definition object from
9253 image->generic_def_objects instead of imethod->reflection_info.
9255 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
9257 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
9259 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
9260 function in reflection.c so it is easier to keep in sync with the dynamic image
9263 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
9264 mono_image_close ().
9266 2008-03-15 Mark Probst <mark.probst@gmail.com>
9268 * class.c (mono_class_generic_sharing_enabled): Disable generic
9269 sharing for all architectures except AMD64 and x86 to fix build.
9271 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
9273 * verify.c: Use the generic definition MonoGenericContext when available.
9274 Remove code for checking generics instance compatibility in favor of
9275 mono_class_is_assignable_from.
9277 2008-03-14 Mark Probst <mark.probst@gmail.com>
9279 * marshal.c, marshal.h, metadata-internals.h, image.c,
9280 wrapper-types.h: New wrapper for invoking a shared static method
9281 without having to pass the runtime generic context argument.
9283 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
9285 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
9287 2008-03-14 Zoltan Varga <vargaz@gmail.com>
9289 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
9291 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
9292 create a token from a FieldOnTypeBuilderInst.
9293 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
9294 (resolve_object): Ditto.
9296 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
9297 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
9299 2008-03-14 Martin Baulig <martin@ximian.com>
9301 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
9303 * debug-mono-symfile.h
9304 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
9305 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
9307 2008-03-10 Martin Baulig <martin@ximian.com>
9309 * debug-mono-symfile.h
9310 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
9311 `lexical_block_table_offset'.
9312 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
9314 (MonoSymbolFile): Added `version'.
9317 (MonoDebugLexicalBlockEntry): Removed.
9318 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
9321 * mono-debug.c (mono_debug_add_method): Don't compute lexical
9322 blocks here; the debugger now does this internally.
9324 2008-02-27 Martin Baulig <martin@ximian.com>
9326 * object.c (mono_runtime_exec_main): Call
9327 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
9328 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
9330 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
9332 * verify.c (verify_type_compatibility_full): Allow native int to be converted
9333 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
9335 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
9337 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
9338 ldftn with a virtual method.
9340 2008-03-13 Geoff Norton <gnorton@novell.com>
9342 * decimal.c: Only include memory.h if the platform has it.
9344 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
9346 * assembly.c, class.c, metadata-internals.h: make sure public key
9347 tokesns are compared in a case-insensitive way. Also, all
9348 the lookups in the GAC use a lowercase public key token
9349 (gaacutil already does the lowercasing on install). Fixes
9352 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
9354 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
9357 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
9359 * image.c: when someone loads a mscorlib from a file, return the
9360 currently loaded mscorlib (fixes bug #369253).
9362 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
9364 * class.c: handle types with no parents by forcing them to have
9365 System.Object as a parent and marking them as broken (this currently
9366 allows the first part of bug #369173 to work as well, likely because
9367 we don't check for typeload exceptions everywhere yet).
9369 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
9371 * class.c: more complete check that types belong to corlib
9372 (fixes second part of bug #369173).
9374 2007-03-10 Bill Holmes <billholmes54@gmail.com>
9376 * generic-sharing.c: Including glib.h for the MSVC builds to define
9377 "inline" to "__inline" before including mono-membar.h.
9379 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
9380 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
9383 Contributed under MIT/X11 license.
9385 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
9387 * verify.c (do_invoke_method): Remove return type validation.
9389 * verify.c (do_ret): Do return type validation at return site instead of
9392 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
9394 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
9396 * verify.c: Some todos cleaned and improved a few error messages.
9398 2008-03-08 Zoltan Varga <vargaz@gmail.com>
9400 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
9402 2008-03-07 Zoltan Varga <vargaz@gmail.com>
9404 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
9405 system types correctly.
9407 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
9410 2008-03-06 Zoltan Varga <vargaz@gmail.com>
9412 * assembly.c (build_assembly_name): Fix a warning.
9414 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
9416 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
9417 the called function takes an object type argument. Fixes storing or
9418 valuetypes across remoting as well as reducing memory usage.
9419 * image.c, metadata-internals.h: remove now unused ldfld_remote and
9420 stfld_remote wrapper caches.
9422 2008-03-06 Zoltan Varga <vargaz@gmail.com>
9424 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
9427 * reflection.c (mono_image_register_token): New helper function to save
9428 a token->object mapping.
9430 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
9433 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
9434 one dimension arrays. Fixes #367670.
9435 (mono_reflection_get_type_internal): Ditto.
9437 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9439 * marshal.c: mono_load_remote_field_new() always returns object.
9440 so use the proper signature (fixes bug #366445).
9442 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9444 * class-internals.h (MonoMethod): Remove unused uses_this flag,
9445 add an 'inline_failure' flag instead.
9447 2008-03-04 Mark Probst <mark.probst@gmail.com>
9449 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
9450 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
9451 contains the location of "this", used for exception handling.
9453 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9455 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
9456 their size on all platforms for perf reasons.
9458 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9460 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
9463 * object-internal.h: Same.
9465 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9467 * reflection.h: Fix the build I just broke.
9469 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9471 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
9472 Test if a token is valid, this remove explicit usage of
9473 MonoDynamicImage::tokens from the verifier code.
9475 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
9477 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
9478 instead of direct access to MonoDynamicImage::tokens.
9480 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9482 * verify.c (token_bounds_check): Fix the build I just broke.
9484 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9486 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
9488 * verify.c (verifier_load_method): Fixed the errors message.
9490 * verify.c (mono_method_verify): Fixed a debug message.
9492 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
9494 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
9495 mono-perfcounters.h, class-internals.h: support for predefined
9496 writable counters, query of categories and counters, bugfixes.
9498 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
9500 * verify.c (do_refanytype): Verify the refanytype opcode.
9502 * verify.c (mono_method_verify): Use do_refanytype.
9504 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
9506 * verify.c (do_mkrefany): Verify the mkrefany opcode.
9508 * verify.c (mono_method_verify): Use do_mkrefany.
9510 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
9512 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
9513 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
9516 2008-02-27 Zoltan Varga <vargaz@gmail.com>
9518 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
9519 the type load exception.
9521 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
9523 * verify.c: Added a few FIXME for method signatures
9525 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
9526 of mono_method_get_signature and get vararg call working. Removed unused
9527 checks for return value.
9529 * verify.c (do_refanyval): Verify the refanyval opcode.
9531 * verify.c (mono_method_verify): Implemented verification of arglist and
9534 2008-02-27 Zoltan Varga <vargaz@gmail.com>
9536 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
9537 vtypes to marshal.c.
9539 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
9540 it works for AOT as well.
9542 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
9544 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
9545 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
9546 the system time is adjusted.
9548 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
9550 * icall.c, icall-def.h: use the new time functions (fixes the
9551 non-monotonic behaviour of TickCount).
9553 2008-02-26 Zoltan Varga <vargaz@gmail.com>
9555 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
9556 it breaks the build.
9558 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
9559 cattr is not finished yet.
9561 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
9563 * verify.c: Proper token validation for field, method and type.
9565 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
9567 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
9569 * loader.c (method_from_memberref): Generate type load error instead of method missing
9570 if the type is not found.
9572 2008-02-23 Zoltan Varga <vargaz@gmail.com>
9574 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
9575 some of the conversions caused the generation of a marshal directive exception.
9577 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
9579 verify.c: Report which exception should be thrown by the JIT.
9580 Added a lot of FIXME notes.
9582 2008-02-22 Mark Probst <mark.probst@gmail.com>
9584 * generic-sharing.c: Runtime generic context slots are not
9585 instantiated on init anymore. Instead, provide function to do the
9586 instantiating on demand.
9588 * class-internals.h: Added vtable to runtime generic context.
9589 Macros for encoding direct and indirect slot offsets in one
9592 2008-02-21 Mark Probst <mark.probst@gmail.com>
9594 * object.c, generic-sharing.c: Moved some generic sharing code
9595 from object.c to generic-sharing.c.
9597 * generic-sharing.c: Added support for extensible runtime generic
9600 * metadata-internals.h: Two new hash tables in MonoImage for
9601 extensible runtime generic context support.
9603 * domain.c: Unregister generic vtables upon domain unloading.
9605 * image.c: Destroy new hash tables upon image unloading.
9607 * metadata.c: Unregister generic subclasses upon image unloading.
9609 * class-internals.h: New data structure for runtime generic
9610 context template. New fields in the runtime generic context for
9613 * Makefile.am: Added generic-sharing.c.
9615 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
9617 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
9618 there is a pending loader exception, raise it.
9620 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
9623 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
9628 2008-02-20 Zoltan Varga <vargaz@gmail.com>
9630 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
9632 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
9634 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
9635 ref-only requests for compatibility with MS.
9637 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
9639 * reflection.c (mono_custom_attrs_from_method): Don't silently
9640 return an empty list for generic method instances.
9641 (mono_custom_attrs_from_param): Likewise.
9643 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
9644 Raja R Harinath <harinath@hurrynot.org>
9647 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
9648 * class.c (mono_class_inflate_generic_method_full): Initialize it
9649 when a fully-open method is instantiated.
9650 * metadata.c (inflated_method_equal, inflated_method_hash): Update
9652 * reflection.c (inflate_mono_method): Don't create a temporary context.
9654 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
9656 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
9657 Compute correct value, to prepare for imethod->reflection_info going away.
9659 2008-02-19 Zoltan Varga <vargaz@gmail.com>
9661 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
9663 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
9665 * verify.c: Implement skip visibility flag.
9667 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
9669 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
9670 which contains an extra field to tell the kind of exception that should be thrown.
9672 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
9674 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
9676 * loader.c (mono_method_get_param_names): Initialize 'klass' after
9677 'method' is updated.
9679 2008-02-11 Zoltan Varga <vargaz@gmail.com>
9681 * class.c (mono_class_layout_fields): Set class->min_align for classes using
9682 explicit layout as well. Fixes #360375.
9684 2008-02-11 Geoff Norton <gnorton@novell.com>
9686 * loader.c: Guard and dereference against inflated generic methods
9688 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
9690 * class.c: Include Retargetable spec in assembly name.
9691 * assembly.c: Always include PublicKeyToken spec in assembly name
9692 (with value "null" if assembly is not signed), and include
9694 * icall-def.h: Added icall for Assembly.get_fullname.
9695 * icall.c: Added icall returning the fullname of an assembly.
9697 2008-02-09 Zoltan Varga <vargaz@gmail.com>
9699 * class.c (mono_class_setup_vtable_general): Add a missing call to
9700 mono_class_setup_methods () which is needed in the AOT case.
9702 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
9704 * verify.c (mono_type_get_stack_name): Added. Return the name for the
9705 stack type of the given MonoType.
9707 * verify.c (verify_type_compatibility_full): Handle the void type.
9709 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
9710 way stack merging works.
9712 * verify.c (store_local): Improved verification message.
9714 * verify.c (do_branch_op): If the merging is invalid, the method
9715 is unverifiable and not invalid. Improved error message.
9717 * verify.c (merge_stacks): Properly merge a boxed valuetype and
9718 a reference type diferent than System.Object. Improved error
9721 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
9723 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
9725 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
9726 type of an enum even if the argument is byref.
9728 * verify.c: Replace all explicit uses of enumtype and enum_basetype
9729 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
9731 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
9733 *verify.c (verify_type_compatibility_full): Make enum types
9734 compatible with their base types.
9736 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
9737 types are compatible for the special case of a boxed valuetype and
9740 * verify.c (verify_stack_type_compatibility): The function
9741 is_compatible_boxed_valuetype was extracted from here.
9743 * verify.c (push_arg): Only set ctx->has_this_store if the method
9746 * verify.c (do_ldelem): Fixed a typo in an error message and added
9747 strict check for mixing int32 and native int as the array type
9750 * verify.c (merge_stacks): Consider boxed valuetypes in the
9751 compatibility checks.
9753 2008-02-07 Massimiliano Mantione <massi@ximian.com>
9754 * profiler.h: (MonoGCEvent): Added start-stop the world events.
9756 2008-02-06 Massimiliano Mantione <massi@ximian.com>
9757 *class.c: use_new_interface_vtable_code: renamed the env var to have
9758 a "MONO_" prefix, and fix the logic to enable it by default.
9760 2008-02-06 Massimiliano Mantione <massi@ximian.com>
9762 mono_class_setup_vtable_general: rewrote the way in which interface
9763 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
9764 makes the code more maintainable.
9765 For now the old code is still there, and can be activated setting
9766 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
9768 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
9770 * verify.c: guarded some debug functions around and #ifdef.
9772 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
9774 2008-02-06 Zoltan Varga <vargaz@gmail.com>
9776 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
9777 changes for now since they seem to break too many things.
9779 2008-02-05 Mark Probst <mark.probst@gmail.com>
9781 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
9782 mono_marshal_find_nonzero_bit_offset): Added macro and function
9783 for finding the byte- and bit-offset of a bitfield within a
9786 2008-02-05 Zoltan Varga <vargaz@gmail.com>
9788 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
9789 (mono_marshal_get_struct_to_ptr): Ditto.
9791 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
9794 2008-02-03 Zoltan Varga <vargaz@gmail.com>
9796 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
9797 between methods for non-corlib types.
9799 2008-02-02 Geoff Norton <gnorton@novell.com>
9801 * loader.c (mono_method_get_param_names): Populate the parameter name for
9802 generic parameters as well. (Fixes #342536)
9804 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
9806 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
9808 * verify.c (do_invoke_method): Fix for calling with byref structs.
9810 * verify.c (do_cast): push a boxed value type based on the type token and not
9813 2008-01-31 William Holmes <billholmes54@gmail.com>
9815 * process.c (process_module_string_read): Check the size returned form
9816 VerQueryValue to avoid out of memory exception.
9818 2008-01-30 Zoltan Varga <vargaz@gmail.com>
9820 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9821 Handle properly modules which are not in the moduleref table. Fixes
9824 2008-01-29 Zoltan Varga <vargaz@gmail.com>
9826 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
9827 the dynamic case which is now in managed code.
9828 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
9830 * marshal.c (mono_string_to_bstr): Fix a warning.
9831 (init_com_provider_ms): Ditto.
9833 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
9835 * exception.c (mono_get_exception_out_of_memory): New helper function.
9837 2008-01-28 Jonathan Chambers <joncham@gmail.com>
9839 * marshal.c: Add support for BSTR marshalling
9840 using other COM systems.
9842 Code is contributed under MIT/X11 license.
9844 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9846 * object.c (mono_runtime_invoke_array): reverted previous
9847 commit as it breaks the build.
9849 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9851 * object.c (mono_runtime_invoke_array): Verify arguments for
9852 invalid types. Fixes #348522.
9854 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9856 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
9857 non-final virtual calls using call.
9859 * verify.c (do_invoke): fixed some TODOs.
9861 * verify.c (push_arg): set has_this_store for "ldarga 0".
9863 2008-01-27 Zoltan Varga <vargaz@gmail.com>
9865 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
9866 which belong to an inflated class. Fixes #356531.
9868 2008-01-26 Robert Jordan <robertj@gmx.net>
9870 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
9871 which resort to FindFirstFile when a certain error condition
9872 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
9873 Code is contributed under MIT/X11 license.
9875 2008-01-24 Jonathan Chambers <joncham@gmail.com>
9877 * marshal.c (emit_marshal_string): Fix out string marshalling
9878 to use specified encoding. Fixes #323900.
9880 Code is contributed under MIT/X11 license.
9882 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
9884 * class.c (mono_class_inflate_generic_method_full): Don't modify
9885 iresult->context after cache check.
9887 2008-01-23 Zoltan Varga <vargaz@gmail.com>
9889 * class.c (mono_class_inflate_generic_method_full): Change the
9890 struct assignments to memcpy for better visibility and add some comments.
9892 2008-01-23 Dick Porter <dick@ximian.com>
9894 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
9895 procedure, and make it work on windows.
9897 2008-01-22 Zoltan Varga <vargaz@gmail.com>
9899 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
9900 a MonoReflectionTypeBuilder since it is always of that type.
9902 * reflection.c (mono_type_get_object): Remove an unneccesary check.
9904 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
9906 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
9908 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
9910 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
9912 * reflection.c (mono_reflection_create_runtime_class): Remove already created
9913 instantiations from the type cache.
9915 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9917 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
9919 * verify.c (do_unbox_value): push a controled mutability managed pointer.
9921 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9923 * verify.c (do_ldstr): added, verifies if the #US token is valid.
9925 * verify.c (mono_method_verify): removed old TODO
9927 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9929 * verify.c (do_newobj): add visibility check.
9931 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9933 * verify.c (do_load_function_ptr): add visibility check.
9935 2008-01-21 Massimiliano Mantione <massi@ximian.com>
9937 mono_generic_class_get_class: hook profiler events.
9938 mono_field_get_offset: added to support heap-shot in the new profiler.
9939 *class.h: exported mono_field_get_offset.
9941 mono_reflection_setup_internal_class: hook profiler events.
9943 2008-01-20 Zoltan Varga <vargaz@gmail.com>
9945 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
9946 argument here too and use it to avoid checking for pending exceptions if
9949 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
9951 * assembly.c (build_assembly_name): add arg for passing the assembly
9952 flags. Do not consider a PublicKey with value "null" valid.
9953 (mono_assembly_name_parse_full): added boolean argument that will be
9954 set if the assembly name contains a PublicKeyToken spec. Added support
9955 for the Retargetable spec for which only Yes or No are allowed as valid
9956 value. Consider assembly name invalid if Retargetable spec is set, but
9957 either version, culture or public key (token) are not specified.
9958 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
9959 with implementation in assembly.c.
9960 * icall.c (fill_reflection_assembly_name): also copy assembly flags
9961 from MonoAssemblyName.
9962 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
9963 introduced argument for mono_assembly_name_parse_full to know if the
9964 assembly name has a PublicKeyToken spec, and if it has instruct
9965 fill_reflection_assembly_name to use default value for keyToken (if
9966 PublicKeyToken is null).
9968 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9970 * verify.c (mono_method_verify): fixed ovf ops with
9971 float values. They are unverifiable now.
9973 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9975 * class.c (set_failure_from_loader_error): add BadImageException to the
9976 list of exceptions that can cause a type to fail to load.
9978 * class.c (mono_class_get_exception_for_failure): same.
9980 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
9982 * verify.c (in_any_exception_block): added, check if offset
9983 is part of any exception handling clause.
9985 * verify.c (get_stack_type): added VAR and MVAR types.
9987 * verify.c (do_stobj): better error messages.
9989 * verify.c (do_cpobj): added, check cpobj.
9991 * verify.c (do_initobj): added, check initobj.
9993 * verify.c (do_sizeof): added, check sizeof.
9995 * verify.c (do_localloc): added, check localloc.
9997 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
9999 2008-01-17 Zoltan Varga <vargaz@gmail.com>
10001 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
10002 save_lmf/restore_lmf opcodes.
10004 * threads.c (mono_threads_install_notify_pending_exc): New function to
10005 install a callback notifying the JIT there is a pending exception on a thread.
10006 (mono_thread_request_interruption): Call the new callback.
10007 (mono_thread_get_and_clear_pending_exception): New function to return the
10008 exception pending on a thread.
10010 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
10011 to turn off checking for pending exceptions.
10012 (mono_marshal_get_native_wrapper): Ditto.
10014 2008-01-16 Zoltan Varga <vargaz@gmail.com>
10016 * threads-types.h: Get rid of the unnecessary extern declarations.
10018 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
10020 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
10021 return field from parent class if not private.
10022 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
10023 returns fields from parent class if they are not private.
10024 (method_nonpublic): added function to determine if a given method
10025 should be considered non-public. Returns false for private methods
10026 on parent class, and internal methods from parent on the 1.0 profile.
10027 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
10028 use method_nonpublic function to determine whether method should be
10030 (property_accessor_public): use newly introduced method_nonpublic
10031 function to determine whether accessor is non-public.
10032 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
10033 event from parent class if not private. Only return static event if
10034 Static flag is set, and only return static event from parent class if
10035 FlattenHierarchy flag is set.
10036 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
10037 include non-private events from parent class.
10039 2008-01-16 Zoltan Varga <vargaz@gmail.com>
10041 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
10044 2008-01-16 Wade Berrier <wberrier@novell.com>
10046 * security.c: Add assembly.h header to appease some warnings
10048 2008-01-16 Dick Porter <dick@ximian.com>
10050 * process.c (process_module_string_read): Remove trailing null
10051 when saving string.
10053 2008-01-16 Mark Probst <mark.probst@gmail.com>
10055 * class-internals.h: A new data structure describing the layout of
10056 a runtime generic context (MonoRuntimeGenericContextTemplate).
10058 * metadata-internals.h: Added a hash table to MonoDomain that maps
10059 from open generic classes to their runtime generic context
10062 * object.c: Building of the runtime generic context, including
10063 proper handling of generic type arguments of superclasses.
10064 Building of the runtime generic context according to the template.
10066 2008-01-15 Zoltan Varga <vargaz@gmail.com>
10068 * class.c (mono_class_setup_fields): Set field.count for generic instances.
10071 * image.c (do_mono_image_open): Pass TRUE as last_exists to
10072 mono_portability_find_file (). Fixes #325466.
10073 (mono_image_get_public_key): Fix a warning.
10075 2008-01-14 Zoltan Varga <vargaz@gmail.com>
10077 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
10079 (mono_class_from_name_case): Ditto.
10081 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
10083 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
10084 common storage for the tables used in the System/NumberFormatter class.
10086 2008-01-13 Zoltan Varga <vargaz@gmail.com>
10088 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
10090 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
10092 * verify.c (get_boxable_mono_type): check if the token is valid.
10094 * verify.c (set_stack_value): changed to add an error if an
10095 invalid type is set on stack. Changed all callers due to signature change.
10097 * verify.c (do_stobj): implement stobj validation.
10099 2008-01-11 Zoltan Varga <vargaz@gmail.com>
10101 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
10102 set container->is_method, it was set earlier.
10104 * metadata.c (type_in_image): Handle MVARs which belong to not finished
10107 * reflection.c (mono_reflection_initialize_generic_parameter): Set
10108 is_method of the generic container to TRUE for methods.
10110 2008-01-10 Zoltan Varga <vargaz@gmail.com>
10112 * metadata.c (type_in_image): Handle type parameters properly.
10114 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
10115 memory ownership of this structure.
10117 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
10119 * verify.c (get_boxable_mono_type): make typedref types been just
10120 unverifiable. check for void type.
10122 * verify.c (do_unbox_any): added, verify opcode unbox.any.
10124 * verify.c (do_load_function_ptr): accept method spec tokens.
10126 2008-01-10 Zoltan Varga <vargaz@gmail.com>
10128 * marshal.c (mono_class_native_size): Always set *align even if this is called
10131 2008-01-09 Zoltan Varga <vargaz@gmail.com>
10133 * verify.c (mono_verify_corlib): Remove this as it was not used and was
10136 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
10138 * verify.c: removed some old unused tables. A huge bunch of small fixes
10139 to things found while testing the verifier with mono basic.
10141 * verify.c (dump_stack_value): dump null literal flag to.
10143 * verify.c (verify_type_compatibility_full): fix comparison
10144 for types that have a generic super type.
10146 * verify.c (verify_stack_type_compatibility): fix compatibility
10147 between null literals and reference types. fix compatibility between
10148 boxed valuetypes and object. fix corner case test for enums.
10150 * verify.c (do_cmp_op): proper verification of cgt.un in case
10151 of reference types.
10153 * verify.c (do_invoke_method): fix error message.
10155 * verify.c (do_store_indirect
10157 * verify.c (check_is_valid_type_for_field_ops): proper verification
10158 of managed pointers to valuetypes and boxed valuetypes. proper verification
10161 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
10162 allow token to be a reference type.
10164 * verify.c (do_cast): proper handling of boxes valuetypes.
10166 * verify.c (do_stelem): proper handling of storing a boxed valuetype
10169 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
10170 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
10171 fixed the decoding of unbox_any
10173 2008-01-08 Zoltan Varga <vargaz@gmail.com>
10175 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
10177 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
10179 * verify.c (do_newobj): do delegate verification.
10181 * verify.c (verify_delegate_compatibility): perform delegate
10184 * verify.c (verify_ldftn_delegate): perform tests related to
10187 * verify.c (mono_delegate_signature_equal): perform the
10188 slightly diferent signature comparison required by delegates.
10190 * metadata.c (mono_metadata_type_equal_full): added and exported
10191 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
10192 allows signature only comparison.
10194 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
10197 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
10199 * verify.c: added a bunch of stack_slot_* functions to
10200 make access to stack slot type easier. This is required to
10201 allow optional flags, like null literal, boxed value and
10203 All access paths to IlStackDesc::stype have been changed
10204 to use these new funcions.
10205 Removed a bunch of unused functions and cleared all warnings.
10206 This patch introduces the usage of the this pointer and
10209 2008-01-07 Zoltan Varga <vargaz@gmail.com>
10211 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
10213 2008-01-06 Zoltan Varga <vargaz@gmail.com>
10215 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
10216 match managed version.
10218 * appdomain.c: Bump corlib version.
10220 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
10223 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
10225 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
10226 Set public key token to zero-length byte array if assembly is not
10229 2008-01-05 Zoltan Varga <vargaz@gmail.com>
10231 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
10232 writing a vtype array elem.
10234 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
10236 * assembly.c (build_assembly_name): return FALSE if length of token is
10237 not 16 (if not "null").
10238 (mono_assembly_name_parse_full): return FALSE if value of version,
10239 culture, token or key is 0.
10240 * icall.c (fill_reflection_assembly_name): add boolean arguments to
10241 specify whether public key and public key token must be set to default
10242 value (zero-length byte array) if not available. Set versioncompat to
10243 SameMachine. If public key is available or the default is set, then
10244 set PublicKey flag.
10245 (ves_icall_System_Reflection_Assembly_FillName): if no public key
10246 is available, use empty byte array as default value. On the 2.0
10247 profile, use default value for public key token if not set.
10248 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
10249 profile, use default value for public key if not set. On the 2.0
10250 profile, use default value for public key token if not set.
10251 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
10252 default values for public key and public key token.
10254 2008-01-05 Zoltan Varga <vargaz@gmail.com>
10256 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
10257 field to keep it in synch with the managed object.
10259 * marshal.c (emit_marshal_object): Add support for byref marshalling of
10260 delegates. Fixes #351520.
10262 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
10263 contains defined memory.
10265 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
10267 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
10269 * sgen-gc.c (check_consistency): New helper function to do a consistency check
10270 of the GC data structures.
10272 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
10274 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
10276 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
10278 (mono_array_clone_in_domain): Ditto.
10279 (mono_array_clone_in_domain): Ditto.
10281 * threads.c (start_wrapper): Register the thread start argument as a GC root.
10282 (cache_culture): Use a write barrier.
10284 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
10285 (ves_icall_get_property_info): Ditto.
10287 * object.h (MONO_STRUCT_SETREF): New macro.
10289 * class-internals.h (MonoStats): Add some GC statistics.
10291 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
10293 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
10295 * exception.c (mono_exception_from_name_two_strings):
10296 Break from loop after method is found.
10298 2008-01-04 Dick Porter <dick@ximian.com>
10300 * process.c (process_module_string_read): Rename variable to
10301 reflect correct usage, after fixing bug 345972.
10303 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
10305 * verify.c (mono_type_create_fnptr_from_mono_method):
10306 created a MonoType function pointer instance to be used during
10307 verification. The verifier releases this memory at end.
10309 * verify.c (mono_method_is_constructor): extracted repeated
10310 checks for constructor into a single class.
10312 * verify.c (do_push_field): use new extracted method
10313 for constructor check.
10315 * verify.c (do_newobj): same.
10317 * verify.c (do_ldftn): renamed to do_load_function_ptr
10318 and make it verify ldvirtftn too.
10320 * verify.c (mono_method_verify: proper verification
10321 of ldvirtftn. release created MonoMethod instances.
10323 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
10325 * verify.c (token_bounds_check): added.
10327 * verify.c (do_ldftn): added.
10329 * verify.c (mono_method_verify): proper verificartion of ldftn.
10331 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
10333 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
10334 than the table row count. It's the resposibility of the caller to
10335 make the bounds check and raise the correct error.
10337 * metadata.c (mono_metadata_decode_row_col): Same.
10339 * loader.c (mono_get_method_from_token): perform bounds check
10340 on token for methoddef table.
10342 2007-12-29 Miguel de Icaza <miguel@novell.com>
10345 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
10346 assert into a negative result, the managed code already coped with
10349 Some folks on Windows reported this error.
10351 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
10353 * appdomain.c: Bump corlib version.
10355 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
10356 CultureInfo.CreateCulture to create CultureInfo for name.
10357 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
10358 create CultureInfo for name. Fixes bug #347174.
10360 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
10362 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
10365 * verify.c (is_valid_branch_instruction): allow branching to the
10366 first instruction of the protected block.
10368 * verify.c (is_valid_cmp_branch_instruction): same.
10370 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
10371 avoid double initialization.
10373 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
10374 detect which cases the eval stack should just be copied.
10376 * verify.c (mono_method_verify): check if the eval stack
10377 is empty when entering a protected block.
10379 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
10381 * verify.c: added is_clause_in_range, is_clause_inside_range,
10382 is_clause_nested and verify_clause_relationship. They perform
10383 the verifications stated in P1 12.4.2.7.
10385 * verify.c (mono_method_verify): remove some unused variables,
10386 add the new exception clause checks, add instruction border
10387 checks for protected block start/end, improved some error
10388 messages and fixed a bug in the way invalid instruction access
10391 2007-12-26 Zoltan Varga <vargaz@gmail.com>
10393 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
10394 from GC 7.0 if available.
10396 * object.c: Remove an unused define.
10398 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
10400 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
10402 * null-gc.c (mono_gc_make_descr_for_array): Implement.
10404 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
10406 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
10407 to take the same arguments as the other make_descr functions.
10409 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
10411 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
10414 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
10417 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
10418 call to boehm-gc.c.
10420 * boehm-gc.c (mono_gc_register_root): Fix a warning.
10422 * null-gc.c (mono_gc_register_root): Fix a warning.
10424 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
10426 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
10427 (mono_gc_base_init): Call GC_init ().
10429 * null-gc.c: Define mono_gc_register_root () as a no-op.
10431 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10433 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
10435 * verify.c: add prototype for merge_stacks at top
10437 * verify.c (do_switch): added.
10439 * verify.c (merge_stacks): on some cases the stack merging
10440 was not happening properly. Unequal stack sizes at merge
10441 points should be invalid.
10443 * verify.c (mono_method_verify): added more debug info on stack state.
10444 verify switch properly.
10446 2007-12-24 Zoltan Varga <vargaz@gmail.com>
10448 * method-builder.h: New file, moved the mono_mb_ declarations here from
10451 * boehm-gc.c marshal.c: Include method-builder.h.
10453 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
10455 * marshal.c: Remove some code which is now in method-builder.c.
10457 2007-12-23 Zoltan Varga <vargaz@gmail.com>
10459 * method-builder.c: New file, extraction of the method builder functionality
10462 * marshal.c: Move the mb functions into method-builder.c.
10464 * marshal.h marshal.c: Export some mono_mb_... functions.
10466 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
10468 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
10471 * class.c (mono_class_get_full): Check the token type in the dynamic case.
10473 * loader.c (mono_field_from_token): Ditto.
10475 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
10478 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
10481 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
10482 a helper function for setting it.
10484 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
10487 * assembly.c: Significally simplify code now that referenced assemblies are
10488 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
10490 * threads.h: Don't include the internal threads-types.h header file. Fixes
10493 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
10495 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
10496 instructions that were target of branches or are at protected block boundaries.
10498 * verify.c (in_same_block): handle filter clauses.
10500 * verify.c (is_valid_branch_instruction): added. checks the target of
10501 instructions br or brtrue/false.
10503 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
10504 binary branch instructions such as beq and bge.
10506 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
10507 and made it pin the instruction as been part of the exception block.
10509 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
10512 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
10515 * verify.c (do_ret): ret from a protected block is unverifiable and
10518 * verify.c (do_static_branch): verify br and br.s instructions.
10520 * verify.c (merge_stacks): add extra param to support detection
10521 of branches in the middle of instructions.
10523 * verify.c (mono_method_verify): verify branches and exception blocks
10524 that target the middle of instructions. Proper verification of br and br.s.
10526 2007-12-21 Zoltan Varga <vargaz@gmail.com>
10528 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
10529 skip_visibility field.
10530 (reflection_methodbuilder_from_dynamic_method): Ditto.
10532 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
10533 registrations. Fixes #348193.
10535 * threads.h: Move the internal mono_thread_get_pending_exception () to
10536 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
10538 2007-12-20 Zoltan Varga <vargaz@gmail.com>
10540 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
10541 icall registration. Fixes #348193.
10543 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
10544 for corlib classes into object. Fixes #349621.
10546 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
10548 * icall.c (property_accessor_nonpublic): new function to determine
10549 whether an accessor allows a property to be considered non-public.
10550 Returns false for private accessor(s) from parent class, and internal
10551 accessor(s) from parent on 2.0 profile (and higher).
10552 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
10553 to determine whether property should be included if NonPublic flag
10554 is set. Fixes bug #349078.
10556 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
10558 * verify.c (init_stack_with_value): added.
10560 * verify.c (mono_method_verify): extracted common
10561 code for exception initialization into init_stack_with_value.
10563 * verify.c (mono_method_verify): initialize the exception
10564 for handler clauses as well.
10566 * verify.c (mono_method_verify): fix the exception clause
10567 ordering rules, it should use handler end offset and not
10570 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
10572 * rawbuffer.c: remove useless warning.
10574 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
10576 * threads.h, threads-types.h: move functions to the correct header
10577 (fixes bug#349952).
10579 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10581 * verify.c (mono_method_verify): proper verification
10582 of exception handling clauses ranges and fallthru in
10583 and out of protected blocks.
10585 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10587 * verify.c (mono_method_verify): fixed compilation issue.
10589 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10591 * verify.c (mono_method_verify): a printf slipped in, changed
10592 to use verifier debug macro.
10594 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
10596 * verify.c (is_correct_leave): check for filter clauses.
10598 * verify.c (do_filter): added.
10600 * verify.c (mono_method_verify): property verification of leave.
10603 2007-12-18 Mark Probst <mark.probst@gmail.com>
10605 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
10606 Win32 build, until we figure out how to do the proper thing on
10609 2007-12-17 Zoltan Varga <vargaz@gmail.com>
10611 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
10612 by the previous patch.
10614 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
10615 the assembly resolve handler for refonly assemblies.
10617 2007-12-17 Mark Probst <mark.probst@gmail.com>
10619 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
10620 Make sure only one thread is allowed to commence shutdown, and
10621 don't allow new threads to be started once shutdown is in
10624 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
10626 * verify.c (is_correct_endfilter): added.
10628 * verify.c (is_unverifiable_endfilter): added.
10630 * verify.c (do_endfilter): added.
10632 * verify.c (mono_method_verify): property verification of endfilter
10633 and fixed a corner case or endfinally.
10635 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
10637 * verify.h: new flags to support fail fast of unverifiable code and
10638 do non-strict verification. Non-strict verification is required to
10639 have MS runtime compatibility. There are a huge amount of unverifiable
10640 code that it accepts as verifiable. The strict mode verifies the code
10642 Non-strict mode will be required in cases where code needs to be
10643 accepted as verifiable but fails under strict mode.
10645 * pedump.c: added support to fail fast and non-strict verification.
10647 * verify.c: added support for both fail fast and non-strict verification.
10649 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
10651 * verify.c (is_correct_endfinally): added.
10653 * verify.c (mono_method_verify): property verification of endfinally.
10655 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10657 * verify.c (in_any_block): check for filter clauses.
10659 * verify.c (is_correct_rethrow): added.
10661 * verify.c (mono_method_verify): property verification of rethrow.
10663 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
10665 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10667 * verify.c (do_throw): added.
10669 * verify.c (mono_method_verify): property verification of throw
10671 2007-12-11 Zoltan Varga <vargaz@gmail.com>
10673 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
10674 assemblies. Fixes #346425.
10676 2007-12-10 Zoltan Varga <vargaz@gmail.com>
10678 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
10681 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
10683 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
10684 prevent asserts when this is called with a token which might not be valid.
10686 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
10687 lookup_dynamic_token_class with valid_token == FALSE.
10689 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
10691 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
10693 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
10695 2007-12-10 Mark Probst <mark.probst@gmail.com>
10697 * gc.c: Don't delay threadpool thread finalization unless Mono is
10700 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10702 * threads.c: turn an assert into a non-fatal warning.
10704 2007-12-09 Robert Jordan <robertj@gmx.net>
10706 * icall.c (GetVirtualMethod): Add missing argument validation.
10708 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10710 * verify.c (do_cast): added.
10712 * verify.c (mono_method_verify): property verification of castclass and isinst.
10715 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10717 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
10719 * verify.c (do_stelem): added.
10721 * verify.c (mono_method_verify): property verification of stelem.X.
10723 2007-12-07 Mark Probst <mark.probst@gmail.com>
10725 * class.c, class-internals.h: Introduce an environment variable
10726 (MONO_GENERIC_SHARING) through which the extent of generic code
10727 sharing can be controlled (share all classes, share only corlib
10728 classes, or share nothing).
10730 * object.c: Only create runtime generic context for classes for
10731 which sharing is enabled.
10733 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10735 * verify.c (do_ldelem): refactor it to work with ldelem.any.
10737 * verify.c (mono_method_verify): property verification of ldelem.any.
10739 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10741 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
10742 added ldelem.X opcodes.
10744 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
10746 * verify.c: proper verification of ldelem.X
10748 2007-12-06 Zoltan Varga <vargaz@gmail.com>
10750 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
10752 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
10754 * verify.c (mono_method_verify): null literal requires special handling,
10755 the value pushed on stack need to be flagged as so.
10757 * verify.c (do_ldelema): Verify ldelema properly.
10759 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
10761 * verify.c: Verify ldlen properly.
10763 2007-12-05 Zoltan Varga <vargaz@gmail.com>
10765 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
10766 to the target object's type. Fixes #346160.
10768 2007-12-05 Dick Porter <dick@ximian.com>
10770 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
10771 Solaris needs the same workaround as BSD-derived systems. Fixes
10772 bug 323524, patch by Burkhard Linke
10773 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
10775 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
10777 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
10778 handle to use when error dialog is shown; otherwise, update mask
10779 to show no error dialog when an error occurs.
10781 2007-12-03 Zoltan Varga <vargaz@gmail.com>
10783 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
10785 * class.c (mono_class_get_field_default_value): New helper function to initialize
10786 field->def_type and field->data.
10788 2007-11-30 Zoltan Varga <vargaz@gmail.com>
10790 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
10793 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
10795 * marshal.c: Avoid depending on delegate->method_info being set.
10797 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
10799 * object.c (mono_delegate_ctor): Set delegate->method.
10801 * object-internals.h (struct _MonoDelegate): Add 'method' field.
10803 * appdomain.c: Bump corlib version.
10805 2007-11-27 Raja R Harinath <harinath@gmail.com>
10807 * metadata.c (mono_generic_inst_equal_full): Short-circuit
10808 equality check if we're comparing canonicalized MonoGenericInsts.
10810 2007-11-23 Zoltan Varga <vargaz@gmail.com>
10812 * class.c (generic_array_methods): Call mono_class_setup_methods () before
10813 accessing class->methods.
10815 2007-11-22 Dick Porter <dick@ximian.com>
10817 * threads.c: Ensure that the synch_cs is set before trying to use
10820 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
10822 * profiler.c: r89126 broke the statistial profiler, unbreak.
10824 2007-11-22 Martin Baulig <martin@ximian.com>
10826 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
10829 (mono_debug_debugger_version): Bump to 3.
10830 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
10831 -> mono_debugger_class_initialized().
10833 * mono-debug-debugger.c
10834 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
10837 (mono_debugger_start_class_init_func): Removed.
10838 (mono_debugger_class_loaded_methods_func): Added.
10839 (mono_class_setup_methods): Call it here.
10841 2007-11-22 Martin Baulig <martin@ximian.com>
10844 (mono_debug_add_delegate_trampoline): New public method.
10845 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
10848 (MonoSymbolTable): Added `global_data_table'.
10849 (MonoDebuggerTypeKind): Removed.
10851 2007-11-21 Zoltan Varga <vargaz@gmail.com>
10853 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
10856 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10858 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
10860 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
10862 2007-11-20 Martin Baulig <martin@ximian.com>
10864 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
10866 * mono-debug-debugger.c
10867 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
10868 (mono_debugger_remove_breakpoint): Likewise.
10869 (mono_debugger_check_breakpoints): Likewise.
10870 (mono_debugger_register_class_init_callback): New public method.
10871 (mono_debugger_remove_class_init_callback): Likewise.
10872 (mono_debugger_add_type): Likewise.
10874 * mono-debug-debugger.h
10875 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
10877 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
10879 * class.c: more interface implementations needed for the
10880 array enumerator (fixes bug #341112).
10882 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
10884 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
10885 fix ParamName of ArgumentNullExceptions.
10887 2007-11-17 Miguel de Icaza <miguel@novell.com>
10889 * reflection.c (mono_reflection_encode_sighelper): Generate the
10890 modopts and modreqs. I have a useless test that crashes monodis,
10891 but that shows the code working.
10893 2007-11-17 Zoltan Varga <vargaz@gmail.com>
10895 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
10896 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
10898 2007-11-15 Dick Porter <dick@ximian.com>
10900 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
10901 When joining a thread, it's the thread that's calling Join that
10902 gets WaitSleepJoin state not the target. Fixes the standalone
10903 test case in bug 334740, and hopefully the whole bug too.
10905 2007-11-15 Dick Porter <dick@ximian.com>
10907 * process.c: Read file version info from the files pointed at by
10908 process modules, not the current process. Fixes bug 315969.
10910 Use windows typedef names in some places to fix warnings on the
10913 2007-11-15 Mark Probst <mark.probst@gmail.com>
10915 * image.c, metadata-internals.h: Added a generic_class_cache hash
10916 to MonoImage for looking up generic classes when sharing generics.
10918 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10920 * sgen-gc.c: warning cleanups.
10922 2007-11-15 Zoltan Varga <vargaz@gmail.com>
10924 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
10925 inherited properties.
10927 2007-11-14 Mark Probst <mark.probst@gmail.com>
10929 * object.c, class-internals.h: Added more information to the
10930 runtime generic context.
10932 2007-11-13 Zoltan Varga <vargaz@gmail.com>
10934 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
10935 instead of just the target method. Generalize the abstract method handling to
10936 handle any non-static method.
10938 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10939 mono_marshal_get_delegate_invoke () signature change.
10941 2007-11-13 Mark Probst <mark.probst@gmail.com>
10943 * class.c, class-internals.h: Made
10944 mono_type_get_basic_type_from_generic () public. Fixed member
10945 access check for shared generics.
10947 * loader.c: Don't insert field into field cache if it's part of a
10948 non-inflated generic class.
10950 * domain.c, domain-internals.h: The generic sharing context is now
10951 part of the jit info data structure. Added two accessor
10954 2007-11-12 Zoltan Varga <vargaz@gmail.com>
10956 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
10957 the array Get/Set/Address methods, since the JIT inlines them.
10959 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
10961 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
10962 (mono_image_init): Initialize runtime_invoke_direct_cache.
10964 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10965 mono_marshal_get_delegate_invoke signature change.
10967 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
10968 an additional argument. Add support for invoking abstract methods.
10970 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
10972 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
10974 2007-11-09 Mark Probst <mark.probst@gmail.com>
10976 * class.c: Do field layout for open generic classes as well.
10978 2007-11-09 Mark Probst <mark.probst@gmail.com>
10980 * gc.c, gc-internal.h: Don't finalize threadpool threads with
10981 other objects, because the threadpool is still around. Put them
10982 in a list instead and after finalizing all other objects in the
10983 root domain shut down the thread pool and then finalize the
10984 threads. Fixes bug #337383.
10986 * threads.c, thread-types.h: New mono_thread_create_internal()
10987 function for marking a thread with the threadpool flag before it
10988 started. Set synch_cs to NULL after freeing it.
10990 * threadpool.c: Mark threadpool threads before they start.
10992 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10994 * reflection.h, reflection.c: don't export random functions
10995 and lazy load dbnull and missing objects.
10997 2007-11-07 Jonathan Chambers <joncham@gmail.com>
10999 * class.c: Initialize COM types if COM interfaces
11000 are present (not just COM classes).
11002 Code is contributed under MIT/X11 license.
11004 2007-11-07 Massimiliano Mantione <massi@ximian.com>
11006 create_dynamic_mono_image: hook module profiler events (dynamic case).
11007 mono_image_basic_init: hook assembly profiler events (dynamic case).
11009 2007-11-07 Massimiliano Mantione <massi@ximian.com>
11011 simple_appdomain_unload: completely terminate the profiler
11012 instead of only processing the statistical samples.
11013 simple_shutdown: make sure this is really called exactly once,
11014 even in multithreaded applications, and always listen to
11016 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
11017 here, the "[un]load" functions will do it.
11018 Fixes bugs #333791 and #325261.
11020 2007-11-07 Geoff Norton <gnorton@novell.com>
11022 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
11023 rather than depend on __APPLE__.
11025 2007-11-07 Mark Probst <mark.probst@gmail.com>
11027 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
11029 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
11031 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
11032 UTF16 MonoString. Fix the crash from bug #335488
11034 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
11036 * marshal.c: Correct (for non-Win32 OS) length != size in
11037 mono_string_from_bstr. Fix #339530.
11039 2007-11-06 Geoff Norton <gnorton@novell.com>
11041 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
11044 2007-11-05 Kornél Pál <kornelpal@gmail.com>
11046 * process.c: Added run-time GetProcessId API detection for Windows.
11048 2007-11-04 Miguel de Icaza <miguel@novell.com>
11050 * reflection.c (mono_param_get_objects): If a parameter has the
11051 attribute [System.Runtime.InteropServices.Optional] we should
11052 set the DefaultValue of the ParameterInfo to be
11053 System.Reflection.Missing instead of DBNull.
11057 (mono_get_reflection_missing_object): New method,
11058 returns the System.Reflection.Missing.Value singleton instance.
11060 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
11062 * culture-info-table.h : regenerated.
11064 2007-11-02 Jonathan Chambers <joncham@gmail.com>
11066 * icall.c: Use GetEnvironmentStrings on windows
11067 so we are using the same environment block as
11068 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
11071 Code is contributed under MIT/X11 license.
11073 2007-10-31 Martin Baulig <martin@ximian.com>
11075 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
11077 * mono-debug-debugger.h
11078 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
11080 2007-10-30 Zoltan Varga <vargaz@gmail.com>
11082 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
11085 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
11087 * culture-info-table.h : regenerated.
11089 2007-10-30 Robert Jordan <robertj@gmx.net>
11091 * icall-def.h, icall.c:
11092 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
11094 Code is contributed under MIT/X11 license.
11096 2007-10-29 Zoltan Varga <vargaz@gmail.com>
11098 * class.c (mono_class_setup_vtable): Find the inflated methods in the
11099 inflated class instead of inflating them again.
11101 * class.c (mono_class_setup_vtable): Inflate the override methods in the
11104 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
11105 Call setup_supertypes () after klass->parent is set.
11106 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
11108 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
11109 for inflated instances of not yet created dynamic generic classes.
11110 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
11111 times from inflated_method.
11112 (methodbuilder_to_mono_method): Ditto.
11114 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
11116 * gc.c: code cleanup and removed old untested option of not creating the
11119 2007-10-29 Zoltan Varga <vargaz@gmail.com>
11121 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
11122 creating a jump trampoline for dynamic methods.
11124 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
11126 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
11127 generic TypeBuilders when called from another method of the same type (bug #335131).
11130 2007-10-27 Zoltan Varga <vargaz@gmail.com>
11132 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
11133 doesn't seem to work perfectly.
11135 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
11136 called multiple times.
11137 (methodbuilder_to_mono_method): Ditto.
11138 (resolve_object): Inflate FieldBuilder's.
11140 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11142 * string-icalls.c, string-icalls.h, appdomain.c: patch from
11143 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
11144 RemoveEmptyEntries in the string.Split implementation (bug #322375).
11146 2007-10-26 Dick Porter <dick@ximian.com>
11148 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
11149 Thread initialisation changes
11151 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
11153 * verify.c: fix compatibility check between arrays and System.Array
11155 2007-10-26 Zoltan Varga <vargaz@gmail.com>
11157 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
11158 too. Fixes #336999.
11160 2007-10-25 Zoltan Varga <vargaz@gmail.com>
11162 * object.c (mono_value_box): Use typed allocation here.
11164 2007-10-23 Zoltan Varga <vargaz@gmail.com>
11166 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
11167 trampoline instead of compiling the method right away.
11169 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
11171 2007-10-21 Zoltan Varga <vargaz@gmail.com>
11173 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
11174 related fields for dynamic classes. Fixes #334493.
11176 2007-10-20 Zoltan Varga <vargaz@gmail.com>
11178 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
11180 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
11182 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
11183 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
11185 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
11187 * reflection.c (create_generic_typespec): Initialize klass->generic_container
11189 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
11191 2007-10-18 Jonathan Chambers <joncham@gmail.com>
11193 * marshal.c: Use correct key when removing item
11196 Code is contributed under MIT/X11 license.
11198 2007-10-17 William Holmes <billholmes54@gmail.com>
11200 *marshal.c: Adding a case to marshal booleans to U1
11202 Code is contributed under MIT/X11 license.
11204 2007-10-18 Zoltan Varga <vargaz@gmail.com>
11206 * class.c (mono_class_from_name): Search the modules compromising dynamic
11207 assemblies. Fixes #331601.
11209 2007-10-16 Zoltan Varga <vargaz@gmail.com>
11211 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
11212 exception if the type name contains an assembly component. Fixes #334203.
11214 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
11215 modules inside dynamic assemblies. Fixes #334200.
11217 * reflection.c: Set image->public_key and image->public_key_length;
11219 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
11222 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
11224 2007-10-16 Mark Probst <mark.probst@gmail.com>
11226 * metadata.c: Implemented correct comparing of generic classes.
11227 An inflated generic class can be equal to a non-inflated one if it
11228 is inflated with generic type variables as type arguments. Fixes
11231 2007-10-15 Dick Porter <dick@ximian.com>
11233 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
11234 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
11237 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
11238 instead of a monitor lock. This means that monitor_try_enter and
11239 co can set the thread state safely.
11240 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
11241 thread_interrupt_requested, so interrupt actually works.
11243 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
11244 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
11245 state accessor function
11247 2007-10-15 Martin Baulig <martin@ximian.com>
11250 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
11251 the debugger with the current runtime.
11253 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11255 * object.c, object-internals.h: added the ability to set a single
11256 trampoline for all the slots in a vtable.
11258 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11260 * marshal.c: deal with a possible race condition during multicast
11261 delegate invocation.
11263 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11265 * class.c: ensure value type methods don't have the synchronized
11268 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11270 * string-icalls.c, string-icalls.h: reverted unapproved patch that
11273 2007-10-11 Joel Reed <joelwreed@comcast.com>
11275 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
11276 to take an options parameter so that empty entries can be removed during
11277 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
11279 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11281 * marshal.c: make sure we don't store the signature from a dynamic
11282 method into the runtime invoke cache (bug #327189).
11284 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11286 * marshal.c: make sure the wrapper methods are properly initialized.
11288 2007-10-11 Mark Probst <mark.probst@gmail.com>
11290 * metadata.c, metadata-internals.h: Generalized
11291 mono_type_stack_size() to mono_type_stack_size_internal() which
11292 takes an additional argument specifying whether it allows open
11295 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
11297 * verify.c (do_invoke_method): handle typedbyref params
11298 correctly and check for unverifiable return values.
11300 * verify.c (do_newobj): fix a warning.
11302 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
11304 * verify.c: don't tread typedbyref as allways unverifable,
11305 so uses, like (ld/st)loc.0 are valid. verify for the cases
11306 that it matters, like boxing related operations.
11308 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
11310 * verify.c: add verification of the newobj opcode. verification
11311 of delegate instantation still missing due ldftn and virldftn not
11312 pushing the function type on stack
11314 2007-10-08 Mark Probst <mark.probst@gmail.com>
11316 * class-internals.h: Runtime generic context data structure
11319 * object.c: Initialization of runtime generic context at runtime
11320 vtable creation time.
11322 2007-10-08 Massimiliano Mantione <massi@ximian.com>
11323 * class.c (mono_class_create_from_typedef,
11324 mono_class_from_generic_parameter, mono_ptr_class_get,
11325 mono_fnptr_class_get, mono_bounded_array_class_get)
11326 * domain.c (mono_domain_create, mono_domain_free)
11327 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
11328 * image.c (do_mono_image_load, mono_image_close):
11329 Hooked up load-unload profiler events.
11331 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11333 * domain.c: track statistics about the actual amount of native code
11336 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11338 * class.c: the valuetype enumerators don't have the additional
11339 supertypes interfaces.
11341 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11343 * class.c: need more interfaces setup for the IEnumerator<T>
11344 object created for arrays (tests/ienumerator-interfaces.2.cs).
11346 2007-10-05 Zoltan Varga <vargaz@gmail.com>
11348 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
11350 2007-10-05 Alp Toker <alp@atoker.com>
11352 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
11353 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
11356 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
11358 * verify.c (verify_type_compatibility_full): verification of
11359 compatibility improved, validates correctly non-strict checks between
11360 native int and I4 types different than (unsigned)int32.
11362 * verify.c (do_store_indirect): added, do all verification of
11365 * verify.c (get_load_indirect_mono_type): renamed to
11366 get_indirect_op_mono_type, as it now returns the MonoType for
11367 ldind.X and stind.X opcodes.
11369 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
11371 * reflection.c: Fix the encoding of generic type definition for
11374 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
11375 mono_image_typedef_or_ref but allows to specify if typespec lookups should
11376 be made. Typespec check is done prior to typeref cache lookup.
11378 * reflection.c (mono_image_typedef_or_ref): now just delegate to
11379 mono_image_typedef_or_ref_full.
11381 * reflection.c (encode_generic_class): encode the generic class
11382 directly instead of calling encode_type.
11384 * reflection.c (encode_type): encode the generic type definition
11385 MonoClass as a generic instantiation.
11387 * reflection.c (create_typespec): cache typespec tokens in
11388 the assembly->typespec cache. Don't create typespec for a generic
11389 instance MonoClass. Create typespec for the generic type defintion.
11391 * reflection.c (create_generic_typespec): encode the generic
11392 class directly instead of calling encode_type.
11394 * reflection.c (mono_image_create_token): encode the generic
11395 type definition not using a typespec for MonoType instances.
11398 2007-10-04 Raja R Harinath <rharinath@novell.com>
11401 * class.c (mono_image_init_name_cache): Don't return nested
11402 'protected internal' classes.
11403 (mono_class_from_name_case): Likewise.
11405 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
11407 * icall-def.h, icall.c : get_bundled_machine_config() is now the
11408 common function used by both DefaultConfig in System.dll and
11409 InternalConfigurationHost in System.Configuration.dll.
11411 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11413 * class.c: automatically add to vectors only a few essential explicit
11414 generic interfaces. The rest of the interfaces that arrays should
11415 provide are currently implicitly added (but still not lazily, see the
11416 design in the discussion of bug#325495 for the details of what is
11417 needed for that). Additionally, implicit interfaces are assigned the
11418 same vtable slot as the explicit interfaces (as they are compatible):
11419 this enables huge memory savings since we don't need to instantiate
11420 as many memthods and as large vtables anymore. Also, Since
11421 GetEnumerator<T> returns an instance of a type that is required to
11422 support a similarly large set of interfaces as arrays, we add
11423 implicit interfaces and interface offset sharing support to those
11424 types, too. This change adds all the required interfaces so that
11425 the anonarray.cs test case in the bug report works (we don't add
11426 all the interfaces to arrays of arrays 3-level deep and more because
11427 of the memory requirements explained in the bug and since they are much
11428 less common: the lazy-loading support will enabled them to work, too).
11430 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
11432 * verify.c (merge_stacks): major clean up, all type compatibility
11433 checks are done by verify_type_compatibility. This fix my earlier lack
11434 of understanding of the CLR type system and merge_stacks no longer looks
11437 * verify.c: fixed some bad spelling.
11439 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
11441 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
11442 a given stack slock.
11444 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
11445 verify_type_compatibility_full. This removed a near indentical function and fixed
11446 handling of Int32 and IntPtr across all opcodes.
11448 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11450 * class.c: only vectors have the additional generic interfaces.
11452 2007-10-01 Jonathan Chambers <joncham@gmail.com>
11454 * mono-config.c: Use g_strcasecmp instead of
11455 strcasecmp like everywhere else to fix
11456 compilation with MSVC.
11458 Code is contributed under MIT/X11 license.
11460 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11462 * object.c, object-internals.h: refactored the IMT code to enable
11463 building a single slot at a time and lazily creating the IMT trampolines
11466 2007-09-29 Zoltan Varga <vargaz@gmail.com>
11468 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
11470 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
11473 2007-09-29 Raja R Harinath <harinath@gmail.com>
11475 * loader.c (method_from_methodspec): Rearrange to avoid
11476 un-necessary exposition. Don't assert out if the method's
11477 declaring type is a generic type definition.
11479 2007-09-28 Martin Baulig <martin@ximian.com>
11481 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
11483 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11485 * class-internals.h: optimize field layout of MonoClass to
11486 requires less cachelines at runtime and save a few bytes on 64 bit
11489 2007-09-28 Jb Evain <jbevain@novell.com>
11491 * reflection.c: when encoding type names in custom attributes,
11492 if the type is a closed generic type, its generic arguments
11493 have to be serialized as AssemblyQualifiedName, so that when
11494 they are deserialized, it's possible to re-create them properly.
11498 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11500 * object.c, class-internals.h: added delegate-creation counter.
11502 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11504 * class.c: cleanup of the code that synthetizes interfaces for
11505 arrays in 2.0: saves quit a bit of corlib mempool memory.
11506 Code to fix bug #325495 ifdeffed out for now until the issues
11507 with memory usage and O(n^2) behaviour are fixed.
11509 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11511 * marshal.c: when possible, do not duplicate the name of the methods
11512 in the method builder and in the generated MonoMethod.
11514 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
11515 * verify.c: added support for type checking ldind_* opcodes.
11517 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
11519 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
11520 which is used to distinguish the fully open instantiation of a TypeBuilder
11521 with the rest. This temporary hack is required to restore the property that
11522 the fully open instantiation is the same type of the generic type definition.
11524 * class-internals.h (mono_generic_class_is_generic_type_definition):
11525 new function as part of the internal API.
11527 * class.c (inflate_generic_type): return NULL when the generic inst is
11528 fully open. The fully open generic type is now the same as the generic type
11529 definition for non TypeBuilder types.
11531 * class.c (mono_generic_class_get_class): removed assert since it is
11532 no longer valid, gklass->cached_class can point to the generic type definition.
11534 * class.c (mono_generic_class_is_generic_type_definition): new.
11536 * metadata.c (mono_generic_class_hash): added is_tb_open field
11537 to the hash calculation.
11539 * metadata.c (free_generic_class): if the generic class is associated
11540 with the generic type definition, its field will come from the mempool and
11543 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
11544 new, this function identifies the corner case of a TypeBuilder fully open
11547 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
11548 for lookup. Set gclass->cached_class to be the container class in case of
11549 the fully open instantiation of non TypeBuilder types.
11551 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
11552 to compare generic classes.
11554 * reflection.c (method_encode_methodspec): remove assert that
11555 no longer is valid.
11557 * reflection.c (mono_reflection_generic_class_initialize): add
11558 an aditional assert to ensure the proper type is used.
11560 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
11562 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
11565 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
11567 * verify.c (push_arg): Fixed support for ldarga
11568 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
11569 MonoType used as first arg in case of instance calls.
11571 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
11573 * verify.c: Support for verifying VAR and MVAR types,
11575 2007-09-25 Zoltan Varga <vargaz@gmail.com>
11577 * icall.c (ves_icall_get_property_info): Set the reflected type of the
11578 accessors correctly.
11580 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11582 * threads.c: support OSX and other systems in
11583 mono_thread_get_stack_bounds (bug #328026).
11585 2007-09-25 Martin Baulig <martin@ximian.com>
11588 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
11590 2007-09-24 Martin Baulig <martin@ximian.com>
11593 (MonoDebugClassEntry): Moved the definition of this struct into
11594 mono-debug.c to make it private.
11597 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
11598 type table per symbol file, we don't need to store the symfile id
11601 2007-09-24 Martin Baulig <martin@ximian.com>
11603 Create one type table per symbol file, since a `MonoClass *' gets
11604 invalid when its image is unloaded.
11606 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
11607 (MonoDebugHandle): Added `type_table'.
11609 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11611 * mempool.c, mempool.h: added mono_mempool_new_size () API
11612 to be able to specify a smaller initial size for the pool.
11613 Adjusted the code to slowly increase pool size before using
11614 the previous default size.
11615 * image.c: use a small initial size for image mempools.
11617 2007-09-23 Zoltan Varga <vargaz@gmail.com>
11619 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
11622 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
11623 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
11625 2007-09-22 Zoltan Varga <vargaz@gmail.com>
11627 * metadata.c (mono_type_create_from_typespec): Remove an invalid
11628 free. Fixes #327438.
11630 2007-09-21 Raja R Harinath <harinath@gmail.com>
11632 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
11633 generic instantiations, etc.
11634 <MONO_TYPE_ARRAY>: Likewise.
11636 2007-09-21 Martin Baulig <martin@ximian.com>
11638 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
11639 these structs were never defined.
11640 (MonoDebugHandle): Removed the `_priv' field, it was never used.
11642 2007-09-21 Martin Baulig <martin@ximian.com>
11644 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
11646 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
11648 * image.c: removed the guid hash tables: we can get the same info
11649 without the additional memory usage hit (partially fixes also bug #327052).
11651 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11653 * profiler.h, profiler-private.h, profiler.c: add a new profiler
11654 event to handle unloading methods. After the event is called, the
11655 corresponding MonoMethod* must be considered invalid.
11656 * loader.c (mono_free_method): call the new mono_profiler_method_free
11659 2007-09-20 Mark Probst <mark.probst@gmail.com>
11661 * domain-internals.h: New flag in MonoJitInfo which marks shared
11662 generic methods. New hash table (shared_generics_hash) in
11663 MonoDomain to keep track of shared generic methods. Prototypes
11664 for functions to register and lookup shared generic methods.
11666 * domain.c: Support for registering and looking up shared generic
11667 methods via a hash table (shared_generics_hash) in MonoDomain.
11669 * class-internals.h: New exception to signal failure of shared
11670 compilation of a generic method. New counters for generics
11671 sharing in MonoStats.
11673 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11675 * image.c, metadata-internals.h: don't keep a file descriptor open
11676 for loaded assemblies (bug#325988).
11678 2007-09-19 Raja R Harinath <rharinath@novell.com>
11680 * metadata.c (signature_in_image): New. Carve out of type_in_image.
11681 (ginst_in_image, gclass_in_image): Simplify. Change signature to
11682 use the corresponding datatypes.
11683 (type_in_image): Update to changes.
11684 (CleanForImageUserData): Simplify.
11685 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
11686 Avoid quadratic behaviour in handling the "stolen" list by
11687 separating the filter predicate out, and by prepending the stolen
11688 items rather than appending them.
11689 (steal_ginst_in_image): Likewise.
11690 (mono_metadata_clean_for_image): Update to changes.
11692 2007-09-19 Martin Baulig <martin@ximian.com>
11694 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
11696 2007-09-19 Martin Baulig <martin@ximian.com>
11698 * mono-debug.c (mono_debug_cleanup): Don't call
11699 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
11701 2007-09-19 Raja R Harinath <harinath@gmail.com>
11703 Fix crash on 'make run-test' in mcs/errors
11704 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
11705 Avoid more potential allocations in mono_class_from_mono_type.
11706 (ginst_in_image): Update to changes.
11707 (gclass_in_image): Rearrange slightly.
11709 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11711 * class.c (mono_class_init): Move the code that sets up class->methods to
11712 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
11714 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
11715 canonical instance of an inflated generic signature.
11716 (mono_type_create_from_typespec): Remove an invalid free.
11718 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
11720 2007-09-18 Marek Habersack <mhabersack@novell.com>
11722 * domain-internals.h: added a declaration of the
11723 mono_assembly_load_full_nosearch internal function.
11725 * assembly.c (mono_assembly_load_with_partial_name): use
11726 mono_try_assembly_resolve return value properly.
11727 (mono_assembly_load_full_nosearch): copied the function body from
11728 mono_assembly_load_full, without the code to invoke assembly
11730 (mono_assembly_load_full): calls the above new function and if the
11731 assembly is not resolved, invokes the search hooks.
11733 * appdomain.c (mono_runtime_init): restore the global postload
11734 assembly search handlers.
11736 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11738 * class.c (mono_class_init): Make sure class->methods and class->properties
11739 are never NULL in the generics case.
11741 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
11743 2007-09-17 Zoltan Varga <vargaz@gmail.com>
11745 * metadata.c (free_generic_class): Disable some code to fix the build.
11747 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
11749 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
11750 from the image mempool.
11752 * metadata.c (free_generic_class): Free more data from the inflated class.
11754 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
11756 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
11758 (mono_type_create_from_typespec): Ditto.
11760 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
11761 MonoImage to the caller.
11762 (mono_init_internal): Save the opened image in a global variable.
11763 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
11765 * reflection.c (resolve_object): Fix a leak.
11767 * metadata.c: Fix the freeing of data in the generics caches.
11769 * metadata.c (free_generic_inst): Comment this out to fix the build.
11770 (free_generic_class): Ditto.
11772 * metadata.c: Free cached generic methods, instantinations and classes when
11773 they are removed from the caches.
11774 (mono_metadata_free_type): Free the type itself.
11776 * class.c: Free the result of mono_class_inflate_generic_type () in a few
11779 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11781 * boehm-gc.c: restrict managed allocs to __thread supporting
11784 2007-09-16 Zoltan Varga <vargaz@gmail.com>
11786 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
11787 (mono_generic_class_get_class): Fix a leak.
11789 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
11790 mono_metadata_free_type ().
11791 (mono_metadata_inflate_generic_inst): Fix a leak.
11793 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11795 * mono-debug.c (free_header_data): Fix a leak missed earlier.
11797 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
11800 * mono-debug.c (mono_debug_close_image): Fix call to
11801 g_hash_table_remove ().
11803 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11805 * icall-def.h: redirect all the string ctor to the managed
11806 CreateString () methods.
11807 * string-icalls.c, string-icalls.h: removed dead code for string
11810 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11812 * mono-debug.c: Fix memory leaks.
11814 2007-09-14 Jonathan Chambers <joncham@gmail.com>
11816 * threads-types.h: Implement mono_hazard_pointer_set and
11817 mono_hazard_pointer_clear macros using do/while(0) to fix
11818 compilation with MSVC.
11820 Code is contributed under MIT/X11 license.
11822 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11824 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
11825 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
11827 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11829 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
11832 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11834 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
11835 managed-code allocated as well.
11837 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11839 * class.c (mono_class_is_assignable_from): Add support for generic variance.
11841 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
11843 * boehm-gc.c: fixed the build after the AOT changes.
11845 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11847 * wrapper-types.h: Add an ALLOC wrapper type.
11849 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
11850 reference managed allocator methods.
11852 2007-09-12 Marek Safar <marek.safar@gmail.com>
11854 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
11855 of Type array and not MonoType, a fix suggested by Hari.
11857 2007-09-12 Jonathan Chambers <joncham@gmail.com>
11859 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
11860 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
11862 Code is contributed under MIT/X11 license.
11864 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11866 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
11868 2007-09-12 Marek Habersack <mhabersack@novell.com>
11870 * image.c (do_mono_image_open): if assembly file fails to open and
11871 MONO_IOMAP is in effect, try to find the path in a
11872 case-insensitive way.
11874 * appdomain.c (mono_runtime_init): do not install postload hooks -
11875 tests show that MS.NET doesn't use anything of that sort to
11876 trigger the AppDomain.AssemblyResolve event.
11877 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
11879 (mono_runtime_init): init portability helpers here.
11881 * assembly.c (mono_assembly_load_with_partial_name): if other
11882 attempts fail, trigger the AppDomain.AssemblyResolve event handler
11883 to resolve the assembly.
11885 * domain-internals.h: added mono_try_assembly_resolve and marked
11888 2007-09-11 Jb Evain <jbevain@novell.com>
11890 * object-internals.h (MonoReflectionDynamicMethod): add
11891 a `MonoReflectionType *owner` field. The owner is used
11893 (mono_reflection_create_dynamic_method): use the owner of the dynamic
11894 method as the class declaring the dynamic method.
11895 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
11896 dynamic method to the declaring type of the methodbuilder.
11898 2007-09-11 Mark Probst <mark.probst@gmail.com>
11900 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
11901 rules for calling methods via reflection.
11903 2007-09-11 Zoltan Varga <vargaz@gmail.com>
11905 * reflection.c (resolve_object): Add support for MonoGenericClass.
11906 Inflate MonoType's.
11908 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11910 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
11911 provide a managed method that does fast allocations without needing
11912 a managed->unmanaged transition. Boehm GC implementation currently
11913 enabled for ptrfree objects on sane architectures.
11915 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11917 * marshal.c, marshal.h: exported a couple of useful functions and
11918 added mono_mb_get_label () to easily handle backward branches.
11920 2007-09-10 Zoltan Varga <vargaz@gmail.com>
11922 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
11924 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11926 * loader.c (find_method): Fixed the regression introduced while
11929 2007-09-09 Zoltan Varga <vargaz@gmail.com>
11931 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
11934 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
11935 icall.c reflection.c: Pass a MonoGenericContext argument to
11936 mono_lookup_dynamic_token ().
11938 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
11941 2007-09-09 Robert Jordan <robertj@gmx.net>
11943 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
11944 for generic methods.
11946 * object.c (mono_object_get_virtual_method): Handle generic methods.
11949 Code is contributed under MIT/X11 license.
11951 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11953 * image.c: fix locking in mono_image_load_file_for_image ().
11955 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
11957 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
11958 used only as a cache: added an icall to fill it.
11960 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
11962 * reflection.h: exposed mono_reflection_free_type_info
11963 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
11964 since mono_reflection_bind_generic_parameters makes a copy of it.
11965 * reflection.c (free_type_info): subinfos should be freed.
11966 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
11968 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
11969 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
11970 this fixes #82695 and #81726.
11973 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
11975 * process.h, process.c: added support for user profile/info in
11976 ProcessStartInfo. For now only Windows works.
11978 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11980 * metadata.c: consider the generic arguments when comparing
11981 signatures (bug #82614).
11983 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11985 * cil-coff.h, image.c: updated assembly loader to cope with the
11986 PE32+ 64 bit file format.
11988 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11990 * assembly.c, class.c, domain.c, loader.c: remove useless
11991 inclusion of cil-coff.h.
11993 2007-08-29 Jonathan Chambers <joncham@gmail.com>
11995 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
11996 if interface is marked with CoClassAttribute.
11998 Code is contributed under MIT/X11 license.
12000 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12002 * sgen-gc.c: ensure no object from the to space is copied again or finalized
12003 if it's seen twice in major collections.
12005 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12007 * sgen-gc.c: big objects are not copied to the gray area, but they
12008 need to be considered for scanning, too, if they are brought alive
12009 by an object ready for finalizations or a survived one.
12011 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
12013 * sgen-gc.c: properly account the number of disappearing links when
12014 they are nullified.
12016 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
12018 * sgen-gc.c: share the code to scan the registered roots between the
12019 different types of collections.
12021 2007-08-28 Zoltan Varga <vargaz@gmail.com>
12023 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
12025 2007-08-28 Zoltan Varga <vargaz@gmail.com>
12027 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
12028 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
12030 2007-08-28 Mark Probst <mark.probst@gmail.com>
12032 * security-manager.c (mono_security_manager_get_methods):
12033 LinkDemandSecurityException now has 2 arguments instead of 3.
12035 2007-08-27 Zoltan Varga <vargaz@gmail.com>
12037 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
12038 platforms which need it.
12040 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12042 * sgen-gc.c: unregister thread data structures with a pthread_key_t
12045 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
12047 * threads.c: free the thread static data on thread exit.
12049 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
12051 * class.c: walk the hierarchy to find the generic definition for
12052 a class (fixes runtime part of bug #82498).
12054 2007-08-24 Zoltan Varga <vargaz@gmail.com>
12056 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
12059 * image.c (mono_image_close): Here. Hopefully fixes #82510.
12061 2007-08-24 Mark Probst <mark.probst@gmail.com>
12063 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
12065 2007-08-24 Robert Jordan <robertj@gmx.net>
12067 * appdomain.c: don't perform the ':'->';' substitution on Win32.
12069 2007-08-24 Jb Evain <jbevain@novell.com>
12071 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
12074 2007-08-24 Mark Probst <mark.probst@gmail.com>
12076 * threads.c: Make sure a thread gets cleaned up only once. Fixes
12079 2007-08-24 Zoltan Varga <vargaz@gmail.com>
12081 * assembly.c: Fix a warning.
12083 2007-08-23 Marek Habersack <mhabersack@novell.com>
12085 * appdomain.c: parse the <runtime> section looking for the probing
12086 element with the 'privatePath' attribute, which sets additional
12087 directories in which the runtime should look for assemblies.
12089 2007-08-23 Robert Jordan <robertj@gmx.net>
12091 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
12094 2007-08-23 Martin Baulig <martin@ximian.com>
12096 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
12097 _mono_debug_init_corlib() and remove it from the header file.
12099 2007-08-23 Martin Baulig <martin@ximian.com>
12101 * mono-debug-debugger.c
12102 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
12103 don't notify the debugger about it.
12105 * mono-debug-debugger.h
12106 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
12108 2007-08-23 Robert Jordan <robertj@gmx.net>
12110 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
12111 Code is contributed under MIT/X11 license.
12113 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12115 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
12117 2007-08-22 Martin Baulig <martin@ximian.com>
12119 * mono-debug.c: Store debugging info on a per-domain basis and
12120 free it on domain unload. Add support for unloading symbol files.
12123 (MonoDebugList): New typedef.
12125 - add `data_tables and `type_table'.
12126 - replace 'symbol_files' and `num_symbol_files' with a
12128 (mono_debug_data_table): Removed.
12129 (mono_debug_list_add): New public function.
12130 (mono_debug_list_remove): New public function.
12131 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
12132 (mono_debug_init_2_memory): Renamed into
12133 mono_debug_open_image_from_memory().
12134 (mono_debug_close_image): New public function.
12135 (mono_debug_domain_create): Likewise.
12136 (mono_debug_domain_unload): Likewise.
12137 (MONO_DEBUGGER_VERSION): Bump to 60.
12139 * mono-debug-debugger.h
12140 (MonoDebuggerEvent):
12141 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
12142 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
12143 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
12144 - rename `THREAD_CREATED' and `THREAD_EXITED' into
12145 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
12146 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
12148 (mono_debugger_add_symbol_file): Removed.
12149 (mono_debugger_add_type): Removed.
12150 (mono_debugger_lookup_type): Removed.
12151 (mono_debugger_lookup_assembly): Removed.
12154 (mono_domain_create): Call mono_debug_domain_create().
12155 (mono_init_internal): Call mono_debug_init_corlib().
12158 (mono_assembly_close): Call mono_debug_close_image().
12160 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
12162 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
12165 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
12167 * sgen-gc.c: ensure section->pin_queue_end is initialized
12168 correctly when non pinning objects in the section have been found.
12170 2007-08-22 Marek Habersack <mhabersack@novell.com>
12172 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
12173 containing a list of directories separated by ':'. MSDN docs say
12174 the directories should be separated with ';'. Part of a bugfix for
12177 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
12179 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
12180 it should MonoType and not MonoClass.
12182 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
12184 * culture-info-table.h : regenerated.
12186 2007-08-20 William Holmes <billholmes54@gmail.com>
12188 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
12189 to call ReplaceFile Kernel32 on windows or in io-layer.
12190 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
12191 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
12192 as an internal call.
12194 Code is contributed under MIT/X11 license.
12196 2007-08-20 Jb Evain <jbevain@novell.com>
12198 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
12199 and MONO_EXCEPTION_FIELD_ACCESS.
12201 * debug-helpers.[c|h]: new mono_field_full_name function.
12203 2007-08-20 Mark Probst <mark.probst@gmail.com>
12205 * class.c: Removed class_security_level() and moved it to
12206 security-core-clr.c.
12208 * security-core-clr.c, security-core-clr.h: class_security_level()
12209 is now public and renamed to mono_security_core_clr_class_level().
12210 It also looks for security attributes in the classes a class is
12213 2007-08-20 Mark Probst <mark.probst@gmail.com>
12215 * security-core-clr.c, security-core-clr.h: CoreCLR security
12218 * Makefile.am: Added security-core-clr.[ch].
12220 * security-manager.c, security-manager.h: Functions and enum for
12221 setting and getting the security mode.
12223 * class.c: CoreCLR security checks.
12225 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
12227 * icall-def.h, process.c, process.h: implemented icall to get
12228 user/system processor times.
12230 2007-08-17 Mark Probst <mark.probst@gmail.com>
12232 * domain.c, threads.c, class-internals.h, domain-internals.h: New
12233 reader-lock-free jit_info_table.
12235 2007-08-17 Zoltan Varga <vargaz@gmail.com>
12237 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
12239 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
12241 * object-internals.h (MonoException): Add missing _data member.
12243 2007-08-08 Massimiliano Mantione <massi@ximian.com>
12245 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
12246 checking that only methods with matching qname or fqname are picked
12247 from implemented interfaces.
12249 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
12251 * verify.c (do_newarr):added, do type verification of
12252 newarr ops, push the right value on the eval stack.
12253 * verify.c (mono_method_verify): use do_newarr
12256 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
12258 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
12259 factored the common code into get_boxable_mono_type, which
12260 is now using mono_type_get_full, this fixed byref related tests.
12262 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
12264 * class.c: added mono_type_get_full, this function has the same
12265 behavior of mono_class_get_full but the returned MonoType has
12266 all metadata of the associated token in case of a typespec token.
12267 * class.c: added mono_type_retrieve_from_typespec, used by
12268 mono_type_get_full to retrieve the token type.
12269 * class.c (mono_class_create_from_typespec): changed to use
12270 mono_type_retrieve_from_typespec.
12271 * class.c (mono_ldtoken): changed to use mono_type_get_full
12272 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
12273 * class-internals.h: exported mono_type_get_full for internal use.
12275 2007-08-16 Jb Evain <jbevain@novell.com>
12277 * domain.c (supported_runtimes): add entry for
12278 the 'moonlight' runtime version.
12280 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12282 * verify.c (mono_method_verify): small typo sliped in.
12284 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12286 * verify.c (do_unbox_value): added, do type verification of
12288 * verify.c (mono_method_verify): use do_unbox_value
12291 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12293 * verify.c (dump_stack_value): fixed typo, was printing string
12294 instead of object on stack.
12295 * verify.c (do_box_value): moved the byref check up as it leads
12296 to invalid code and should be done earlier.
12297 * verify.c: improved error messages for and ldobj
12299 2007-08-15 William Holmes <billholmes54@gmail.com>
12301 * marshal.c (emit_marshal_custom): Omit the call to
12302 marshal_native_to_managed when calling native to managed
12303 and the argument is specified as an out argument.
12305 Code is contributed under MIT/X11 license.
12307 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12309 * verify.c: fixed the type checks for generics, function pointers and vectors.
12310 Added type verification for ldobj and ldtoken. The verifier
12311 would segfault if header or signature of a method contained references
12312 to non-existant types.
12314 2007-08-15 Jonathan Chambers <joncham@gmail.com>
12316 * marshal.c (cominterop_get_ccw): Patch from
12317 Bill Holmes to no walk up interface hierarchy.
12318 All parent methods should be present in the interface for COM.
12320 Code is contributed under MIT/X11 license.
12322 2007-08-15 Jonathan Chambers <joncham@gmail.com>
12324 * marshal.c (emit_marshal_com_interface): Patch from
12325 Bill Holmes to handle COM Interfaces as return values
12326 for native->managed calls.
12328 Code is contributed under MIT/X11 license.
12330 2007-08-14 Jonathan Chambers <joncham@gmail.com>
12332 * marshal.c (cominterop_get_idispatch_for_object): Implement
12333 for runtime callable wrappers.
12335 Code is contributed under MIT/X11 license.
12337 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
12339 * pedump.c (main): changed from mono_init to mono_init_from_assembly
12340 so 2.0 types are accessible
12343 2007-08-13 Miguel de Icaza <miguel@novell.com>
12345 * domain.c (mono_init_internal): Call mono_assembly_load_friends
12346 once we load mscorlib. Due to the order in which we initialize,
12347 the mono_assembly_load_full routine that loads mscorlib did not
12348 load friends. We now load it once we load the
12349 mono_defaults.internals_visible_class class.
12351 * assembly.c: Expose the mono_load_friend_assemblies method.
12353 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
12355 * verify.c: improved the handling of boxing, better
12356 type checking for unary ops and conversion. Fix bug
12357 regarding managed pointer compatibility checking
12359 2007-08-11 Zoltan Varga <vargaz@gmail.com>
12361 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
12363 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
12365 2007-08-09 Raja R Harinath <rharinath@novell.com>
12367 * reflection.c (dup_type): Remove.
12368 * class.c (dup_type): Remove.
12369 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
12370 instead of the dodgy 'dup_type'.
12371 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
12372 handle the case where 'dup_type' needed the second argument.
12374 2007-08-08 Zoltan Varga <vargaz@gmail.com>
12376 * domain.c: Fix a warning.
12378 2007-08-08 Massimiliano Mantione <massi@ximian.com>
12380 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
12381 checking that methods with the same fqname are not overridden
12382 with a method from an ancestor.
12384 2007-08-07 Zoltan Varga <vargaz@gmail.com>
12386 * threads.c (free_thread_static_data_helper): Avoid a crash if
12387 thread->static_data is not yet set.
12389 2007-08-07 Jonathan Chambers <joncham@gmail.com>
12391 * marshal.c: Use correct image when emitting
12392 native wrapper for COM calls.
12394 Code is contributed under MIT/X11 license.
12396 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
12398 * icall-def.h, security.c, security.h :
12399 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
12401 2007-08-07 Martin Baulig <martin@ximian.com>
12403 * mono-debug-debugger.h
12404 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
12406 * domain.c (mono_domain_free): Call
12407 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
12409 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
12411 * verify.c (check_underflow, check_overflow): error message now returns IL offset
12412 * verify.c (in_same_block): code should test if either offset is inside the clauses
12413 * verify.c (mono_method_verify): push the exception into the eval stack of exception
12416 2007-08-03 Zoltan Varga <vargaz@gmail.com>
12418 * image.c (mono_image_close): Fix a leak.
12420 * object.c (mono_runtime_invoke_array): Avoid using alloca.
12422 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
12424 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12426 * domain.c, threads.c, threads-types.h: fix memory retention issue
12427 with thread static variables not being cleared on domain unload.
12428 Reuse thread static slots after domain unload.
12430 2007-08-03 Zoltan Varga <vargaz@gmail.com>
12432 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
12435 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
12436 now done in mono_runtime_invoke_array.
12438 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
12439 receiver is a nullable type.
12441 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
12444 2007-08-03 Jonathan Chambers <joncham@gmail.com>
12446 * marshal.c: Implement COM Objects as return type for
12447 managed->unmanaged calls. Added Release calls for COM Object
12448 out/return values in managed->unmanaged calls.
12450 Code is contributed under MIT/X11 license.
12452 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
12454 * threads.h, threads-type.h: move the hazard pointer declarations
12455 to the private header.
12457 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12459 * file-io.c, appdomain.c: memory leak fixes.
12461 2007-08-02 Dick Porter <dick@ximian.com>
12464 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
12465 SO_REUSEADDR setting into io-layer/sockets.c.
12467 2007-08-01 Zoltan Varga <vargaz@gmail.com>
12469 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
12470 from Object when called on a generic parameter. Fixes #82211.
12472 2007-08-01 Dick Porter <dick@ximian.com>
12474 * file-io.c (convert_share): Test FileShare values bit-by-bit.
12475 Fixes bug 79250 yet again.
12477 2007-07-30 Martin Baulig <martin@ximian.com>
12479 Merged the `debugger-dublin' branch.
12482 (MonoDebugDataTable): New typedef.
12483 (MonoDebugMethodAddressList): New typedef.
12484 (MonoDebugWrapperData): Removed.
12485 (MonoDebugSymbolTable): Removed `current_data_table',
12486 `current_data_table_size', `current_data_table_offset'.
12487 (MonoDebugDataItemType): Moved into mono-debug.c.
12488 (MonoDebugMethodJitInfo): Remove `address'.
12489 (mono_debug_data_table): New global variable.
12490 (mono_debug_lookup_method_addresses): New public function.
12491 (mono_debug_find_method): Take a `MonoMethod *', not a
12492 `MonoDebugMethodInfo *'.
12494 * mono-debug.c: Drop support for the old symbol tables.
12496 2007-06-28 Martin Baulig <martin@ximian.com>
12498 * mono-debug.c (mono_debug_debugger_version): New public variable.
12500 2007-07-31 William Holmes <billholmes54@gmail.com>
12502 * metadata.c Changed mono_type_create_from_typespec to not insert
12503 the type into the hash map until after
12504 do_mono_metadata_parse_type has completed.
12506 Code is contributed under MIT/X11 license.
12508 2007-07-31 Zoltan Varga <vargaz@gmail.com>
12510 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
12511 generic parameter. Fixes #82211.
12513 2007-07-27 Jb Evain <jbevain@novell.com>
12515 * pedump.c (dump_metadata, dump_metadata_header): dump
12516 versions contained in the metadata header.
12518 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
12520 * threads.c: register small_id_table with the GC.
12522 2007-07-27 Mark Probst <mark.probst@gmail.com>
12524 * threads.c, threads.h, class-internals.h, object-internals.h:
12525 Hazard pointers, to be used by lock-free parallel algorithms.
12527 2007-07-26 Dick Porter <dick@ximian.com>
12529 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
12530 routine on non-windows platforms, as I've not managed to think of
12531 a non-kludgy way of doing this. Finishes off bug 78739.
12533 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
12535 * object.c: properly setup interface_bitmap in proxy vtables.
12537 2007-07-25 Marek Habersack <mhabersack@novell.com>
12539 * appdomain.c (get_shadow_assembly_location): do not use TickCount
12540 to create unique shadow copy target directories, use the domain's
12541 serial number instead. Each domain gets a unique target directory
12544 * domain.c (mono_domain_create): added code to increment domain
12545 shadow copy serial number and cache the value in the current
12548 * domain-internals.h (struct _MonoDomain): added a new field -
12549 shadow_serial to hold the serial number used in generation of
12550 shadow-copy directories. This is to make sure that the directory
12551 name is unique for each and every domain created. We avoid a race
12552 condition with overriding assemblies already in use by other app
12555 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
12557 * class.c (mono_bounded_array_class_get): fixed memory leak when
12558 binding generic parameters.
12560 2007-07-24 Raja R Harinath <rharinath@novell.com>
12562 * metadata.c (do_mono_metadata_parse_generic_class): Use
12563 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
12566 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12568 * loader.c, class-internals.h, reflection.c: removed the per-method
12569 generics hashtable: we use the global one through the call of
12570 mono_class_inflate_generic_method ().
12572 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12574 * class.c, metadata.c, class-internals.h: introduce yet another
12575 generics global cache for inflated methods (fixes 98% of the perf
12576 issue in bug #81806).
12578 2007-07-23 Raja R Harinath <rharinath@novell.com>
12580 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
12581 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
12582 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
12583 return a MonoGenericInst containing (a copy) of those types.
12584 (mono_metadata_inflate_generic_inst): Update to changes.
12585 (mono_metadata_parse_generic_inst): Likewise.
12586 (mono_get_shared_generic_inst): Likewise.
12587 * reflection.c (mono_class_bind_generic_parameters): Likewise.
12588 (mono_reflection_bind_generic_method_parameters): Likewise.
12589 * metadata-internals.h: Likewise.
12590 * icall.c (free_generic_context): Kill.
12591 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
12593 * reflection.c (reflection_methodbuilder_to_mono_method): Use
12594 mono_metadata_type_dup.
12595 * marshal.c (mono_mb_create_method): Likewise.
12597 * metadata.c (mono_metadata_type_dup): Rename from
12598 mono_metadata_type_dup_mp. Take an optional mempool instead of a
12599 MonoImage. Handle a few more cases, esp. when no mempool is given.
12600 * marshal.c, metadata-internals.h: Update to changes.
12602 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
12604 * class.c: fixed a small leak for array classes and removed warning.
12606 2007-07-22 Zoltan Varga <vargaz@gmail.com>
12608 * loader.c (mono_method_get_param_token): Make this work on generic methods.
12609 Return 0x8000000 for return parameters. Fixes #82161.
12611 2007-07-21 Marek Habersack <grendello@gmail.com>
12613 * appdomain.c (get_shadow_assembly_location): append the current
12614 ticks value to the path. Avoids overwriting the same assemblies by
12615 several threads at the same time.
12617 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
12618 and Raja R Harinath <rharinath@novell.com>
12620 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12622 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
12623 property for testing if a method is a generic method definition.
12625 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
12627 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
12629 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12631 * verify.c: used function from private branch, reverted to the one in class.h
12633 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12635 * verify.c: a typo slipped in and the code wont compile
12637 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12639 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
12640 disabled box instruction as it is doing the wrong thing
12641 improved stack dump messages, now it is easier to debug type related issues
12644 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
12646 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
12648 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12650 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
12651 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
12652 grouped with class and valuetype. This change will simply
12653 the code as it should be handled just like unmanaged pointers.
12655 2007-07-19 Mark Probst <mark.probst@gmail.com>
12657 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
12659 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12661 * verify.c: several stack merge issues fixed, reference comparisons now
12662 check the type size. strict type check now works correctly.
12663 added more uses of IS_MANAGED_POINTER macro.
12664 fixed issues pointed by running the test suite against .net.
12667 2007-07-19 Mark Probst <mark.probst@gmail.com>
12669 * class.c, loader.c, class-internals.h: Removed the
12670 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
12673 * icall.c: Better error checking in some internal reflection
12676 2007-07-18 William Holmes <billholmes54@gmail.com>
12678 * filewatcher.c : removed unused variable 'filename' in
12679 ves_icall_System_IO_FSW_SupportsFSW
12681 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12683 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
12686 2007-07-15 Zoltan Varga <vargaz@gmail.com>
12688 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
12690 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
12692 2007-07-14 Zoltan Varga <vargaz@gmail.com>
12694 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
12695 Implement generics support.
12696 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12698 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
12699 type_args and method_args arguments.
12700 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
12701 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12702 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
12704 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
12706 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
12707 It adds a rootimage parameter to mono_reflection_get_type_internal,
12708 adds new function mono_reflection_get_type_with_rootimage and use
12709 the rootimage to resolve the types instead of the current image
12711 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
12713 * culture-info-table.h: Forgot to update after r78304.
12715 2007-07-13 Raja R Harinath <rharinath@novell.com>
12717 * class.c (mono_class_is_open_constructed_type)
12718 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
12720 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
12722 * class.c (mono_bounded_array_class_get): method fails if used with
12723 an incomplete TypeBuilder enum (no basetype field), fixed it by
12724 avoiding calculating the size for such array as it cannot be instantiated.
12727 2007-07-12 Raja R Harinath <rharinath@novell.com>
12729 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
12731 * metadata.c, reflection.c: Update to changes.
12733 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
12735 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
12736 mono_class_is_valid_enum, they are used to valide a enum when loading.
12737 * reflection.c: used new functions to throw TypeLoadException when and
12738 invalid enum is build with TypeBuilder. Fixes #82018
12740 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12742 * object.c: forgot commit of mono_class_setup_methods () to access
12744 * object-internals.h: added a few more handy fields to
12747 2007-07-11 Zoltan Varga <vargaz@gmail.com>
12749 * object.c (build_imt): Call mono_class_setup_methods () before accessing
12752 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
12754 * class-internals.h, object-internals.h, object.c: IMT-based
12755 interface invocation core from Massimiliano Mantione
12756 (massi@ximian.com) with a reworked arch-specific interface,
12757 bsearch implementation and a few bugfixes and memory savings by me.
12759 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
12761 * class.c (mono_class_create_from_typedef): mono would segfault if
12762 an enum did not have a __value field. It now throws a TypeLoadException
12763 for such cases. Fix bug #82022
12765 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12767 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
12769 2007-07-09 Mark Probst <mark.probst@gmail.com>
12771 * class.c (mono_class_init): If a class is already inited but has
12772 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
12774 2007-07-09 Mark Probst <mark.probst@gmail.com>
12776 * class.c: Properly handle the case of an unimplemented interface
12777 method. Fixes: 81673.
12779 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12781 * class-internals.h, object.c: cleanup patch from massi: use
12782 MonoVTable->interface_bitmap since the vtable interfaces offset array
12785 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12787 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
12788 GetMDStreamVersion icall instead.
12790 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
12792 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
12793 not use mono_dl_build_path() with a full library name: makes
12794 fallbacks to libgaim and libfam work.
12796 2007-07-06 William Holmes <billholmes54@gmail.com>
12798 * assembly.c: Added a continue statement in probe_for_partial_name when
12799 parse_assembly_directory_name fails. Fixes : 82002
12801 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
12803 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
12804 and added a verification for TYPEDBYREF.
12805 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
12806 make native int interchangeable with int32 and some small cleanup and formating.
12807 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
12808 handle byref of byref.
12809 * verify.c (push_local): handle byref of byref.
12810 * verify.c (do_binop): invalid mix of values is unverifiable
12811 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
12812 added visibility checks
12813 * verify.c (field related method): added visibility checks
12814 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
12816 2007-07-06 Zoltan Varga <vargaz@gmail.com>
12818 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
12821 2007-07-05 Zoltan Varga <vargaz@gmail.com>
12823 * profiler.c (mono_profiler_load): Fix an off-by-one error.
12825 * marshal.c (emit_marshal_string): When returning a string from managed code,
12826 allways make a copy even for unicode strings. Fixes #81990.
12828 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
12830 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
12831 of byref generic inst types (bug #81997).
12833 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
12835 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
12836 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
12838 2007-07-02 Zoltan Varga <vargaz@gmail.com>
12840 * marshal.c (emit_marshal_string): Add support for unicode strings in
12841 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
12843 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
12845 * verify.c: field load/store are now verified, missing only access checks now
12847 2007-06-28 Martin Baulig <martin@ximian.com>
12849 * mono-debug.c (mono_debug_debugger_version): New public variable.
12851 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
12853 * locales.c: When constructing DateTimeFormat or NumberFormat for
12854 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
12855 MonoCultureInfo contructed from the current locale is always
12856 read-only and has UseUserOverride set to true. All MonoCultureInfo
12857 instances returned for GetCultures have both IsReadOnly and
12858 UseUserOverride set to true. Fixes part of bug #81930.
12860 2007-06-22 Jonathan Chambers <joncham@gmail.com>
12862 * icall-def.h: Update System.__ComObject icalls
12863 * marshal.c: Avoid managed transition (and object creation)
12864 when looking up COM interface in RCW.
12865 * marshal.h: Ditto.
12867 Code is contributed under MIT/X11 license.
12869 2007-06-22 Zoltan Varga <vargaz@gmail.com>
12871 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
12872 to avoid crashes during assembly unloading.
12874 2007-06-22 Raja R Harinath <rharinath@novell.com>
12876 Fix MethodInfo.IsGenericMethodDefinition
12877 * reflection.c (mono_reflection_bind_generic_method_parameters):
12878 Rearrange code to ensure we always uses a generic method definition.
12879 * class.c (mono_class_inflate_generic_method_full): Set
12880 'generic_container' field only for generic method definitions.
12881 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12882 Use presense of 'generic_container' field as indication of being a
12883 generic method definition.
12885 2007-06-21 Zoltan Varga <vargaz@gmail.com>
12887 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12889 * object-internals.h: Reflect changes in the layout of the managed Delegate
12892 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
12893 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
12894 runtime memory used by the dynamic method. Fixes #77146.
12896 2007-06-21 Dick Porter <dick@ximian.com>
12899 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
12900 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
12903 2007-06-21 Raja R Harinath <rharinath@novell.com>
12905 * reflection.c (method_encode_methodspec): Add a tripwire.
12906 * class.c (inflate_generic_type): The fully open generic type is
12907 not the same as the generic type definition.
12909 2007-06-21 Martin Baulig <martin@ximian.com>
12911 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
12913 * mono-debug-debugger.h
12914 (MonoDebuggerBreakpointInfo): Removed.
12915 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
12916 (mono_debugger_remove_breakpoint): Likewise.
12917 (mono_debugger_breakpoint_callback): Likewise.
12918 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
12920 2007-06-21 Raja R Harinath <rharinath@novell.com>
12922 * metadata.c (mono_metadata_lookup_generic_class): The fully open
12923 generic type is not the same as the generic type definition.
12924 * class.c (mono_generic_class_get_class): Likewise.
12926 2007-06-20 Geoff Norton <gnorton@customerdna.com>
12928 * icall.c: The second argument to
12929 System.Reflection.MethodBase.GetMethodFromHandleInternalType
12930 is a MonoType not a MonoClass.
12932 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12934 * verify.c: support for function pointers in the verifier
12936 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12938 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
12940 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12942 * assembly.c: removed Mono.Data.SqliteClient from the list of
12943 forward-compatible assemblies as it breaks the ABI (bug #81899).
12945 2007-06-19 Raja R Harinath <rharinath@novell.com>
12947 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
12948 lookup/update with the loader lock.
12949 * reflection.c (mono_class_bind_generic_parameters): No need to
12950 protect mono_metadata_lookup_* with the loader lock.
12951 * class.c (inflate_generic_type): Likewise.
12953 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
12954 on a generic instantiated type.
12956 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
12958 *verify.c: produce meanfull error messages on verification error
12959 *verify.c: fixed some cases of verification errors reported as validation errors
12960 *pedump.c: fixed the error name array, now it shows validation errors properly
12961 *verify.h: fixed the contant that should be used for verification errors
12963 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12965 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
12966 for bug #77596, 81858 and 80743 (generics data structures on domain
12969 2007-06-15 Raja R Harinath <rharinath@novell.com>
12971 Avoid allocating 'MonoGenericContext' on the heap.
12972 * class-internals (_MonoMethodInflated::context): Make field
12973 inline, not a pointer.
12974 * loader.c (method_from_methodspec): Allocate 'new_context' on the
12975 stack. Use the context embedded within the inflated method as the
12976 hash key, rather than 'new_context'.
12977 * class.c (inflate_generic_context): Simplify. Return a struct
12978 rather than allocating on the heap.
12979 (mono_class_inflate_generic_method_full): Update to changes. Now,
12980 doesn't salt away a copy of the context -- simplifying the
12981 lifetime rules of a 'MonoGenericContext *'.
12982 (mono_method_get_context): Return pointer to embedded context.
12983 (setup_generic_array_ifaces): Allocate temporary context on stack.
12984 * reflection.c (inflate_mono_method): Likewise.
12985 (mono_reflection_bind_generic_method_parameters): Likewise.
12986 Use the context embedded within the inflated method as the hash key.
12988 Avoid a source of allocation of 'MonoGenericContext'.
12989 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
12990 and 'cached_context' fields into embedded 'MonoGenericContext' field.
12991 * class.c: Update to changes.
12992 (mono_generic_class_get_context): Simplify drastically. Now just
12993 returns a pointer to the field.
12994 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
12995 argument as a const pointer.
12996 (mono_metadata_generic_context_equal): Likewise.
12997 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
13000 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
13002 * verify.c improved the handling of brtrue/brfalse, factored out common code
13004 2007-06-14 Raja R Harinath <rharinath@novell.com>
13006 Kill MonoGenericMethod.
13007 * class-internals.h (MonoGenericContext::method_inst): Rename from
13008 'gmethod' and convert to a MonoGenericInst.
13009 (MonoGenericMethod): Remove.
13010 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
13011 * loader.c (method_from_methodspec): Update to changes. Use a
13012 MonoGenericContext as the key to the hashtable.
13013 * metadata.c (mono_metadata_generic_context_equal): Rename from
13014 'mono_metadata_generic_method_equal' and take MonoGenericContext.
13015 (mono_metadata_generic_context_hash): Likewise from
13016 'mono_metadata_generic_method_hash'. Change hash function.
13017 (mono_metadata_load_generic_params): Update to changes.
13018 (mono_get_shared_generic_method): Remove.
13019 * metadata-internals.h (mono_get_shared_generic_method): Remove.
13020 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
13021 (inflate_generic_context): Likewise.
13022 (mono_class_inflate_generic_method_full): Likewise.
13023 (setup_generic_array_ifaces): Likewise.
13024 (mono_class_create_from_typespec): Likewise.
13025 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
13026 (method_encode_methodspec): Update callsite.
13027 (reflection_methodbuilder_to_mono_method): Update to changes.
13028 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
13029 MonoGenericContext as the key to the hashtable.
13030 (inflate_mono_method): Update to changes.
13032 * class-internals.h (MonoGenericMethod::container): Remove.
13033 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
13035 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
13037 * profiler-private.h, profiler.c, profiler.h: added API to profile
13040 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
13042 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
13044 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
13046 * verify.c: method invocation is now validated, now we verify parameter types on stack.
13047 Fixed overflow and underflow not aborting the verification process.
13049 2007-06-13 Mark Probst <mark.probst@gmail.com>
13051 * class-internals.h (MonoStats): Added stats entries for dynamic
13054 2007-06-12 Zoltan Varga <vargaz@gmail.com>
13056 * loader.c (mono_free_method): Free header->locals and header->clauses.
13058 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
13061 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
13063 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
13065 2007-06-12 Raja R Harinath <rharinath@novell.com>
13067 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
13070 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
13072 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
13074 2007-06-11 Raja R Harinath <harinath@gmail.com>
13076 MonoGenericMethod on a diet
13077 * class-internals.h (_MonoMethodInflated::reflection_info): Move
13079 (_MonoGenericMethod::reflection_info): ... from here.
13080 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
13082 * reflection.c (inflate_mono_method): Likewise.
13083 (mono_reflection_bind_generic_method_parameters): Likewise.
13085 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
13087 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
13088 *verify.c: factored long ldarg forms to share code with short forms
13090 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
13092 *verify.c: fixed code formating factored some duplicate code
13093 into a new function
13095 *verify.h: fixed binary incompatibility introduced earlier
13097 *pedump.c: fixed formating
13099 2007-06-11 Raja R Harinath <harinath@gmail.com>
13101 Fix assertion when disassembling Mono.C5.dll
13102 * loader.c (method_from_methodspec): Avoid inflating a method
13103 twice with the same context. If the methodref is inflated, use
13104 the declaring method instead.
13106 * class.c (mono_class_from_generic_parameter): Fix case similar to
13107 bug #81830 handled below, but for method containers.
13109 2007-06-10 Raja R Harinath <harinath@gmail.com>
13111 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
13112 get_shared_generic_class. Directly inflate the instance.
13113 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
13114 (inflate_generic_class): Delete.
13115 (get_shared_generic_class): Delete. Move setting of
13116 'cached_class' and 'cached_context' ...
13117 * metadata.c (mono_metadata_lookup_generic_class): ... here.
13119 * metadata.c (mono_metadata_lookup_generic_class): Change
13120 signature to take the components of a MonoGenericClass rather than
13121 an allocated MonoGenericClass. Change semantics to be intern-like.
13122 * reflection.c (mono_class_bind_generic_parameters): Update to
13123 changes. Make locking region tighter.
13124 * class.c (inflate_generic_class): Update to changes.
13125 (get_shared_generic_class): Likewise.
13126 * metadata-internals.h: Likewise.
13128 * reflection.c (mono_class_bind_generic_parameters): Take and
13129 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
13130 (mono_reflection_bind_generic_parameters): Use
13131 'mono_class_bind_generic_parameters' rather than duplicate the code.
13132 * class.c (mono_bounded_array_class_get): Update to changes.
13133 * object-internals.h: Likewise.
13135 * reflection.c (mono_class_bind_generic_parameters): Only support
13136 parameterizing generic type definitions. Remove support for other
13139 2007-06-08 Zoltan Varga <vargaz@gmail.com>
13141 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
13143 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
13144 in the dynamic case.
13146 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
13148 * threads.c: When cleaning up thread, reset the Background bit.
13151 2007-06-08 Jonathan Chambers <joncham@gmail.com>
13153 * metadata.c: Move variable declarations to top of scope.
13154 * verify.c: Move variable declarations to top of scope.
13156 Code is contributed under MIT/X11 license.
13158 2007-06-08 Raja R Harinath <rharinath@novell.com>
13160 * reflection.c (mono_class_bind_generic_parameters): Replace
13161 open-coded loop with mono_metadata_inflate_generic_inst.
13163 * class.c (get_shared_generic_class): Don't call
13164 mono_get_shared_generic_inst. Use the container's own
13167 * metadata.c (mono_metadata_load_generic_params): Move
13168 initialization of 'context' field here from ...
13169 * class.c (mono_class_create_from_typedef): ... here, and ...
13170 * loader.c (mono_get_method_from_token): ... here.
13172 * class.c (get_shared_generic_class): Rename from
13173 mono_get_shared_generic_class and make static.
13174 (mono_get_shared_generic_inst): Move to metadata.c.
13175 * loader.c (mono_get_shared_generic_method): Likewise.
13176 * class-internals.h, metadata-internals.h: Update to changes.
13179 * class.c (mono_class_from_generic_parameter): Don't assume a
13180 generic container owner exists. Generic containers from monodis
13183 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
13185 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
13186 * verify.h: new typedefs to returns the non-verifiable status
13187 * verify.c: initial implementation of generics, stack merging and object compatibility check
13189 2007-06-06 Mark Probst <mark.probst@gmail.com>
13191 * class.c, image.c, class-internals.h (MonoImage): class_cache is
13192 a MonoInternalHashTable again (fixed bug in internal hash table
13195 2007-06-06 Mark Probst <mark.probst@gmail.com>
13197 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
13198 MonoInternalHashTable again (fixed bug in internal hash table
13201 2007-06-06 Mark Probst <mark.probst@gmail.com>
13203 * class.c, image.c, class-internals.h, domain.c,
13204 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
13205 changes. Have to figure out what makes them break the SWF
13208 2007-06-04 Mark Probst <mark.probst@gmail.com>
13210 * class.c, image.c, class-internals.h (MonoImage): class_cache is
13211 a MonoInternalHashTable now.
13213 2007-06-04 Mark Probst <mark.probst@gmail.com>
13215 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
13216 MonoInternalHashTable now.
13218 2007-05-31 Zoltan Varga <vargaz@gmail.com>
13220 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
13223 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
13225 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
13226 dependent trampoline.
13228 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13230 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
13232 2007-05-29 Robert Jordan <robertj@gmx.net>
13234 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
13236 2007-05-28 Zoltan Varga <vargaz@gmail.com>
13238 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
13240 2007-05-25 Jonathan Chambers <joncham@gmail.com>
13242 * marshal.c: Fix interface lookup loops for
13243 cominterop_get_com_slot_for_method and
13244 cominterop_get_method_interface. Only need to lookup
13245 if type is a class, else use interface type method is on.
13247 Code is contributed under MIT/X11 license.
13249 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
13251 * reflection.c: HasSecurity can be present even if no specially
13252 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
13253 SecurityAttribute). Fix CAS regression tests on buildbot.
13255 2007-05-24 Jonathan Chambers <joncham@gmail.com>
13257 * appdomain.c: Add configure checks for header files.
13258 * image.c: Add configure checks for header files.
13259 * file-io.c: Add configure checks for header files.
13260 * debug-mono-symfile.c: Add configure checks for header files.
13261 * threadpool.c: Add configure checks for header files.
13262 * console-io.c: Add configure checks for header files.
13263 * profiler.c: Add configure checks for header files.
13264 * rawbuffer.c: Add configure checks for header files.
13265 * icall.c: Add configure checks for header files.
13266 * rand.c: Add configure checks for header files.
13267 * socket-io.c: Add configure checks for header files.
13269 Code is contributed under MIT/X11 license.
13271 2007-05-24 Zoltan Varga <vargaz@gmail.com>
13273 * reflection.c (mono_custom_attrs_from_builders): Remove the
13274 assertion as it breaks the build.
13276 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
13278 * reflection.c (lookup_custom_attr): Make a copy here too.
13280 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
13283 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
13286 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
13289 2007-05-22 Zoltan Varga <vargaz@gmail.com>
13291 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
13292 (load_cattr_value): Ditto.
13294 2007-05-20 Zoltan Varga <vargaz@gmail.com>
13296 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
13298 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
13300 * threads.c: In "start_wrapper", set apartment_state to MTA if
13301 apartment_state is Unknown and we're running on 2.0 profile or
13303 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
13304 to main method, then set apartment_state to Unknown on 1.0 profile,
13305 and MTA on 2.0 profile.
13307 2007-05-16 Jb Evain <jb@nurv.fr>
13309 * class-internals.h (MonoDefaults): Add an attribute_class and
13310 customattribute_data_class.
13311 * domain.c (mono_init_internal): Populate them.
13312 * reflection.c: Use them to remove duplicates. Make a vew
13313 MonoClass variables `static'.
13315 2007-05-15 Massimiliano Mantione <massi@ximian.com>
13317 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
13318 step in implementing IMT, so that all isinst checks now can go
13319 through the bitmap.
13320 This was needed because vtables for TransparentProxy need to look
13321 like the vtable of the "target" class, so they need to point to
13322 its interface bitmap directly.
13324 * object.c: inside "mono_class_create_runtime_vtable" and
13325 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
13327 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
13329 * object-internals.h
13330 culture-info.h : added territory field in MonoCulture and
13331 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
13332 * locales.c : fill territory field above too.
13333 * culture-info-table.h : regenerated.
13335 2007-05-12 Zoltan Varga <vargaz@gmail.com>
13337 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
13340 2007-05-11 Jonathan Chambers <joncham@gmail.com>
13342 * object.c: Always initialize apartment, even if
13343 there is no custom attributes on entry point.
13345 Code is contributed under MIT/X11 license.
13347 2007-05-10 Jonathan Chambers <joncham@gmail.com>
13349 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
13350 * metadata.c: If no encoding is set, check for unicode
13353 Code is contributed under MIT/X11 license.
13355 2007-05-09 Jonathan Chambers <joncham@gmail.com>
13357 * threads.c: Handle if mono_thread_current returns NULL
13359 Code is contributed under MIT/X11 license.
13361 2007-05-09 Jonathan Chambers <joncham@gmail.com>
13363 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
13364 in start_wrapper. Added mono_thread_init_apartment_state and
13365 mono_thread_cleanup_apartment_state.
13366 * object.c: Initialize thread apartment state on main thread
13367 by checking for STAThreadAttribute on entry point.
13368 * object-internals.h: Add apartment_state field to MonoThread.
13369 * threads-types.h: Add unmanaged definition of
13370 System.Threading.ApartmentState, MonoThreadApartmentState.
13372 Code is contributed under MIT/X11 license.
13374 2007-05-08 Jonathan Chambers <joncham@gmail.com>
13376 * class.c: Fix windows build.
13377 * class-internals.h: Fix windows build.
13379 Code is contributed under MIT/X11 license.
13381 2007-05-08 Robert Jordan <robertj@gmx.net>
13383 * process.c (CreateProcess_internal):
13384 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
13385 .CreateNoWindow was specified. Fixes #81496.
13387 2007-05-08 Massimiliano Mantione <massi@ximian.com>
13389 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
13390 step in implementing IMT, replaced it with two compact arrays
13391 (interfaces_packed and interface_offsets_packed) and a bitmap that
13392 is used for isinst checks (interface_bitmap).
13394 * class.c: (compare_interface_ids): compare function to pass to
13395 bsearch when looking for an interface with a given id.
13396 (mono_class_interface_offset): reimplemented using bsearch on
13397 interfaces_packed, getting the offset from interface_offsets_packed.
13398 (print_implemented_interfaces): utility debugging function.
13399 (setup_interface_offsets): reworked to initialize interfaces_packed,
13400 interface_offsets_packed and interface_bitmap.
13402 * object.c: replaced all accesses to "MonoClass.interface_offsets"
13403 with uses of interfaces_packed and interface_offsets_packed.
13405 2007-05-08 Massimiliano Mantione <massi@ximian.com>
13407 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
13408 mono_class_interface_offset prototype to wrap all accesses to
13409 "MonoClass.interface_offsets".
13411 * class.c: Implemented mono_class_interface_offset, and wrapped all
13412 accesses to "MonoClass.interface_offsets".
13414 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
13415 "MonoClass.interface_offsets".
13417 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
13419 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
13420 GetMethodFromHandle overloads (bug #78637).
13422 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
13424 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
13425 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
13427 2007-05-01 Zoltan Varga <vargaz@gmail.com>
13429 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
13432 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
13434 (mono_custom_attrs_from_index): Ditto.
13436 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
13439 2007-04-30 Zoltan Varga <vargaz@gmail.com>
13441 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
13442 is now allocated from a mempool.
13444 2007-04-28 Zoltan Varga <vargaz@gmail.com>
13446 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
13447 caller holds threads_lock, leading to deadlocks. Fixes #81476.
13449 2007-04-26 Zoltan Varga <vargaz@gmail.com>
13451 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
13452 mono_loader_clear_error () too late. Fixes #81463.
13454 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
13456 * culture-info-table.h : regenerated.
13458 2007-04-25 Zoltan Varga <vargaz@gmail.com>
13460 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
13463 2007-04-25 Dick Porter <dick@ximian.com>
13465 * Makefile.am: Put the mingw enforced-optimisation back into the
13466 PLATFORM_WIN32 section.
13468 2007-04-24 Zoltan Varga <vargaz@gmail.com>
13470 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
13473 * image.c (mono_image_load_module): New API function to load a module reference.
13475 * image.c (load_modules): Load modules lazily. Fixes #80812.
13477 * class.c (mono_class_from_typeref): Use mono_image_load_module.
13479 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
13481 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
13482 to mono_image_load_module_dynamic.
13484 2007-04-23 Jonathan Chambers <joncham@gmail.com>
13486 * marshal.c: Fix calling convention for CCW on non-windows
13487 platforms. STDCALL on windows, CDECL everywhere else to work
13488 with XPCOM and MainWin COM.
13490 Code is contributed under MIT/X11 license.
13492 2007-04-23 Martin Baulig <martin@ximian.com>
13497 (method_from_memberref): Added `gboolean *used_context' argument.
13498 (mono_get_method_from_token): Likewise.
13499 (mono_get_method_full): Don't insert the method in the cache when
13500 `used_context' is true.
13502 2007-04-23 Raja R Harinath <rharinath@novell.com>
13504 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
13506 * reflection.c (mono_reflection_bind_generic_parameters): Don't
13507 create new MonoTypes for returned types.
13508 * class.c (mono_generic_class_get_class): Export mono-internal.
13509 * class-internals.h: Update to changes.
13511 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
13513 * threadpool.c, threadpool.h, icall-def.h: patch from
13514 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
13516 2007-04-18 Zoltan Varga <vargaz@gmail.com>
13518 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
13520 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
13522 * threads.c (mono_thread_get_stack_bounds): New helper function.
13524 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
13525 Correctly compute stack bounds when attaching. Fixes #81394.
13527 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
13529 * reflection.c: fix handling of doubles in custom attributes
13530 for the arm-fpa format (bug #81368).
13532 2007-04-18 Raja R Harinath <rharinath@novell.com>
13534 * reflection.c (assembly_add_win32_resources): Mildly relax an
13535 bounds check to let the end pointer point just past the end of the
13536 allocated buffer. (may fix #81384)
13538 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
13540 * culture-info-table.h : regenerated.
13542 2007-04-07 Zoltan Varga <vargaz@gmail.com>
13544 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
13545 the thread is aborted early.
13547 2007-04-05 Dick Porter <dick@ximian.com>
13549 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
13550 FindFirstFile()/FindNextFile() to find entries. This lets the
13551 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
13554 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
13556 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
13558 2007-04-04 Martin Baulig <martin@ximian.com>
13561 (mono_method_desc_full_match): Add support for nested classes.
13563 2007-04-02 Zoltan Varga <vargaz@gmail.com>
13565 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
13567 2007-04-01 Zoltan Varga <vargaz@gmail.com>
13569 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
13570 waiting for too many threads.
13572 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
13574 * environment.c: Fix return value check on uname so we can get the
13575 executing version on Solaris operating systems.
13577 2007-03-28 Jb Evain <jbevain@gmail.com>
13579 * class.c (mono_type_get_name_recurse): Complete the
13580 fix for the creation of assembly qualified names for
13581 pointer types. Fixes #81208.
13583 2007-03-27 Dick Porter <dick@ximian.com>
13585 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
13586 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
13590 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
13591 the value of ReleaseMutex().
13593 2007-03-27 Dick Porter <dick@ximian.com>
13595 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
13596 in little-endian order, not network endian, so must be converted
13597 to host endian here. Fixes bug 80593.
13599 2007-03-22 Jb Evain <jbevain@gmail.com>
13601 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
13602 qualified names for pointer types. Fixes #81208.
13604 2007-03-21 Jonathan Chambers <joncham@gmail.com>
13606 * marshal.c: Add support for PreserveSigAttribute.
13608 Code is contributed under MIT/X11 license.
13610 2007-03-14 Zoltan Varga <vargaz@gmail.com>
13612 * process.c: Fix endianness issues. Fixes #81126.
13614 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
13615 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
13617 * image.c (mono_image_lookup_resource): Make this work on big-endian
13618 machines.Change API contract so the caller needs to free the return value.
13620 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
13623 2007-03-14 Martin Baulig <martin@ximian.com>
13625 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
13626 mono_type_get_desc() as well.
13628 2007-03-13 Jonathan Chambers <joncham@gmail.com>
13630 * icall.c: Fix environ access in VS.
13632 2007-03-13 Alp Toker <alp@atoker.com>
13634 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13635 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13638 2007-03-12 Zoltan Varga <vargaz@gmail.com>
13640 * reflection.c (mono_reflection_create_dynamic_method): Add support for
13641 circular references among dynamic methods. Fixes #81091.
13643 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
13645 2007-03-09 Martin Baulig <martin@ximian.com>
13647 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
13649 2007-03-09 Jonathan Chambers <joncham@gmail.com>
13651 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
13652 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
13654 Code is contributed under MIT/X11 license.
13656 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
13658 * loader.c: Reapply patch for bug #79424.
13660 2007-03-06 Zoltan Varga <vargaz@gmail.com>
13662 * metadata.c (mono_type_to_unmanaged): Only convert object to
13663 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
13665 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
13667 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
13668 (and incorrectly set) is_reference field from MonoGenericInst.
13670 2007-03-06 Zoltan Varga <vargaz@gmail.com>
13672 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
13675 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
13677 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
13679 2007-03-05 Miguel de Icaza <miguel@novell.com>
13681 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
13682 FileOptions.1 value to mean "temporary", map that to
13683 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
13687 2007-03-03 Marek Habersack <mhabersack@novell.com>
13689 * appdomain.c: implement MS .Net style shadow copying. Copies of
13690 the assemblies are made in a subdirectory of the dynamic base
13691 directory, the assembly names are preserved.
13692 Copy .mdb and .config files along with the assemblies being shadowed.
13694 2007-02-28 Zoltan Varga <vargaz@gmail.com>
13696 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
13697 (emit_marshal_handleref): Ditto.
13699 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
13700 on Visual C++. Fixes #80671.
13702 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13704 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
13705 for clone operations.
13707 2007-02-28 Zoltan Varga <vargaz@gmail.com>
13709 * marshal.c: Fix warnings.
13711 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
13713 * loader.c: allow case-insensitive matching of the dll name
13714 in dllmap handling when prefixed with "i:".
13716 2007-02-20 Jonathan Chambers <joncham@gmail.com>
13718 * threads.c: Fix #ifdef for dummy_apc function for VS.
13720 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
13722 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
13724 2007-02-19 Massimiliano Mantione <massi@ximian.com>
13725 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
13726 giving precedence to the methods with a fully qualified name
13727 (InterfaceName.MethodName) when building the interface sections
13730 2007-02-16 Dick Porter <dick@ximian.com>
13732 * threadpool.c (append_job): Fix fast-path array handling, so it's
13733 less likely the array will grow exponentially when the load is
13736 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13738 * metadata-internals.h, loader.c: fix dllmap lookup order
13739 for non-function maps, too, and prepare for fallback code.
13741 2007-02-12 Robert Jordan <robertj@gmx.net>
13743 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
13744 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
13745 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
13746 GlobalFree. Fixes a part of bug #77075.
13748 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
13750 * loader.c: implemented typedef parent in field memberref.
13752 2007-02-11 Jonathan Chambers <joncham@gmail.com>
13754 * marshal.c: Fix warnings and remember to call Release on
13757 Code is contributed under MIT/X11 license.
13759 2007-02-10 Miguel de Icaza <miguel@novell.com>
13761 * class-internals.h: Add MonoHandleRef definition, and
13762 handleref_class to mono_defaults.
13764 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
13765 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
13767 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
13768 (do nothing on this stage)
13769 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
13770 (emit_marshal_handleref): New method, used for argument handling
13773 2007-02-08 Jonathan Chambers <joncham@gmail.com>
13775 * class.c (mono_class_setup_parent): Lazily init com types.
13776 * domain.c (mono_init_internal, mono_init_com_types): Lazily
13778 * object.c (mono_remote_class_vtable): Lazily init com types.
13779 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
13780 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
13781 * domain-internals.h: Expose mono_init_com_types.
13782 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
13783 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
13784 Add support for COM Callable Wrapper marshalling.
13785 * marshal.h: Add icall definitions.
13786 * gc.c: Handle freeing of CCWs in finalizer code.
13788 Code is contributed under MIT/X11 license.
13790 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
13792 * reflection.c: changed all the signature encoding code to use
13793 a variable-sized buffer.
13795 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13797 * marshal.c: locking fixes: never take the loader lock
13798 or other runtime locks when holding the marshal lock
13801 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
13803 * marshal.c: make the delegate function pointer mapping
13804 work for the moving GC.
13806 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
13808 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
13811 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13813 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
13816 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13818 * threadpool.c: made the code moving-GC safe.
13820 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13822 * assembly.c, boehm-gc.c, class-internals.h, class.c,
13823 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
13824 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
13826 * reflection.c: warning cleanup, some threading and moving GC fixes.
13828 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
13830 * class.c, loader.c: create the needed Set/Get/Address array methods
13831 as well as the .ctors in mono_class_init (), fixes bug #80567.
13833 2007-01-24 Zoltan Varga <vargaz@gmail.com>
13835 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
13836 we doesn't decrease its alignment. Should fix the sparc build.
13838 2007-01-24 Dick Porter <dick@ximian.com>
13841 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13842 Create the returned object if we need to ignore an unsupported
13843 socket option. Fixes a segfault reported by Atsushi.
13845 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13847 * class.c, object.c: restrict GC-tracked fields to
13848 UIntPtr fields used inside corlib, so we provide better
13849 type info to the GC and also allow broken packing as in
13852 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
13854 * sgen-gc.c: removed duplicated function.
13856 2007-01-19 Miguel de Icaza <miguel@novell.com>
13858 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
13859 value that means that the value is not supported, but that we
13860 should not return a failure, but instead report this as a
13861 successful operation.
13863 2007-01-19 Raja R Harinath <rharinath@novell.com>
13865 Fix tests/bug79956.2.il
13866 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
13867 (mono_generic_class_get_class): If the generic definition in an
13868 enum, copy over other fields related to it.
13870 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13872 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
13873 genericinst enums (bug #79215).
13875 2007-01-17 Massimiliano Mantione <massi@ximian.com>
13876 * class.c: Fix bug 80307.
13878 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
13880 * image.c: if the file table is not present, try to load
13881 all the modules, since we don't have info about them
13882 having or not metadata (bug #80517).
13883 * assembly.c: allow mono_assembly_load_references () to
13884 work for netmodules.
13886 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13888 * image.c, metadata-internals.h, object.c: execute module
13889 cctors when running on the 2 runtime if present (bug #80487).
13891 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13893 * icall.c: optimized InitializeArray() on bigendian.
13895 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
13897 * icall.c: fix for the broken ARM FPA double format.
13899 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13901 * icall.c: handle endian issues for r4 and r8 types, too, in
13902 the InitializeArray() icall.
13904 2007-01-15 Miguel de Icaza <miguel@novell.com>
13906 * loader.c (mono_loader_error_prepare_exception): Clear the error
13907 once we have extracted the information from it, do this before we
13908 call into the JIT's class loading mechanisms.
13910 * object.c (mono_class_create_runtime_vtable): Do not clear the
13911 loader error before calling mono_class_get_exception_for_failure
13912 as the loader error is needed inside
13913 mono_class_get_exception_for_failure to throw the error (thinko).
13917 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13919 * reflection.c: align fields rva data so it's faster to load at
13922 2007-01-12 Raja R Harinath <rharinath@novell.com>
13924 Prepare to simplify GenericMethod handling.
13925 * class-internals.h (mono_method_get_context): New accessor function.
13926 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
13927 rather than directly accessing '->context' field.
13929 * class-internals.h (_MonoGenericParam.method): Move ...
13930 (_MonoGenericContainer): ... here. Add into union with klass field.
13931 * class.c, icall.c, loader.c, metadata.c, reflection.c:
13934 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
13936 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
13937 the wrapper type enum and reduce relocations.
13939 2007-01-12 Raja R Harinath <rharinath@novell.com>
13941 * reflection.c (inflate_mono_method): Reuse method instantiation
13942 from the generic method, if available.
13944 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13946 * marshal.c (emit_marshal_variant): Fix conv_arg
13947 type in last commit, based on whether parameter is byref.
13949 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13951 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
13953 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
13954 MONO_TYPE_OBJECT back for VARIANT support.
13956 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13958 * marshal.c, marshal.h, icall-def.h: Implement
13959 Marshal.ReAllocCoTaskMem.
13961 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
13963 * marshal.c: memory retention fixes: use the proper
13964 image cache for runtime_invoke method lookups.
13966 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13968 * mempool.c: added code to help debug mempool allocations.
13970 2007-01-11 Dick Porter <dick@ximian.com>
13972 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
13973 support (experimenting with faking it with IP_MTU_DISCOVER for
13974 systems that don't have IP_DONTFRAGMENT.)
13975 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
13978 * icall-def.h: new System.Net.Sockets.Disconnect icall.
13980 * socket-io.h: Add new fields to MonoSocketAsyncResult
13981 corresponding to the new ones in Socket.cs.
13983 2007-01-11 Raja R Harinath <rharinath@novell.com>
13985 Fix IronPython regression mentioned in #80249
13986 * metadata.c (do_mono_metadata_parse_generic_class): Clear
13987 'cached_context' field, since it may have been initialized as a
13988 side-effect of metadata parsing.
13990 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
13991 (_MonoGenericClass.cached_class): Move here and rename from lone
13992 remaining field of ...
13993 (_MonoInflatedGenericClass): ... this. Remove.
13994 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
13997 Fix mcs/tests/test-128.cs regression.
13998 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
13999 2007-01-10 change below.
14000 [MONO_TYPE_OBJECT]: Recurse into array case.
14002 2007-01-11 Raja R Harinath <harinath@gmail.com>
14004 * class-internals.h (mono_get_inflated_generic_class): Remove.
14005 * class.c (mono_get_inflated_generic_class): Remove.
14006 (mono_generic_class_get_class): Rename from
14007 mono_class_create_generic.
14008 (mono_class_from_mono_type) [GENERICINST]: Use it.
14009 * reflection.c, metadata.c: Update to changes. Use
14010 'mono_class_from_mono_type'.
14012 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
14014 * reflection.c: use passed type when encoding an array element
14015 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
14017 2007-01-09 Robert Jordan <robertj@gmx.net>
14019 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
14020 result arguments (someDelegate.EndInvoke (unrelatedAres)).
14023 2007-01-09 Raja R Harinath <rharinath@novell.com>
14025 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
14027 * object.c (set_value): Avoid aliasing between type->data.klass
14028 and type->data.generic_class.
14030 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
14032 2007-01-08 Raja R Harinath <rharinath@novell.com>
14034 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
14035 between type->data.klass and type->data.generic_class.
14037 2007-01-08 Lluis Sanchez <lluis@ximian.com>
14039 * marshal.c: In MS.NET, StringBuilder objects are not copied by
14040 value in out parameters.
14042 2007-01-08 Raja R Harinath <rharinath@novell.com>
14044 Simplify invariant for MonoGenericClass::klass field.
14045 * class.c (mono_class_create_generic): Verify 'klass' is null.
14046 * metadata.c (do_mono_metadata_parse_generic_class): Don't
14047 initialize 'klass' field.
14049 2007-01-05 Raja R Harinath <rharinath@novell.com>
14051 Ongoing work to avoid redundant data and simplify invariants.
14052 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
14053 'generic_class', and change type to a GenericInst.
14054 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
14055 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
14057 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
14059 * class.c : skip io-layer under PLATFORM_WIN32.
14061 2007-01-03 Tor Lillqvist <tml@novell.com>
14063 Fix #80305: In a bundled executable, look in the bundled exe
14064 assembly to determine the runtime version. Add the possibility to
14065 bundle also the machine.config file.
14067 * assembly.c (mono_assembly_open_from_bundle): Make
14068 non-static. Allow being called even if we have no bundled
14069 assemblies, and return NULL right away in that case.
14071 * domain-internals.h: Declare mono_assembly_open_from_bundle()
14074 * domain.c (app_config_parse): Take an assembly exe file name as
14075 parameter instead of a config file name. Check for a bundled
14076 config file for that assembly by calling
14077 mono_config_string_for_assembly_file() (see below) before looking
14078 for one in the file system.
14079 (get_runtimes_from_exe): Corrsponding change to call of
14080 app_config_parse().
14081 (get_runtimes_from_exe): Check for bundled assembly exe file first
14082 by calling mono_assembly_open_from_bundle(). If no bundled
14083 assembly exe file is found, call mono_image_open() as before to
14084 look it up in the file system.
14086 * mono-config.c: Add variable bundled_machinec_onfig.
14087 (mono_config_string_for_assembly_file): New function.
14088 (mono_config_for_assembly): Move code snippet that looks for a
14089 bundled assembly .config file into the above new function. Call
14091 (mono_register_machine_config, mono_get_machine_config): New
14092 functions to set and retrieve
14094 * assembly.h: Declare mono_register_machine_config().
14096 * mono-config.h: Declare mono_get_machine_config() and
14097 mono_config_string_for_assembly_file().
14099 * icall.c: No declaration of environ necessary on Win32. It is
14100 declared (as a macro expanding to a function call) in stdlib.h.
14101 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
14102 New internal mono function. Returns the value of
14103 mono_get_machine_config() as a Mono string.
14105 * icall-def.h: Add get_bundled_machine_config().
14107 2007-01-04 Raja R Harinath <rharinath@novell.com>
14109 Remove redundant field
14110 * class-internals.h (_MonoGenericContext.container): Remove field.
14111 * loader.c (mono_method_get_signature_full): Don't parse a
14112 "container" for a signature parse when the signature is inflated
14114 (method_from_methodspec): Likewise, for a generic_inst.
14115 * class.c, metadata.c, reflection.c: Update to changes.
14117 2006-01-04 Raja R Harinath <rharinath@novell.com>
14119 * class-internals.h (_MonoGenericClass): Rename 'context' field to
14120 'cached_context', and change semantics -- it starts off NULL, and
14121 is initialized on demand.
14122 * class.c (mono_generic_class_get_context): New accessor to
14123 replace 'context' field accesses.
14124 (mono_class_get_context): New helper.
14125 (*): Update to changes.
14126 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
14128 2007-01-03 Miguel de Icaza <miguel@novell.com>
14130 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
14131 before the memcpy. Fixes Marshal2 regression.
14133 2007-01-02 Jb Evain <jbevain@gmail.com>
14135 * blob.h: add a MONO_TYPE_ENUM definition
14136 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
14137 fix the encoding of arrays of enums in custom attributes.
14141 2007-01-01 Miguel de Icaza <miguel@novell.com>
14143 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
14144 string is null terminated, but only cut the string short if it
14145 overflows the buffer.
14147 (mono_string_to_byvalstr): Also fix this routine. The code here
14148 was not properly terminating a string (it was only terminated
14149 because of the previous catch-all memset).
14151 I left the memset, because I do not know if applications expect
14152 the runtime to clear this region.
14156 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
14157 Clear the error before returning to unmanaged code to prevent the
14158 runtime from being confused later on (fixes 80420).
14159 (ves_icall_type_from_name): Always call mono_loader_clear_error
14160 after parsing a type that could have failed.
14161 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
14163 * loader.c (mono_loader_clear_error): Fix indentation.
14165 2006-12-28 Martin Baulig <martin@ximian.com>
14167 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
14169 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14171 * reflection.c: patch from Rolf Bjarne Kvinge to fix
14172 getting a token for an EnumBuilder.
14174 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
14176 * reflection.c: be more careful in case resource generation
14177 fails to create the data array.
14179 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14181 * sgen-gc.c: write barrier for clone and fix unregister handles.
14183 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14185 * reflection.c: some fixes needed in the generics code for the moving GC.
14187 2006-12-22 Robert Jordan <robertj@gmx.net>
14189 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
14190 account. Fixes bug #80299.
14192 2006-12-21 Raja R Harinath <rharinath@novell.com>
14194 Fix WaitHandle usage in delegates.
14195 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
14196 * object.c (mono_wait_handle_new): Use the property set method to
14197 initialize the handle.
14198 (mono_wait_handle_get_handle): New.
14199 * threadpool.c (mono_async_invoke): Use it.
14200 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
14202 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
14204 2006-12-21 Jonathan Chambers <joncham@gmail.com>
14206 * marshal.c (emit_marshal): Call emit_marshal_variant and
14207 emit_marshal_com_interface when applicable.
14208 (emit_marshal_variant, emit_marshal_com_interface): Add
14209 methods for this case and remove if's from emit_marshal_object.
14211 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
14213 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
14215 2006-12-19 Jonathan Chambers <joncham@gmail.com>
14217 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
14218 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
14219 and GlobalFree on Windows. Remove FIXME.
14221 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14223 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
14224 implementation for managed objects.
14226 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
14228 * object.c: implemented code to be used for checking
14229 that no reference field overlaps with non-references.
14231 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14233 * threadpool.c: fix queue code to be compatible with the
14236 2006-12-18 Miguel de Icaza <miguel@novell.com>
14238 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
14239 in structures by throwing ArgumentNullException.
14241 (emit_marshal_safehandle): Also when they are null parameters.
14243 (emit_marshal_safehandle): Add support for ref
14244 SafeHandles parameters
14246 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14248 * profiler.c: updated to use the mono-dl API instead of
14251 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14253 * profiler.c: updated to use the mono-dl dynamic loading
14254 API instead of gmodule.
14256 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14258 * profiler.c: use readlink, older versions of glib don't have
14259 g_file_read_link ().
14261 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14263 * profiler.c: try to detect the path to mono if libc fails to provide
14264 a useful name (bug #80286).
14266 2006-12-16 Raja R Harinath <rharinath@novell.com>
14269 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
14270 instance, use the generic type definition instead.
14271 (ves_icall_Type_GetNestedTypes): Likewise.
14272 * class.c (mono_class_create_generic): Always set the
14273 nested_classes of a generic instance to NULL, even if the generic
14274 type definition has nested types.
14276 2006-12-15 Jonathan Chambers <joncham@gmail.com>
14278 * marshal.c (mono_string_from_bstr): Revert previous Windows change
14281 2006-12-15 Miguel de Icaza <miguel@novell.com>
14283 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
14284 my arguments were in the wrong order. I also fixed the Windows
14285 version which seems to have had the same issue.
14287 (mono_free_bstr): On Unix, this is g_free.
14288 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
14289 conversions (for the tests in corlib to pass).
14291 2006-12-14 Miguel de Icaza <miguel@novell.com>
14293 * marshal.c (emit_ptr_to_object_conv): For now, ignore
14294 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
14295 exception if a ref SafeHandle in a struct has changed).
14297 (emit_struct_conv): Do not perform layout checks for classes
14298 derived from SafeHandle, as those are specially handled.
14300 (emit_object_to_ptr_conv): Add support for
14301 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
14303 (emit_marshal_safehandle): Implement conversion of return values
14304 of safehandles (MARSHAL_ACTION_CONV_RESULT).
14306 * threads.c: WaitHandle now is compiled with two different handles
14307 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
14310 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
14311 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
14312 these routines to cope with both kinds of fields.
14314 2006-12-12 Miguel de Icaza <miguel@novell.com>
14316 * metadata.c (mono_type_to_unmanaged): Handle the case where
14317 type->data.klass is a SafeHandle, and in that case, return the
14318 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
14319 MONO_MARSHAL_CONV_SAFEHANDLE.
14321 2006-12-11 Miguel de Icaza <miguel@novell.com>
14323 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
14324 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
14325 calling emit_marshal_object.
14327 (emit_marshal_safehandle): Implement marshalling of
14328 SafeHandle parameters (no ref support yet).
14330 (MarshalAction): Document the defines as I implement
14331 them for SafeHandle.
14333 (emit_marshal_object): indentation police.
14335 * class-internals.h: Define MonoSafeHandle.
14336 Add safehandle_class to MonoDefaults type.
14338 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
14339 list of classes to check for fields.
14341 * domain.c (mono_init_internal): Add SafeHandle to the list of
14342 mono_defaults loaded.
14344 2006-12-15 Raja R Harinath <rharinath@novell.com>
14347 * reflection.c (mono_reflection_bind_generic_parameters): If the
14348 generic type definition is a type builder, ensure that it is fully
14349 initialized before instantiating it. Kill some dead code.
14351 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14353 * object.c: clear the loader_error () before loading
14354 more metadata stuff (bug #80258).
14356 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
14358 * icall.c, icall-defs.h: type modifiers icalls for
14359 parameters and properties.
14361 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
14363 * object.c, icall.c: fixed warnings.
14365 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14367 * marshal.c: fixed a couple of leaks and coding style in a few places.
14369 2006-12-08 Dick Porter <dick@ximian.com>
14371 * process.c: Cope with NULL ProcessStartInfo arguments on windows
14372 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
14375 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14377 * process.c: ProcessStartInfo may have only filename set and
14378 arguments can be NULL.
14380 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14382 * icall.c: fix leak found by Robert Jordan.
14384 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14386 * marshal.c, marshal.h: generate managed method to access an element
14387 of a multi-dimensional array.
14389 2006-11-30 Paolo Molaro (lupus@ximian.com)
14391 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
14393 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14395 * icall.c: back out GetFields () fix until the serialization code is
14396 fixed to not depend on the incorrect behaviour.
14398 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14400 * profiler.c: provide defaults if none are set.
14402 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14404 * Makefile.am, attrdefs.h: new public header file with
14405 constants for attributes for use by embedders.
14407 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14409 * icall.c: GetFields () fix for bug #80064.
14411 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
14413 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
14414 removed long unused icalls.
14416 2006-11-27 Jonathan Chambers <joncham@gmail.com>
14419 (mono_marshal_emit_managed_wrapper): Level of indirection for
14420 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
14421 can be generated without a delegate class.
14422 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
14424 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14426 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14428 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
14431 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
14433 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
14434 icall-def.h: added icalls needed by System.GC.
14436 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
14438 * loader.c: ensure the class in catch clauses is handled
14439 correctly for generics methods (fixes bug#79980).
14441 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
14443 * monitor.h, monitor.c: added mono_locks_dump () function
14444 to help debug deadlocks involving managed locks.
14446 2006-11-13 Dick Porter <dick@ximian.com>
14448 * file-io.c (get_file_attributes): If the file is a symlink try
14449 and get the stat data for the target, but also add the
14450 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
14451 the specs for the windows symlink support, but will probably have
14452 to be reworked when I have test data from a vista machine. Fixes
14455 2006-11-13 Dick Porter <dick@ximian.com>
14457 * gc.c (mono_domain_finalize):
14458 * marshal.c (mono_delegate_begin_invoke):
14459 * threadpool.c (socket_io_init, mono_thread_pool_init)
14460 (mono_thread_pool_finish):
14461 * monitor.c (mono_monitor_try_enter_internal):
14462 * threads.c (mono_thread_resume, mono_thread_init)
14463 (mono_thread_suspend_all_other_threads)
14464 (mono_thread_execute_interruption):
14465 * appdomain.c (mono_domain_unload): Check for NULL error returns
14466 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
14469 2006-11-11 Miguel de Icaza <miguel@novell.com>
14472 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
14473 Only close the handle if the value of the handle is not
14474 INVALID_HANDLE_VALUE. This just makes the process a bit more
14477 Improvement for #75733, so that we do not run into this problem.
14480 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
14481 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
14482 internal variables. Fixes #79462
14485 2006-11-09 Dick Porter <dick@ximian.com>
14487 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14488 Use poll() not select(). Fixes bug 79397.
14490 2006-11-09 Raja R Harinath <rharinath@novell.com>
14493 * assembly.c (mono_assembly_load_from_full): Check that the given
14494 image has an assembly manifest.
14496 2006-11-09 Ankit Jain <jankit@novell.com>
14498 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
14499 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
14500 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
14502 2006-11-07 Dick Porter <dick@ximian.com>
14504 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
14505 Put the old resolver behaviour back for pre-2.0 profiles.
14507 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
14509 * threadpool.c: precise GC and locking fixes.
14511 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14513 * class.c: don't load types that have an explicit unaligned
14514 managed reference. Provide better info in the TypeLoad exception.
14515 Part of the fix for bug #79744.
14516 * object.c: use the correct check for class type load issues.
14518 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
14520 * class.c: enforce alignment of fields with managed references
14521 even when Pack=1 is forced by the user (bug #77788).
14523 2006-11-03 Dick Porter <dick@ximian.com>
14525 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
14526 If the address reverse lookup fails, return it as the hostname
14527 anyway. Fixes bug 79721.
14529 2006-11-03 Dick Porter <dick@ximian.com>
14531 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
14532 Fix build on Windows.
14534 2006-11-02 Dick Porter <dick@ximian.com>
14537 * object-internals.h:
14538 * exception.c (mono_get_exception_thread_interrupted):
14539 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
14542 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
14543 Check for pending Thread.Interrupt.
14545 2006-10-27 Massimiliano Mantione <massi@ximian.com>
14546 * loader.c: Fixed bug 79684.
14548 2006-10-27 Dick Porter <dick@ximian.com>
14550 * file-io.c (get_file_attributes): Force symlinks to directories
14551 to be returned as a regular file. Fixes bug 79733.
14552 2006-10-26 Dick Porter <dick@ximian.com>
14554 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
14555 CreateFile to open a directory then we need to set the
14556 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
14558 2006-10-23 Zoltan Varga <vargaz@gmail.com>
14560 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
14563 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14565 * sgengc.c: small cleanup of timer code.
14567 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14569 * sgen-gc.c: fix some warnings and start adding support for
14570 complete object removal on domain unload.
14572 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
14574 * assembly.c: build_assembly_name should not consider a version
14575 number without build or revision number invalid. Fixes bug #79715.
14577 2006-10-18 Jonathan Chambers <joncham@gmail.com>
14579 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
14580 call kernel32 function OutputDebugString directly.
14582 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14584 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
14586 * reflection.c: small cleanup, using a function to insert a MonoString
14587 in the string heap.
14589 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
14591 * reflection.c: moving GC fixes.
14593 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
14595 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
14596 all the objects with finalizers belonging to an unloading appdomain.
14598 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
14600 * sgen-gc.c: added ability to allocate even when the nursery is fully
14601 pinned and fixed a couple of bugs.
14603 2006-10-15 Zoltan Varga <vargaz@gmail.com>
14605 * threads.h: Revert the last change for now.
14607 * threads.h (mono_thread_get_pending_exception): Rename this to
14608 mono_thread_get_undeniable_exception ().
14610 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
14612 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
14613 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
14614 when fname does not refer to valid assembly. This result in a more
14615 meaningful error message.
14616 * exception.c: added mono_get_exception_bad_image_format2 which
14617 constructs a BadImageFormatException using the ctor taking a custom
14618 message and the file name. Passing in a NULL msg results in a default
14620 * exception.h: define mono_get_exception_bad_image_format2 function.
14621 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
14622 when file name pointed to an invalid IL image. Use
14623 mono_get_exception_file_not_found2 to construct FileNotFoundException,
14624 as this results in a more meaningful error message.
14626 2006-10-15 Zoltan Varga <vargaz@gmail.com>
14628 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
14631 2006-10-12 Zoltan Varga <vargaz@gmail.com>
14633 * metadata.c (mono_type_size): Change the align parameter to guint32 for
14634 consistency with the other _size functions.
14635 (mono_type_stack_size): Ditto.
14637 * class.c object.c icall.c: Fix warnings caused by the above change.
14639 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
14641 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
14643 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
14645 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
14647 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
14648 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
14649 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
14650 threadpool.h, threads-types.h: mark more internal functions.
14652 2006-10-11 Dick Porter <dick@ximian.com>
14654 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14655 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
14656 reproduce the bug even before applying the fix.)
14658 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
14660 * reflection.c: allow retrieving attributes for arguments in generic
14661 methods (bug #79241).
14663 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
14665 * debug-mono-symfile.c: properly check fopen () result (found by
14668 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
14670 * reflection.c: make error message clearer and fixed two
14671 issuelets found by Coverity.
14673 2006-10-10 Zoltan Varga <vargaz@gmail.com>
14675 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
14677 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
14679 * object-internals.h, gc-internal.h, profiler-private.h:
14680 mark internal functions.
14682 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14684 * reflection.c: put data in the text section.
14685 * icall.c: recognize more types in type_from_typename ().
14686 * process.c, marshal.c: added some GC FIXMEs.
14688 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14690 * loader.c: check for NULL before initializing.
14692 2006-10-09 Zoltan Varga <vargaz@gmail.com>
14694 * gc.c (finalizer_thread): Use a non-alertable wait here.
14696 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
14697 until the correct solution is found.
14699 2006-10-06 Zoltan Varga <vargaz@gmail.com>
14701 * reflection.c (mono_module_get_object): Avoid an assert when operating on
14702 modules with no metadata. Fixes #79596.
14704 * image.c (load_metadata_ptrs): Put back the error message when
14705 the #- heap is encountered since the support is not complete yet.
14707 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14709 * gc.c: do not allow the user to SuppressFinalize () a
14710 delegate because it would leak the trampoline if present.
14712 2006-10-06 Zoltan Varga <vargaz@gmail.com>
14714 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
14717 2006-10-05 Zoltan Varga <vargaz@gmail.com>
14719 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
14721 * metadata.c (mono_metadata_get_param_attrs): Ditto.
14723 * row-indexes.h: Add definitions for *Ptr tables.
14725 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
14727 * metadata.c (mono_metadata_translate_token_index): New helper function to
14728 translate table indexes used in uncompressed metadata.
14729 (mono_metadata_decode_table_row): Ditto.
14730 (mono_metadata_decode_table_row_col): Ditto.
14732 * metadata.c: Add table schema for *Ptr tables.
14734 * class.c loader.c: Use the new helper function to access the affected metadata
14737 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
14740 2006-10-04 Zoltan Varga <vargaz@gmail.com>
14742 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
14743 sequences which can be unbounded in size. Fixes #79583.
14745 2006-10-02 Zoltan Varga <vargaz@gmail.com>
14747 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
14748 static initialization.
14750 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
14752 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
14754 * domain.c (mono_domain_free): Free up type_init_exception_hash.
14756 * object.c (mono_runtime_class_init): Implement correct semantics when a static
14757 ctor fails, i.e. throw the same exception on subsequent accesses.
14759 2006-09-0 Jonathan Chambers <joncham@gmail.com>
14761 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
14762 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
14763 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
14764 Handle marshalling of interfaces and VARIANTs contained in structs.
14766 Code is contributed under MIT/X11 license.
14768 2006-09-30 Zoltan Varga <vargaz@gmail.com>
14770 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
14772 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
14775 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14777 * console-io.c: ignore previous SIGINT handler.
14779 2006-09-27 Zoltan Varga <vargaz@gmail.com>
14781 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
14782 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
14783 #79460, #79461, #79485.
14785 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
14787 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
14790 2006-09-26 Zoltan Varga <vargaz@gmail.com>
14792 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
14793 could be generated from it.
14795 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
14797 * rand.c: fix read loop to correctly handle EINTR.
14799 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14801 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
14802 internal calls are defined to keep methods closer to the declaring
14803 type and allow a significant reduction in runtime relocations and
14806 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
14808 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
14809 exception message to have FileNotFoundException use the default
14810 assembly load error message. Fixes bug #79426.
14811 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
14813 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14815 * threadpool.c: (start_thread_or_queue) use the root domain when
14816 creating the thread instead of the async object one.
14818 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
14820 * class.c, object.c, class-internals.h, reflection.c:
14821 for arrays, store element_size inside MonoClass (speedup
14822 for array object creation).
14824 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
14826 * icall.c: fixed CodeBase to use the file name and not the module
14829 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14831 * mono-debug.c, mono-debug.h: export find_method as
14832 mono_debug_find_method ().
14834 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14836 * debug-helpers.c, class-internals.h: added a few functions useful
14837 when debugging under gdb.
14839 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14841 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
14842 characters that need special handling.
14844 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
14846 * mono-config.c: make the os/cpu specification more flexible,
14847 allowing lists and negation.
14849 2006-09-18 Jonathan Chambers <joncham@gmail.com>
14851 * marshal.c: COM Interop fixes. Handle case where method->klass.
14852 is interface. Handle BSTR/MonoString when null. Use CDECL as
14853 calling convention on non-windows platforms. This is for
14854 compatibility with XPCOM and MainWin COM.
14856 Code is contributed under MIT/X11 license.
14859 2006-09-18 Zoltan Varga <vargaz@gmail.com>
14861 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
14862 correctly. Fixes #79217.
14864 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
14866 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
14868 * mono-config.c: allow both an os and cpu attribute for dllmap
14869 and dllentry elemnets to enable a single config file to be used
14870 for multiple architectures.
14872 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
14874 * loader.c: MonoLoaderError was cleared too soon on load failure.
14877 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
14879 * icall.c: use the defining class vtable when accessing a
14880 static field, not a pobblibly derived class.
14882 2006-09-17 Zoltan Varga <vargaz@gmail.com>
14884 * icall.c string-icalls.c: Remove references to unicode.h.
14886 * unicode.h unicode.c Makefile.am: Remove these unused source files.
14888 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
14890 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
14891 indicating the image where custom marshaller types should be looked up.
14892 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
14893 custom marshallers, instead of corlib. Fixes #79425.
14895 2006-09-14 Zoltan Varga <vargaz@gmail.com>
14897 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
14899 2006-09-14 Jonathan Chambers <joncham@gmail.com>
14901 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
14902 Implement Environment.ProcessorCount.
14904 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
14905 Implement Environment.ProcessorCount.
14908 Add Environment.ProcessorCount icall.
14910 Patch by Jason McFall.
14912 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14914 * assembly.c: don't append .exe/.dll when the filename already contains
14915 one of those extensions.
14917 2006-09-12 Martin Baulig <martin@ximian.com>
14919 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
14920 to array interfaces.
14922 2006-09-11 Martin Baulig <martin@ximian.com>
14924 * reflection.c (mono_image_build_metadata): Create the
14925 MethodImpl's after emitting all types and methods, so we don't
14926 need another fixup pass for them.
14928 2006-09-11 Zoltan Varga <vargaz@gmail.com>
14930 * class.c (mono_class_from_name_case): Fix regression introduced by the last
14933 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
14935 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
14938 2006-09-10 Zoltan Varga <vargaz@gmail.com>
14940 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
14941 args is not set. Fixes #78926.
14943 2006-09-08 Zoltan Varga <vargaz@gmail.com>
14945 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
14947 * image.c (load_class_names): Move this to class.c, and rename it to
14948 'mono_image_init_name_cache'.
14949 (load_modules): Fix a warning.
14951 * class.c icall.c image.c: Initialize image->name_cache lazily.
14953 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
14954 on its name using information in the AOT file.
14956 * class.c (mono_class_from_name): Use the new hook function.
14958 2006-09-06 Zoltan Varga <vargaz@gmail.com>
14960 * reflection.c (mono_param_get_objects): Handle enum default parameter values
14963 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
14966 2006-09-06 Martin Baulig <martin@ximian.com>
14968 * icall.c (mono_lookup_internal_call): Small fix.
14970 2006-09-05 Raja R Harinath <rharinath@novell.com>
14972 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
14975 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
14977 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
14978 when --debug is specified.
14980 2006-09-04 Zoltan Varga <vargaz@gmail.com>
14982 * class.c (setup_generic_array_ifaces): Fix a warning.
14984 2006-09-04 Miguel de Icaza <miguel@novell.com>
14986 * Temporarily remove the patch to assemly.c that checks the
14987 assembly versions as it breaks our gacutil.
14989 2006-09-03 Zoltan Varga <vargaz@gmail.com>
14991 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
14993 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
14996 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
14997 created using the default ctor. Fixes #79152.
14998 (mono_string_builder_to_utf16): Ditto.
15000 2006-09-01 Martin Baulig <martin@ximian.com>
15002 Fix handling of the generic array interfaces.
15004 * class-internals.h
15005 (MonoDefaults): Removed `generic_array_class' and added
15006 `generic_ilist' class.
15009 (mono_bounded_array_class_get): Add the new generic array interfaces.
15010 (setup_generic_array_ifaces): New static method; create vtable
15011 entries for each method in the generic array interfaces.
15014 (select_container): Allow "parent-less" generic methods.
15017 (mono_marshal_get_generic_array_helper): New public method.
15020 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
15021 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
15022 moved the interncall into System.Array.
15024 2006-09-01 Raja R Harinath <rharinath@novell.com>
15026 A few more cases of avoiding work on types with ->byref set.
15027 Has the real fix for #79238
15028 * icall.c (is_generic_parameter): New helper.
15029 (ves_icall_Type_GetGenericParameterPosition): Use it.
15030 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
15031 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
15032 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
15033 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
15035 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
15037 (ves_icall_Type_get_IsGenericInstance): Likewise.
15038 (ves_icall_Type_get_IsGenericType): Likewise.
15040 2006-09-01 Zoltan Varga <vargaz@gmail.com>
15042 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
15045 * mempool.h (mono_mempool_get_allocated): New helper function.
15047 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
15050 * mempool.c: Fix warnings and the calculation of stats.
15052 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
15054 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
15056 * loader.c (mono_get_method_from_token): Update method_count stat.
15058 * class-internals.h (MonoStats): Add some stats.
15060 2006-08-31 Robert Jordan <robertj@gmx.net>
15062 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
15063 with managed variants.
15064 All code is contributed under the MIT/X11 license.
15066 2006-08-31 Zoltan Varga <vargaz@gmail.com>
15068 * reflection.c (reflection_methodbuilder_to_mono_method): Set
15069 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
15071 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
15073 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
15074 with cycles in classes.
15076 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
15078 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
15079 missing a [MarshalAs] directive. Fixes #79203.
15081 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
15082 klass->marshal_info. Fixes #79217.
15084 2006-08-30 Martin Baulig <martin@ximian.com>
15086 Committing a patch from Joachim Ante <joe@otee.dk>:
15087 Add support for binary data symbol stores.
15089 * debug-mono-symfile.c
15090 (mono_debug_open_mono_symbol_file): Renamed into
15091 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
15095 (mono_debug_open_image): Added `raw_contents' and `size' args.
15096 (mono_debug_init_2_memory): New public function.
15098 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
15100 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
15102 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15104 * appdomain.c: implement support for ShadowCopyFiles.
15106 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
15108 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
15109 when value is NULL (and should remove CID #51).
15111 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15113 * image.c: moved 2 functions to ../utils.
15115 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
15117 * gc.c: cope with the target object of a GC handle being NULL
15120 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
15122 * class.c: recursively check parent's explicit implementations
15123 of interface methods (fixes bug #79125).
15125 2006-08-19 Miguel de Icaza <miguel@novell.com>
15127 * filewatcher.c: Avoid warnings when building, do not redefine
15128 constants that are defined.
15132 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15134 * image.c: don't fail when the link points to an absolute path.
15136 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
15138 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
15141 2006-08-17 Miguel de Icaza <miguel@novell.com>
15143 * image.c (full_path): A new method used to obtain the actual path
15144 of an assembly even in the presence of symbolic links.
15146 This is necessary for the case where we are running a binary that
15147 has been GACed, but we are using the "published" path name
15148 ($prefix/mono/1.0/blah.exe) which happens to point to the real
15151 This was the source of the failure for the `xsp' command with the
15152 recent AppDomain changes, as far as the runtime was concerned,
15153 there were two different assemblies: $prefix/mono/1.0/blah.exe and
15154 $prefix/mono/gac/blah/version/blah.exe.
15156 (do_mono_image_open): use full path
15158 2006-08-17 Zoltan Varga <vargaz@gmail.com>
15160 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
15162 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
15164 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
15165 domain_id is supplied. Fix CID #241 and corlib's unit tests.
15167 2006-08-17 Zoltan Varga <vargaz@gmail.com>
15169 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
15170 small structures. Fixes #78990.
15172 2006-08-17 Zoltan Varga <vargaz@gmail.com>
15174 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
15176 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
15178 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15181 * marshal.c: don't load all the assemblies from a domain into newly
15182 created ones. The new domains might have different rules and load
15183 assemblies from different locations. Fixes bug #76757.
15185 Patch by Lluis. Conflicts resolved by Brian Crowell.
15187 2006-08-16 Alp Toker <alp@atoker.com>
15189 * socket-io.c: First half of the fix for #79084.
15190 Set sa_size to the length of the content, not that of the struct.
15191 Don't add NULL suffix to the content, this should be done in
15192 managed code if needed.
15194 2006-08-14 Raja R Harinath <rharinath@novell.com>
15197 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
15198 mono_metadata_parse_type returns NULL.
15200 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
15202 * normalization-tables.h : new file for string normalization data.
15203 * locales.c, locales.h, icall.c :
15204 added load_normalization_resource() for string normalization,
15206 * Makefile.am : added normalization-tables.h to the sources.
15208 2006-08-13 Zoltan Varga <vargaz@gmail.com>
15210 * marshal.c: Add more helper functions to reduce code duplication and use them
15213 2006-08-12 Zoltan Varga <vargaz@gmail.com>
15215 * marshal.c: Fix non-x86 stdcall warnings.
15217 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
15220 2006-08-11 Jonathan Chambers <joncham@gmail.com>
15222 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
15223 type check on multi-dimensional arrays. Fixes #79000.
15225 2006-08-10 Jonathan Chambers <joncham@gmail.com>
15227 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
15228 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
15229 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
15230 * class-internals.h: add is_com_object to class structure.
15231 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
15232 null checks to COM object marshalling. Fix .ctor call on RCW.
15233 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
15235 All code is contributed under the MIT/X11 license.
15237 2006-08-09 Dick Porter <dick@ximian.com>
15239 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
15240 racing mono_monitor_allocator_lock() somewhere, so don't delete
15241 the critical section for now. Found by running and exiting
15244 2006-08-10 Zoltan Varga <vargaz@gmail.com>
15246 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
15247 (ves_icall_System_ComObject_FindInterface): Ditto.
15248 (ves_icall_System_ComObject_CacheInterface): Ditto.
15250 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
15251 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
15253 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15255 * threadpool.c: treat pipes from process asynchronous reads as sockets
15256 when reading from them, so we get select/poll or epoll to wait for
15259 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
15261 * loader.c: Fix a typo (CID #233) in the null check.
15263 2006-08-07 Zoltan Varga <vargaz@gmail.com>
15265 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
15266 Hopefully fixes #78949.
15268 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
15269 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
15270 bytes. Fixes #78972.
15272 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15274 * filewatcher.c: we need to set errno here.
15276 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15278 * filewatcher.c: let Win32Exception get the error value.
15280 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15282 * filewatcher.c: translate errno into win32 errors for Win32Exception
15283 to know what happened.
15285 2006-08-01 Zoltan Varga <vargaz@gmail.com>
15287 * threadpool.c: Fix more warnings.
15289 * assembly.c (search_loaded): Fix warnings.
15291 * threadpool.c (mono_thread_pool_finish): Fix warnings.
15292 (mono_async_invoke): Ditto.
15294 2006-07-28 Jonathan Chambers <joncham@gmail.com>
15296 * object.c (mono_remote_class_vtable): Need to create proxy vtable
15297 entries for __ComObject type in addition to ComImport types.
15298 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
15301 All code is contributed under the MIT/X11 license.
15303 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
15305 * image.c: avoid tentative loading of modulerefs that contain
15306 no metadata (P/Invoke library names).
15308 2006-07-28 Dick Porter <dick@ximian.com>
15310 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
15311 mono_loader_lock() somewhere, so don't delete the critical section
15312 for now. Found by running and exiting monodevelop.
15314 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15316 * filewatcher.c: define the inotify syscalls when we're building on
15317 linux and have sys/syscall.h. The build system might not have support
15318 for inotify but the target system might have it.
15320 2006-07-26 Miguel de Icaza <miguel@novell.com>
15322 * domain.c: Documentation updates.
15324 * loader.c (mono_free_method): Do not release the method
15325 information if we are being profiled, as profilers will use this
15326 information at shut down to present some data to the user.
15328 This is needed so that the profiler does not crash, as the
15329 profiler tends to keep MonoMethods around, and they might become
15330 invalid if we free these.
15332 (mono_get_method_constrained): Return the original CIL stream
15333 method as well, so verification can be performed against it.
15335 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15337 * filewatcher.[ch]: support for inotify file system watcher.
15338 * icall.c: add new internal calls for the inotify file system watcher.
15340 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15342 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
15345 2006-07-20 Dick Porter <dick@ximian.com>
15347 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
15350 2006-07-20 Dick Porter <dick@ximian.com>
15352 * threads.c (start_wrapper): Do the thread cleanup while we still
15353 hold a reference to its object. Fixes bug 78123.
15355 2006-07-18 Kornél Pál <kornelpal@gmail.com>
15357 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
15358 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
15359 "managed-to-managed".
15360 * icall.c: Redirect string constructors that take sbyte* to
15361 ves_icall_System_String_ctor_RedirectToCreateString.
15362 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
15363 to CreateString () methods with matching signature.
15364 * reflection.c: Use original security informations for
15365 MONO_WRAPPER_MANAGED_TO_MANAGED.
15366 * security-manager.c: Use original security informations for
15367 MONO_WRAPPER_MANAGED_TO_MANAGED.
15368 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
15369 that is a placeholder and only its address should be used.
15370 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
15371 that is a placeholder and only its address should be used.
15373 2006-07-15 Jonathan Chambers <joncham@gmail.com>
15375 Begin implementing COM Interop.
15376 * appdomain.c: Increment corlib version.
15377 * class.c: Set ComImport classes' parent to __ComObject.
15378 * loader.c: Mark cominterop methods as such.
15379 * domain.c: Add __ComObject class to MonoDefaults structure.
15380 * image.c: Add 2 hashtables to the image for COM Interop related methods
15381 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
15382 using the mempool allocator
15384 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
15385 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
15386 declaration for mono_metadata_type_dup_mp.
15388 * debug-helpers.c: Added strings for two additional wrapper types
15389 * object.c: Create proxy objects for ComImport classes
15390 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
15391 and added __ComObject class to MonoDefaults structure.
15393 * object-internals.h: Finish MonoRealProxy definition, and add definition of
15394 MonoComInteropProxy and MonoComObject.
15396 * marshal.c: Added support for COM Interop
15397 (signature_cominterop): Converts managed signature to corresponding
15398 unmanaged COM signature.
15399 (cominterop_get_function_pointer): gets unmanaged function pointer via
15401 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
15402 (cominterop_get_method_interface): returns interface type that method is defined on
15403 (mono_mb_emit_cominterop_call): emits native call to function pointer
15405 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
15406 that matches signature of unmanaged function.
15407 (cominterop_get_native_wrapper): wrapper around adjusted method call.
15408 (cominterop_get_invoke): forwards call from proxy to __ComObject
15409 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
15410 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
15411 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
15413 * marshal.h: Added Marshal icall declarations.
15414 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
15415 so we can access them in finalizer
15417 2006-07-14 Dick Porter <dick@ximian.com>
15419 * object.c (mono_type_initialization_cleanup): Fix a race
15420 condition by temporarily commenting out the critical section
15423 2006-07-14 Zoltan Varga <vargaz@gmail.com>
15425 * reflection.c (create_custom_attr): Fix some warnings.
15426 (create_custom_attr_data): Ditto.
15427 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
15428 types. Fixes #78855.
15430 2006-07-11 Zoltan Varga <vargaz@gmail.com>
15432 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
15434 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
15436 2006-07-08 Zoltan Varga <vargaz@gmail.com>
15438 * reflection.c (resolve_object): Add support for DynamicMethod.
15440 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
15441 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
15443 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
15445 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
15446 don't leak GPtrArray's pdata has we have no use (nor free) for it.
15448 2006-07-01 Zoltan Varga <vargaz@gmail.com>
15450 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
15453 2006-06-30 Raja R Harinath <rharinath@novell.com>
15455 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
15456 slightly: remove a shadow local variable.
15458 2006-06-29 Raja R Harinath <rharinath@novell.com>
15460 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
15461 definition that introduces the virtual function slot.
15462 Also fix Coverity #105.
15464 2006-06-29 Zoltan Varga <vargaz@gmail.com>
15466 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
15467 for dynamic assemblies. Fixes #78724.
15469 2006-06-28 Zoltan Varga <vargaz@gmail.com>
15471 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
15474 2006-06-21 Martin Baulig <martin@ximian.com>
15477 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
15480 2006-06-21 Zoltan Varga <vargaz@gmail.com>
15482 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
15484 2006-06-20 Raja R Harinath <rharinath@novell.com>
15486 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
15488 * class.c (mono_class_create_from_typespec): Add 'context' argument.
15489 Inflate result if necessary.
15490 (mono_class_get_full): Remove old version. Rename from
15491 'mono_class_get' and add 'context' argument. Pass it to
15492 ..._create_from_typespec.
15493 (mono_class_get): New. Simple wrapper to mono_class_get_full.
15494 (mono_ldtoken): Revert change below.
15496 2006-06-20 Martin Baulig <martin@ximian.com>
15498 * class.c (mono_ldtoken): Don't pass the generic context to
15499 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
15501 2006-06-15 Zoltan Varga <vargaz@gmail.com>
15503 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
15504 and later freeing it. Fixes #78638.
15506 2006-06-15 Miguel de Icaza <miguel@novell.com>
15508 * icall.c (mono_class_get_throw): Revert over-zealous error
15509 throwing, the caller for mono_class_get_throw will cope with
15510 errors when classes are not properly initialized already.
15512 The code still copes with loader exceptions though.
15514 Fixes the regression in reftype1 and reftype3 from the CAS tests.
15516 2006-06-14 Miguel de Icaza <miguel@novell.com>
15518 Fixes the `make run1' version of RuntimeAbort (to be commited,
15519 source is in Bugzilla).
15521 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
15522 FALSE on class loading failure instead of returning true.
15524 * class.c (mono_class_create_from_typedef): It is possible for
15525 mono_metadata_interfaces_from_typedef_full to fail if a class is
15526 not found, cope with this.
15529 2006-06-14 Dick Porter <dick@ximian.com>
15532 * process.c: Fix a bunch of signed/unsigned warnings from gcc
15535 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
15537 * culture-info-table.h : oops, forgot to make it nsync with r61548.
15539 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
15541 * icall.c: Another fix for building mono in Visual Studio.
15543 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
15545 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
15547 2006-06-09 Martin Baulig <martin@ximian.com>
15549 * debug-mono-symfile.c: Put this back and really fix it this
15550 time. Sorry for all the trouble.
15552 2006-06-08 Zoltan Varga <vargaz@gmail.com>
15554 * icall.c (mono_class_get_throw): Fix a warning.
15555 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
15556 ReflectionTypeLoadException if needed. Fixes #78606.
15558 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
15559 (mono_class_init): Ditto.
15561 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
15562 ref_only exceptions.
15563 (mono_loader_clear_error): Make this work even if there is no error.
15565 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
15567 * object-internals.h marshal.c marshal.h icall.c: Implement method
15568 Marshal.GetComSlotForMethodInfo using internal call.
15570 2006-06-07 Zoltan Varga <vargaz@gmail.com>
15572 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
15573 a function for signalling it.
15575 * class.c (mono_class_from_typeref): Use the new kind of loader error when
15576 a referenced assembly is not found.
15578 * loader.c (mono_loader_error_prepare_exception): Add support for
15579 LOADER_ERROR_ASSEMBLY. Fix formatting.
15581 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
15583 * domain.c appdomain.c class-internals.h marshal.c: Add support
15584 for VARIANT marshalling on windows and increment corlib version
15585 since Variant struct was added.
15587 2006-06-03 Miguel de Icaza <miguel@novell.com>
15589 * debug-mono-symfile.c: Revert Martin's previous patch which broke
15590 stack trace line information:
15592 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
15593 (Martin) when looking up B which is between A and C, return A not C.
15597 Thanks to Alexander Olk for tracking this down.
15599 2006-06-02 Zoltan Varga <vargaz@gmail.com>
15601 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
15603 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
15604 avoid clobbering its value.
15605 (mono_string_to_lpstr): Fix a warning on windows.
15607 2006-05-31 Zoltan Varga <vargaz@gmail.com>
15609 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
15611 * reflection.c loader.c: Removed references to 'dummy' flag.
15613 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
15615 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
15616 it gets GC tracking.
15618 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
15621 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
15623 * marshal.c threadpool.c: Update callers of mono_async_result_new.
15625 * appdomain.c: Bump corlib version.
15627 2006-05-30 Zoltan Varga <vargaz@gmail.com>
15629 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15630 CEE_STIND_REF when working with object references.
15632 2006-05-31 Zoltan Varga <vargaz@gmail.com>
15634 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
15637 2006-05-30 Miguel de Icaza <miguel@novell.com>
15639 * loader.c (method_from_memberref): Fix argument value for
15640 mono_loader_set_error_method_load (I was passing the MonoClass
15641 instead of the class name char *).
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-30 Martin Baulig <martin@ximian.com>
15650 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
15651 mono_method_full_name() change and replace the ':' with a '.'
15654 2006-05-30 Martin Baulig <martin@ximian.com>
15656 * debug-mono-symfile.c
15657 (mono_debug_symfile_lookup_location): Fix the algorithm:
15658 when looking up B which is between A and C, return A not C.
15660 2006-05-29 Martin Baulig <martin@ximian.com>
15663 (MonoDebugMethodInfo): Make the typedef public.
15664 (MonoDebugSourceLocation): New public struct.
15667 (mono_debug_source_location_from_address): Removed.
15668 (mono_debug_source_location_from_il_offset): Removed.
15669 (mono_debug_il_offset_from_address): Removed.
15670 (mono_debug_address_from_il_offset): Removed.
15671 (mono_debug_lookup_method): New public function.
15672 (mono_debug_lookup_source_location): New public function; replaces
15673 the old mono_debug_source_location_from_*() functions; see the
15674 inline documentation.
15675 (mono_debug_free_source_location): New public function.
15676 (mono_debug_print_stack_frame): New public function; see the
15677 inline documentation.
15679 * debug-mono-symfile.c
15680 (mono_debug_find_source_location): Renamed into
15681 mono_debug_symfile_lookup_location(); only take a
15682 `MonoDebugMethodInfo *' and an `offset' argument; added inline
15684 (mono_debug_find_method): Renamed into
15685 mono_debug_symfile_lookup_method().
15687 2006-05-27 Zoltan Varga <vargaz@gmail.com>
15689 * assembly.c (mono_assembly_open_full): Dont overwrite the status
15690 returned by mono_image_open_full ().
15692 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
15693 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
15696 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
15699 2006-05-27 Miguel de Icaza <miguel@novell.com>
15701 * class.c (mono_class_from_typeref): handle missing images
15702 earlier, deals with bug #78418. Refactor code;
15704 Fix a warning introduced in my previous commit (some stale code
15705 from before I revisited my patch).
15707 * class.c (mono_class_create_from_typedef): On failure, remove the
15708 class from the MonoImage->class_cache as the class is not
15709 initialized; Fixes the leak pointed out by Paolo.
15711 2006-05-25 Dick Porter <dick@ximian.com>
15713 * threads.c (mono_thread_cleanup): Build fix. Comment out the
15714 DeleteCriticalSections until I figure out which one may still be
15715 sometimes locked when mono_thread_cleanup is called.
15717 2006-05-24 Dick Porter <dick@ximian.com>
15719 * threads.c (mono_thread_cleanup): Move the threading cleanup out
15720 of mono_thread_manage and back into its own function, so it can be
15721 called after the finalizer thread has finished.
15723 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
15725 2006-05-24 Zoltan Varga <vargaz@gmail.com>
15727 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
15730 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
15731 with non-blittable elements.
15732 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
15734 2006-05-24 Martin Baulig <martin@ximian.com>
15736 * mono-debug-debugger.h (MonoDebuggerEvent): Added
15737 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
15739 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
15740 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
15741 `mono_debugger_event_handler' to NULL.
15743 2006-05-24 Martin Baulig <martin@ximian.com>
15745 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
15747 2006-05-24 Martin Baulig <martin@ximian.com>
15749 * mono-debug-debugger.h
15750 (mono_debugger_create_notification_function): Added
15751 `MonoCodeManager *' argument.
15753 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
15755 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
15757 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
15759 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
15760 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
15763 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
15765 * icall.c: precise GC support: objects can't be stored in unmanaged
15766 memory anymore, even if they are kept alive by other references: since
15767 they can move the GC needs to be able to always find them.
15769 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15771 * object.c: precise GC support for static fields. Support
15772 for moving GCs: write barriers and pinned allocation for interned
15775 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
15777 * domain.c, domain-internals.h: precise GC support for the MonoDomain
15780 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
15782 * class.c, gc.c: sgen and precise GC updates.
15784 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
15786 * marshal.h, marshal.c: added write barrier wrapper and precise type
15789 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
15791 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
15794 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15796 * reflection.c: precise and sgen GC updates.
15798 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
15800 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
15802 2006-05-22 Zoltan Varga <vargaz@gmail.com>
15804 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
15806 2006-05-20 Zoltan Varga <vargaz@gmail.com>
15808 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
15809 MONO_TYPE_OBJECT. Fixes #78462.
15811 2006-05-18 Zoltan Varga <vargaz@gmail.com>
15813 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
15814 and blittable types.
15816 2006-05-17 Miguel de Icaza <miguel@novell.com>
15818 * class.c (mono_class_get_exception_for_failure): Implement parts
15819 of a TODO: if the loader error is set (instead of the class
15820 error), we return a Loader exception that can be properly thrown
15823 This was exposed by some Winforms 2.0 code that I tried to run
15824 (Atsushi pointed me to it).
15826 2006-05-17 Zoltan Varga <vargaz@gmail.com>
15828 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
15829 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
15831 * marshal.c (emit_marshal_vtype): Add limited support for
15832 UnmanagedType.LPStruct. Fixes #78427.
15834 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
15835 Applied a patch from kangaroo to fix #77523.
15837 2006-05-17 Martin Baulig <martin@ximian.com>
15840 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
15841 (debugger_thread_created): Removed.
15842 (debugger_thread_exited): Removed.
15844 2006-05-15 Zoltan Varga <vargaz@gmail.com>
15846 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15848 * object-internals.h (MonoReflectionResource): Sync with managed version.
15850 2006-05-12 Wade Berrier <wberrier@novell.com>
15852 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
15854 2006-05-12 Zoltan Varga <vargaz@gmail.com>
15856 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
15857 functions try to allocate from the image mempool.
15859 2006-05-12 Dick Porter <dick@ximian.com>
15861 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
15863 2006-05-12 Lluis Sanchez <lluis@ximian.com>
15865 * object.c: The FieldGetter and FieldSetter methods require the full
15866 name of the class, not only the name. Fixes bug #78277.
15868 2006-05-11 Miguel de Icaza <miguel@novell.com>
15870 * loader.c (method_from_memberref): Do not pass the NULL klass to
15871 mono_loader_set_error_() methods. Pass the non-NULL value
15874 2006-05-11 Zoltan Varga <vargaz@gmail.com>
15876 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
15877 (mono_assembly_close): Null out assembly->image->references after freeing it.
15879 * image.c (mono_image_close): Free image->references.
15881 * reflection.c (mono_image_basic_init): Fix a small memory leak.
15883 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15885 * marshal.c: In function mono_mb_add_local don't use the mb pointer
15886 before checking if it's NULL (g_assert).
15888 2006-05-10 Martin Baulig <martin@ximian.com>
15890 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
15891 I thought I already killed that two months ago, but now it somehow reappeared.
15893 2006-05-10 Martin Baulig <martin@ximian.com>
15895 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
15897 2006-05-10 Zoltan Varga <vargaz@gmail.com>
15899 * reflection.c: Allocate memory for dynamically created methods in the image
15902 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15904 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
15905 don't use the ad pointer before checking if it's NULL (g_assert).
15907 2006-05-09 Zoltan Varga <vargaz@gmail.com>
15909 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
15910 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
15912 * marshal.c: Allocate all signatures from mempools.
15914 * marshal.c: Allocate some more signatures from mempools.
15916 2006-05-09 Miguel de Icaza <miguel@novell.com>
15918 * object.c (mono_load_remote_field): The code used to provide a
15919 temporary variable for returning results if the user did not
15920 provide a result pointer. But our temporary variable was allocted
15923 Fix calling code to always pass a result area. Coverity ID 103.
15925 2006-05-06 Zoltan Varga <vargaz@gmail.com>
15927 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
15928 value, not the old. Fixes #78312.
15929 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
15931 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
15932 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
15935 * assembly.c (mono_assembly_close): Free image->references.
15937 * assembly.c (mono_assembly_names_equal): Fix a warning.
15938 (mono_assemblies_cleanup): Cleanup more global data.
15940 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
15942 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
15943 ptr_cache and image->modules.
15945 * image.c (mono_image_init): Allocate array_cache lazily.
15947 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15949 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
15950 behavior was changed recently and has bad side effects.
15952 2006-05-05 Zoltan Varga <vargaz@gmail.com>
15954 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
15956 * assembly.c (mono_assembly_close): Remove a debug printf.
15958 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
15960 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
15961 to also allow for temporary references between mono_image_open ()/close ().
15963 * domain.c (get_runtimes_from_exe): Add a FIXME.
15965 2006-05-04 Zoltan Varga <vargaz@gmail.com>
15967 * marshal.c: Fix support for dynamic methods.
15969 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
15971 * marshal.c (mono_marshal_cleanup): New cleanup function.
15973 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
15976 * class.c (mono_class_init): Fix leaking class->nested_classes.
15978 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
15980 * image.c (mono_image_init): Initialize the new cashes.
15982 * image.c (mono_image_close): Destroy the new cashes.
15984 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
15986 * mempool.c (mono_mempool_strdup): New helper function.
15988 * class-internals.h: Add prototype for mono_loader_unlock ().
15990 * domain.c (mono_jit_info_table_find): Fix a warning.
15991 (mono_debugger_check_runtime_version): Ditto.
15993 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
15994 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
15995 functions to these modules.
15997 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
16000 * marshal.c (mono_free_bstr): Fix a warning.
16002 * assembly.c (mono_assembly_open_full): Fix another small leak.
16004 * object.c: Fix some unload leaks in the remoting code.
16006 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
16009 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
16011 * reflection.c: Fix some unload leaks in dynamic assemblies.
16013 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
16015 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
16016 * marshal.h: Add BSTR support on Win32
16017 * icall.c: Add BSTR icalls
16018 * metadata.h: Add BSTR enums
16020 2006-04-28 Miguel de Icaza <miguel@novell.com>
16022 Work to catch the crash from #76795 and turn it into an
16023 exception. As I stubbed out pieces of the VisualBasic support,
16024 I found a number of places where the code was failing and I added
16025 checks to those places.
16027 * metadata.c (do_mono_metadata_parse_generic_class): Make this
16028 function return a status code. If we fail to parse the signature
16029 from mono_metadata_parse_generic_inst, return FALSE.
16031 * loader.c (mono_get_method_from_token): If we fail to load the
16032 method (mono_class_get) return NULL.
16034 * (method_from_memberref): Return NULL if we are unable to parse
16035 the method signature
16037 (mono_loader_error_prepare_exception): Since we now use the
16038 loader_error flag internally to stop processing, and obtaining
16039 exceptions that might be thrown will walk this code path the
16040 proper way of going from a MonoLoaderError into a
16041 MonoException was convoluted. This new routine encapsulates the
16042 process of turning the error into an exception and *clearing* the
16045 2006-04-27 Miguel de Icaza <miguel@novell.com>
16047 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
16048 with missing assemblies), and to cope with:
16050 * Missing fieldref from a non-existing assembly.
16051 * Missing methodref from a non-existing assembly.
16053 The first batch of work to address *some* of the issues from 76661.
16055 * object.c (mono_class_create_runtime_vtable): If we fail to
16056 initialize the class raise the exception here.
16058 * metadata.c (mono_class_get_overrides_full): If any methods fail
16059 to load return the failure to the caller.
16061 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
16062 flagging assemblies that failed to load.
16064 Do not crash if we are unable to load the assembly.
16066 (mono_assembly_close): Do nothing with REFERENCE_MISSING
16069 * loader.c (mono_loader_set_error_type_load): Change the
16070 convention to always pass unallocated strings, so we make our own
16071 copies (I know our own code had duplicated strings before, but
16072 this keeps the normal conventions).
16073 (method_from_memberref): Call mono_loader_set_error_method_load
16074 for all possible failures of loading the class.
16075 Remove assert, turn into a loader error.
16077 (mono_loader_error_to_exception): Move this routine from mini
16078 (mini_loader_error_to_exception) there was no need to have that in
16081 * class.c (mono_class_from_typeref): If we were not able to load
16082 the assembly with mono_assembly_load_reference, call the
16083 mono_loader_set_error_type_load to register the problem.
16085 (mono_class_setup_fields): If we fail to load the type from
16086 mono_metadata_parse_type_full, call mono_class_set_failure and
16087 break from the loop.
16089 If class->exception_type is set, we do not layout the fields as
16090 that might crash the runtime, and instead return (from breaking
16091 from the previous loop).
16093 (mono_class_setup_vtable): This now returns a boolean indicating
16094 whether the table was properly setup. The decision is driven by
16095 mono_class_get_overrides_full which might run into non-existing
16098 (mono_class_init): Returns TRUE on success or FALSE if there was a
16099 problem in loading the type (incorrect assemblies, missing
16100 assemblies, methods, etc).
16102 When we call mono_class_setup_fields we also check for a potential
16103 error inside this call (either a class exception or a general
16106 (mono_class_create_from_typedef): If the parent fails to load
16107 (calling mono_class_get_full) return NULL.
16111 calls to mono_metadata_parse_type_full should be checked
16112 everywhere and set the mono_class_set_failure
16113 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
16115 The current patch checks the places where my manually constructed
16116 tests show the errors are showing up, but we should do it
16121 mono_class_init return values should be tested everywhere, like
16122 the previous case this is something that we should audit
16123 everywhere and not only on the cases exposed by the tests I
16126 2006-04-26 Miguel de Icaza <miguel@novell.com>
16128 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
16129 boolean parameter and instead pass the information on `options'
16130 parameter (FileOptions).
16132 * icall.c: Register the new signature for MonoIO.Open.
16134 * debug-helpers.c (dis_one): Trying to understand how coverity
16135 works. Fix Run 5, item 78.
16137 2006-04-26 Dick Porter <dick@ximian.com>
16139 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
16142 2006-04-25 Martin Baulig <martin@ximian.com>
16144 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
16146 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
16147 debugger_thread_created().
16148 (debugger_gc_push_all_stacks): Don't handle the main thread in any
16150 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
16151 (mono_debugger_finalize_threads): New function; undo the effects
16152 of mono_debugger_init_threads().
16153 (mono_debugger_create_all_threads): Removed.
16155 2006-04-24 Zoltan Varga <vargaz@gmail.com>
16157 * image.c (mono_image_close): Tidy up trace messages.
16159 * assembly.c (mono_assembly_close): Ditto.
16161 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
16162 no longer references an already freed assembly. Fixes #78168.
16164 2006-04-21 Dick Porter <dick@ximian.com>
16166 * threads.c (mono_thread_detach): Fix reference counting when
16169 2006-04-21 Zoltan Varga <vargaz@gmail.com>
16171 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
16174 2006-04-19 Zoltan Varga <vargaz@gmail.com>
16176 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
16177 (mono_type_to_stind): Ditto.
16179 * marshal.c: Use the new helper functions to simplify code.
16181 * image.c (mono_image_close): Add some code for help debug assembly unloading
16184 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
16187 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
16188 assembly was already loaded in another appdomain. Fixes #78083.
16190 2006-04-13 Zoltan Varga <vargaz@gmail.com>
16192 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
16193 referenced assemblies.
16194 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
16196 * domain.c (mono_domain_free): Add a trace message.
16198 * appdomain.c (add_assemblies_to_domain): Ditto.
16200 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
16203 2006-04-12 Zoltan Varga <vargaz@gmail.com>
16205 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
16207 2006-04-12 Martin Baulig <martin@ximian.com>
16209 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
16210 `USE_INCLUDED_LIBGC'.
16212 2006-04-12 Zoltan Varga <vargaz@gmail.com>
16214 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
16215 the patch contains ../ and a small directory name later. Hopefully fixes
16218 2006-04-10 Martin Baulig <martin@ximian.com>
16220 Clean up the debugger's thread-handling code.
16222 The debugger's thread-handling code has been moved from
16223 ../mini/debug-debugger.c to threads.c. We now iterate directly
16224 over the `threads' hash, keep track of exiting threads and also
16225 use proper locking.
16227 We can now debug XSP and XSP based applications with the debugger.
16229 * object-internals.h (MonoThread): Added `gpointer end_stack'.
16232 (MonoThreadCallbacks): Removed; this was only used by the debugger.
16233 (mono_install_thread_callbacks): Likewise.
16235 * threads.c (mono_thread_callbacks): Removed.
16236 (debugger_thread_created, debugger_thread_exited): New static functions.
16237 (start_wrapper): Call debugger_thread_created().
16238 (thread_cleanup): Call debugger_thread_exited().
16239 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
16240 (mono_debugger_init_threads): New public function.
16241 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
16242 iterate directly over the `threads' hash and also use proper locking.
16244 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
16246 * mono-debug-debugger.h
16247 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
16249 2006-04-10 Zoltan Varga <vargaz@gmail.com>
16251 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
16252 argument type=array. Fixes #78057.
16254 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
16256 * culture-info-table.h : regenerated. Fixed bug #69652.
16258 2006-04-07 Zoltan Varga <vargaz@gmail.com>
16260 * loader.c metadata.c: Reapply a variant r59116.
16262 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
16264 * class.c (mono_class_setup_interface_offsets): New internal function.
16266 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
16267 interfaces too. Fixes #77398.
16269 * reflection.c (encode_cattr_value): Add support for
16270 parameter type=object, argument type=array.
16271 (load_cattr_value): Ditto. Fixes #77916.
16273 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
16274 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
16276 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
16277 a byval char array and CharSet is Ansi.
16279 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
16281 2006-04-06 Zoltan Varga <vargaz@gmail.com>
16283 * metadata.c: Add some locking comments.
16285 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
16287 (mono_metadata_free_method_signature): Don't free the signature itself.
16289 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
16291 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
16292 reference the same MonoImage.
16293 (mono_assembly_load_from_full): Add an assert.
16295 2006-04-05 Zoltan Varga <vargaz@gmail.com>
16297 * image.c (mono_image_close): Don't put the image we are about to free into the
16298 loaded_images_guid_hash.
16300 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
16301 to reduce code duplication.
16303 * marshal.c: Register the native functions called by this module as icalls, to
16304 somewhat centralize the creation of MonoMethodSignature's.
16306 * loader.c (mono_method_signature): Add a cache for method signatures.
16308 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
16309 the parameter attributes of a method.
16310 (mono_metadata_parse_method_signature_full): Refactored the computation of
16311 parameter attributes into a separate function. Also avoid one allocation in
16314 * assembly.c (mono_assembly_close): Ditto.
16316 * image.c (mono_image_close): Log trace messages with INFO level.
16318 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
16320 * image.c reflection.c: Correct reference counting of image modules.
16322 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
16323 of this function from the image mempool.
16325 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
16326 to allow more cached types to be used.
16328 * mono-debug.c (mono_debug_add_method): Appled patch from
16329 David S. Miller <davem@sunset.davemloft.net>: Access
16330 minfo->lexical_blocks[] entry elements using read32().
16332 2006-04-04 Zoltan Varga <vargaz@gmail.com>
16334 * loader.c (mono_free_method): No longer free the method header for non-dynamic
16335 methods as it is allocated from the mempool.
16337 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
16340 * metadata-internals.h: Add comments describing the reference counting scheme
16341 used for MonoImage and MonoAssembly.
16343 * image.c assembly.c reflection.c: Rework reference counting of images and
16344 assemblies so they are freed when the runtime is shut down. Free some
16345 additional memory structures when an image is unloaded.
16347 2006-04-03 Zoltan Varga <vargaz@gmail.com>
16349 * class.c loader.c reflection.c: Allocate more data structures in
16352 2006-03-31 Miguel de Icaza <miguel@novell.com>
16355 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
16356 build on pre glib 2.4 systems.
16358 2006-03-31 Zoltan Varga <vargaz@gmail.com>
16360 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
16362 * icall.c: Fix some warnings.
16364 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
16366 * culture-info-table.h : regenerated.
16368 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
16370 * threads.c, object-internals.h, verify.c: changed the culture caching
16371 code to use a normal MonoArray for storage so the GC can keep track of
16372 them easily. Fixed bits of the cache logic, too and simplified the
16375 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
16377 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
16378 thread for non-Boehm GCs.
16380 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
16382 * domain.c, object.c, domain-internals.h: reduce the amount of memory
16383 needed to keep track of the data for static fields.
16385 2006-03-29 Raja R Harinath <rharinath@novell.com>
16388 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
16389 for interface classes. Use 'num_methods' instead.
16390 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
16391 before using '->vtable_size' field.
16393 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16395 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
16396 doesn't contain managed pointers, so use a normal hashtable.
16398 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
16400 * reflection.c, class-internals.h, domain.c: fixed handling of types
16401 used as values for objects in custom attributes (bug #77915):
16403 2006-03-24 Martin Baulig <martin@ximian.com>
16405 * class.c (mono_class_setup_fields): Added support for generic
16406 instances; fixes #77580.
16408 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16410 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
16412 2006-03-24 Dick Porter <dick@ximian.com>
16414 * file-io.c (get_file_attributes): More stat macro breakage.
16417 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
16419 * profiler.c: added the file=filename option in the default profiler
16420 to output the profile data to filename.
16422 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16424 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
16427 2006-03-22 Martin Baulig <martin@ximian.com>
16429 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
16430 allocated `MonoClassField *' in `fb->handle'.
16432 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16434 * class.c, image.c, metadata-internals.h: implemented new mechanism to
16435 allocate interface ID to save memory and allow better ID reuse on
16436 appdomain unload. setup_generic_vtable () removal from Martin.
16438 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16440 * object.h, appdomain.c, domain.c, exception.c, icall.c,
16441 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
16442 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
16443 write barriers for reference stores with managed objects accessed with
16444 C structures in the runtime and in embedding programs.
16446 2006-03-20 Raja R Harinath <rharinath@novell.com>
16448 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
16449 'interface_id' and 'max_interface_id' fields of MonoClasses
16450 representing open generic types.
16452 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
16454 * object.h, object.c, icall.c: added functions to deal with
16455 storing valuetypes that contain references in managed objects.
16456 * reflection.c, string-icalls.c, threads.c, marshal.c: small
16457 fixes and comments around uses of mono_array_addr ().
16459 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
16461 * object.h, icall.c, monitor.c: object.GetHashCode ()
16462 implementation that supports the moving garbage collector.
16464 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16466 * icall.c, threads-types.h, threads.c: implemented finalizer for
16467 LocalDataStoreSlot.
16469 2006-03-15 Zoltan Varga <vargaz@gmail.com>
16471 * metadata.c (mono_type_size): Add a fixme.
16472 (mono_type_stack_size): Ditto.
16474 * object-internals.h (MonoReflectionAssemblyBuilder): Added
16475 'type_forwarders' field.
16477 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
16478 attribute from net 2.0.
16480 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
16483 * class.c (mono_class_setup_fields): Fix a warning.
16485 * class.c (mono_class_from_name): Add support for assemblyref entries
16486 in the EXPORTEDTYPE table.
16488 * reflection.c: Add support for handling type forwarders under net 2.0.
16490 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16492 2006-03-14 Zoltan Varga <vargaz@gmail.com>
16494 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
16495 overwriting entries in ModuleBuild->types, also clean up the code
16496 a little. Fixes #77774.
16498 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16500 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
16501 load friend assembly info when present.
16503 2006-03-14 Raja R Harinath <rharinath@novell.com>
16505 Fix crasher on gtest-158.cs.
16506 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
16507 the return value if the MonoClass we want is yet in an
16508 inconsistent state.
16509 * class.c (mono_class_create_from_typedef): Add an comment
16510 explaining an order dependency between mono_class_setup_parent and
16511 mono_class_setup_mono_type.
16513 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
16515 * class.c: documentation updates and events bug fix.
16517 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
16519 * class.c: some cleanup, locking fixes.
16521 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16523 * class.c: fix the generics code to setup nested
16524 type info to the instantiated type (bug #77770).
16526 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16528 * marshal.c: fixed a few type correctness issues.
16530 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16532 * loader.c: the Set/Get/Addrtess array methods should be public.
16534 2006-03-11 Zoltan Varga <vargaz@gmail.com>
16536 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
16538 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
16541 2006-03-10 Zoltan Varga <vargaz@gmail.com>
16543 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
16545 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
16547 * mempool.c (mono_mempool_alloc): Speed this up a bit.
16548 (mono_mempool_alloc0): Ditto.
16550 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16553 (create_object_from_sockaddr): it was allocating 4 extra bytes
16554 for the AF_UNIX data. Fixes bug #77747.
16556 2006-03-09 Zoltan Varga <vargaz@gmail.com>
16558 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
16560 2006-03-09 Dick Porter <dick@ximian.com>
16562 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
16563 Fixes bug 76966 again.
16565 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
16567 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
16569 * appdomain.c: Bumped corlib version to 48 (due to r57532)
16571 2006-03-07 Martin Baulig <martin@ximian.com>
16574 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
16576 2006-03-07 Martin Baulig <martin@ximian.com>
16579 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
16580 regression introduced in r56970; see gtest-252.cs.
16582 * loader.c (mono_get_method_constrained): Correctly handle generic
16583 methods; see gtest-253.cs.
16585 2006-03-04 Zoltan Varga <vargaz@gmail.com>
16587 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
16589 2006-03-04 Martin Baulig <martin@ximian.com>
16591 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
16592 compute the parent type at runtime, just like we're already doing
16596 (mono_reflection_bind_generic_parameters): Don't compute the
16597 parent type anymore.
16599 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
16601 2006-03-04 Martin Baulig <martin@ximian.com>
16603 * mono-debug-debugger.h
16604 (mono_debugger_create_notification_function): Allocate memory at
16605 runtime and return a pointer to it.
16607 2006-03-03 Zoltan Varga <vargaz@gmail.com>
16609 * assembly.c: Fix windows build.
16611 * assembly.c: Fix build.
16613 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
16615 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
16617 2006-03-03 Dick Porter <dick@ximian.com>
16620 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16621 Check parameters before dereferencing them. Fixes Aaron's part of
16624 2006-03-03 Raja R Harinath <rharinath@novell.com>
16626 Fix performance regression.
16627 * loader.c (find_method_in_class): Add 'from_class' argument.
16628 Rename 'klass' argument to 'in_class'. The signature is compared
16629 against the method in 'in_class', and the corresponding method is
16630 returned from 'from_class'.
16631 (find_method): Walk both 'in_class' and 'from_class' in parallel.
16632 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
16633 type definition and generic instantiation in parallel.
16634 (mono_get_method_constrained): Update to changes.
16636 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16638 * threads.c: make sure the domain is correct, too when doing
16639 mono_thread_attach ().
16641 2006-03-01 Zoltan Varga <vargaz@gmail.com>
16643 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
16644 windows. Fixes #77683.
16646 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16648 * object.h, *: introduced specific way to set elements of an array
16649 of references to be used as write barrier. Still need to audit the
16650 uses of mono_array_addr.
16652 2006-03-01 Miguel de Icaza <miguel@novell.com>
16654 * object-internals.h: New field to cache the assmebly name, patch
16655 from Tambet Ingo (tambet@ximian.com)
16657 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16659 * decimal.h, class-internals.h, metadata-internals.h,
16660 file-io.h: mark a few function declarations as internal, to
16661 reduce the number of PLT entries.
16663 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16665 * file-io.c: fix typo in warning message.
16667 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
16669 * loader.c: on unix, lookup the "*A" version of a function
16670 if charset is auto as a second option before failing.
16672 2006-02-28 Raja R Harinath <rharinath@novell.com>
16674 * class.h (mono_class_inflate_generic_method): Revert to two
16676 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
16677 (mono_class_inflate_generic_method_full): Add.
16678 * class.c (mono_class_inflate_generic_method_full): Rename from
16679 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
16680 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
16681 * loader.c, reflection.c: Update to changes.
16683 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
16685 * icall.c: const fixes and small improvements.
16687 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16689 * threadpool.c: for asynchronous connect(), enable the same workaround
16690 for BSD 6 as for the Mac. Fixes bug #77637.
16692 2006-02-24 Zoltan Varga <vargaz@gmail.com>
16694 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
16695 formatted classes. Fixes #77524.
16697 2006-02-24 Raja R Harinath <rharinath@novell.com>
16699 * class.c (inflate_generic_type): Add a couple more
16700 micro-optimizations.
16701 (inflate_generic_context): Don't use the 'gmethod' from
16703 (mono_class_inflate_generic_method): If the method has generic
16704 parameters, but the passed-in context doesn't have a 'gmethod',
16705 create one. Use the possibly simplified generic instantiation
16706 from the declaring class instead of the one passed in.
16708 2006-02-24 Raja R Harinath <harinath@gmail.com>
16710 Make generic method signature and method header handling lazy.
16711 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
16712 (inflate_generic_header): Likewise.
16713 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
16714 parameter to avoid inflating types.
16715 (mono_get_inflated_method): Empty out.
16716 * class.h (mono_class_inflate_generic_method): Update to changes.
16717 * loader.c (mono_get_method_from_token): Don't parse signature for
16718 generic methods, nor methods of generic classes.
16719 (mono_method_signature): Rename from 'mono_method_signature'.
16720 Inflate signature on demand.
16721 (mono_method_get_header): Inflate method header on demand.
16722 * reflection.c: Update to changes.
16724 2006-02-23 Raja R Harinath <rharinath@novell.com>
16726 * metadata.c (mono_metadata_inflate_generic_inst): If the
16727 instantiation is closed, don't bother expanding it in the new
16729 * class.c (inflate_generic_class): If the generic instantiation
16730 doesn't change after inflation, return the argument itself.
16731 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
16733 (inflate_generic_context): If neither the generic class nor the
16734 generic method instantiations change, return the original context.
16735 * reflection.c (mono_method_get_object): Do
16736 'mono_get_inflated_method' before accessing the ->klass field.
16737 (inflate_mono_method): Don't create a MonoGenericMethod unless
16739 (inflate_method): Don't pass a constructed type as the declaring
16740 type of a methodbuilder.
16742 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
16744 * object.c: fix memory overwrite.
16746 2006-02-22 Dick Porter <dick@ximian.com>
16748 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
16749 it doesn't work any more.
16750 (mono_threads_request_thread_dump): Fix unused variable warnings.
16752 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16754 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
16755 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
16756 the public header file.
16758 2006-02-21 Zoltan Varga <vargaz@gmail.com>
16760 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
16762 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16764 * class-internals.h, object.c: reduce the size of MonoVTable
16765 and store the interface_offsets array at negative offsets.
16767 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16769 * metadata.c: tweak table descriptors data structures to reduce
16770 size and runtime relocations.
16772 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16774 * marshal.c: fix some types and opcodes to be type-safe
16775 in marshaling wrappers.
16777 2006-02-21 Ankit Jain <jankit@novell.com>
16779 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
16781 2006-02-21 Raja R Harinath <rharinath@novell.com>
16783 * metadata.c (get_constraints): Relax debugging checks for monodis.
16785 2006-02-21 Ankit Jain <jankit@novell.com>
16787 * metadata.c (mono_metadata_load_generic_params): Move the code
16788 checking for ambiguous generic params from here to mono/dis/get.c
16789 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
16791 2006-02-21 Raja R Harinath <harinath@gmail.com>
16793 Fix assertion triggered when compiling nemerle.
16794 * class.c (mono_get_shared_generic_inst): Rename from
16795 get_shared_inst and make non-static.
16796 * loader.c (mono_get_shared_generic_method): New. Used to create
16797 the MonoGenericContext-equivalent of a MonoGenericContainer.
16798 (mono_get_method_from_token): Initialize the 'context' field of
16799 the created MonoGenericContainer.
16800 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
16801 * metadata.c (get_constraints): Add sanity check.
16802 * class-internals.h: Add new internal methods.
16804 * reflection.c (verify_safe_for_managed_space): New sanity check.
16805 Currently checks that owner-less generic parameters aren't allowed
16807 (mono_type_get_object): Use it.
16808 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
16809 that are now in mono_type_get_object.
16810 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
16812 2006-02-19 Raja R Harinath <harinath@gmail.com>
16814 * metadata.c (mono_type_create_from_typespec): Rename from
16815 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
16816 argument and caching of types in the generic container.
16817 (unwrap_arrays, find_generic_param): Remove.
16818 * metadata-internals.h: Update.
16819 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
16821 2006-02-18 Zoltan Varga <vargaz@gmail.com>
16823 * class.c (mono_class_get_exception_for_failure): Fix a warning.
16825 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
16826 return values. Fixes #77581.
16828 * class.c (mono_fnptr_class_get): Switch name and name_space.
16830 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
16831 classes and add support for [In, Out] attributes.
16832 (mono_marshal_free_asany): Ditto. Fixes #77524.
16834 2006-02-18 Raja R Harinath <harinath@gmail.com>
16836 * class.c (mono_class_from_generic_parameter): Make more robust to
16837 incomplete MonoGenericContainers from monodis.
16839 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16841 * class-internals.h: added some more exception types.
16842 * class.c, metadata.c: added a few checks to handle missing
16845 2006-02-17 Raja R Harinath <rharinath@novell.com>
16847 Use owner-less generic-params some more.
16848 * class.c (my_mono_class_from_generic_parameter): Remove.
16849 (mono_class_from_generic_parameter): Handle null image,
16850 param->name and param->owner.
16851 (mono_class_from_mono_type): Update.
16852 (mono_class_create_from_typespec): Remove 'container' parameter.
16853 If that parameter is non-null, the result is always inflated by
16854 'mono_class_get_full' anyway.
16855 (mono_class_get): Rename from _mono_class_get. Remove 'container'
16857 (mono_class_get_full): Update.
16859 * class.c (inflate_generic_type) [GENERICINST]: If the generic
16860 instance is not open, don't bother inflating.
16861 (mono_class_setup_fields): Hoist some loop-invariants. Don't
16862 parse metadata for inflated classes.
16863 (_mono_class_get): Change GenericContext* parameter to
16865 (mono_class_create_from_typespec): Likewise. Simplify, and
16866 implement trivially. All the cases are handled in
16867 mono_class_from_mono_type. Don't inflate returned class.
16868 (mono_class_get_full): Delegate GENERICINST optimization to
16869 inflate_generic_type.
16870 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
16872 2006-02-16 Dick Porter <dick@ximian.com>
16874 * socket-io.c (create_object_from_sockaddr): Fix typo.
16875 (create_sockaddr_from_object): Check array lengths before
16876 potentially accessing items off the end.
16877 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
16878 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
16879 (ves_icall_System_Net_Sockets_Socket_Send_internal)
16880 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
16881 length checks to avoid wraparound overflows.
16882 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
16883 contents of the array of sockets
16884 (hostent_to_IPHostEntry2)
16885 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
16886 Check return value of inet_ntop ().
16887 (addrinfo_to_IPHostEntry): Fix typo
16889 2006-02-16 Raja R Harinath <rharinath@novell.com>
16891 Type metadata parsing doesn't use generic-instantiation information.
16892 * metadata.c (mono_metadata_parse_array_full): Change
16893 MonoGenericContext* parameter to MonoGenericContainer*.
16894 (mono_metadata_parse_type_full): Likewise.
16895 (mono_type_create_from_typespec_full): Likewise.
16896 (mono_metadata_parse_mh_full): Likewise.
16897 (mono_metadata_parse_generic_inst): Likewise.
16898 (do_mono_metadata_parse_generic_class): Likewise.
16899 (do_mono_metadata_parse_type): Likewise.
16900 * metadata-internals.h: Update to changes.
16901 * class.c (mono_class_find_enum_basetype): Likewise.
16902 (mono_class_setup_fields): Likewise.
16903 (mono_class_create_from_typespec): Likewise.
16904 * loader.c (method_from_methodspec): Likewise.
16905 (mono_get_method_from_token): Likewise.
16906 (mono_method_get_header): Likewise.
16908 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16910 * marshal.c: handle additional GENERICINST case (patch from
16911 Thong Nguyen <tum@veridicus.com>).
16912 Fix a few cases where LDIND_I/STIND_I was used for references.
16914 2006-02-16 Raja R Harinath <rharinath@novell.com>
16916 * reflection.c (mono_reflection_get_token): Remove unused variable.
16918 2006-02-16 Martin Baulig <martin@ximian.com>
16920 * reflection.c (mono_reflection_get_token): Add support for fields
16921 in instantiated generic types.
16924 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
16926 2006-02-15 Martin Baulig <martin@ximian.com>
16929 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
16930 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
16931 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
16932 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
16934 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16936 * class.c, metadata.c, metadata.h, object.c, icall.c,
16937 marshal.c: changed mono_type_get_underlying_type () to do
16938 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
16939 Fixed handling of instantiated generic valuetypes (bug #75479).
16941 2006-02-15 Raja R Harinath <rharinath@novell.com>
16943 * metadata.c (mono_metadata_decode_signed_value): Simplify.
16944 Delegate to mono_metadata_decode_value, and work on the returned value.
16946 * icall.c (ves_icall_MonoType_GetGenericArguments):
16947 Add consistency check here too.
16949 2006-02-15 Ankit Jain <jankit@novell.com>
16951 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
16954 2006-02-15 Ankit Jain <jankit@novell.com>
16956 * metadata.c (mono_metadata_decode_signed_value): New function to decode
16957 signed values, used only for representing lower bounds of arrays.
16958 (mono_metadata_parse_array_full): Use new
16959 mono_metadata_decode_signed_value to decode lower bounds.
16961 2006-02-14 Martin Baulig <martin@ximian.com>
16964 (mono_reflection_get_token): Support "MonoGenericMethod" and
16965 "MonoGenericCMethod" and allow generic instances / methods.
16967 2006-02-11 Zoltan Varga <vargaz@gmail.com>
16969 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
16970 to obtain the terminal size using an ioctl.
16972 * object.c (mono_nullable_init): Revert this as nullable reference
16973 types are not valid.
16974 (mono_nullable_box): Ditto.
16976 2006-02-09 Dick Porter <dick@ximian.com>
16978 * threads.c (mono_thread_detach): Drop a reference to the thread
16981 2006-02-09 Zoltan Varga <vargaz@gmail.com>
16983 * object.c (mono_nullable_init): Handle nullable reference types.
16984 (mono_nullable_box): Ditto. Fixes #77446.
16986 2006-02-07 Martin Baulig <martin@ximian.com>
16988 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
16990 2006-02-07 Ankit Jain <jankit@novell.com>
16992 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
16993 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
16994 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
16995 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
16996 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
16997 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
16999 2006-02-02 Zoltan Varga <vargaz@gmail.com>
17001 * class.c (mono_class_create_generic): Set type_token as well.
17003 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
17004 compatible with MS.
17006 2006-02-02 Martin Baulig <martin@ximian.com>
17008 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
17009 has never been used so far.
17011 2006-02-02 Martin Baulig <martin@ximian.com>
17013 * mono-debug-debugger.h: Changed comment at the top of this file;
17014 the header is not installed, but it's safe to #include it from
17017 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
17018 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
17020 2006-02-02 Martin Baulig <martin@ximian.com>
17023 (MonoSymbolTable): Removed the `metadata_info' field.
17026 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
17028 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
17029 (mono_debugger_add_builtin_types): Removed.
17030 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
17031 (mono_debugger_create_notification_function): We now operate on a
17032 pre-allocated area; take a `gpointer' and return `void'.
17034 * mono-debug-debugger.c
17035 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
17036 (mono_debugger_add_builtin_types): Removed.
17038 2006-02-02 Martin Baulig <martin@ximian.com>
17040 * threads.c (mono_debugger_create_all_threads): New public method.
17042 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
17044 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
17045 breaks on several platforms.
17047 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
17049 * assembly.c: the VS.NET build doesn't supply default values for
17050 MONO_ASSEMBLIES and MONO_CFG_DIR.
17052 2006-02-01 Zoltan Varga <vargaz@gmail.com>
17054 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
17057 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
17059 * loader.c (method_from_memberref): Fix a warning.
17061 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
17063 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
17064 with explicit layout. Fixes #77433.
17066 2006-01-31 Zoltan Varga <vargaz@gmail.com>
17068 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
17069 max_interface_id is initialized before using it. Fixes #77398.
17070 (ves_icall_Type_GetInterfaces): Ditto.
17072 2006-01-30 Raja R Harinath <rharinath@novell.com>
17074 * metadata.c (mono_metadata_parse_method_signature_full): Don't
17075 allocate memory for parameter attributes when parsing memberref
17077 * loader.c (mono_loader_set_error_method_load): Don't warn.
17078 (method_from_memberref): Ensure MissingMethodException gets thrown
17079 if method is not found. Make warning more informative.
17081 2006-01-29 Raja R Harinath <harinath@gmail.com>
17084 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
17085 return true if is byref.
17086 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
17087 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
17088 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
17090 2006-01-27 Raja R Harinath <rharinath@novell.com>
17092 Fix tests/find-method.2.il
17093 * loader.c (find_method, find_method_in_class): Remove is_inflated
17094 argument. Revert 2006-01-18 change.
17095 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
17096 is generic, search for method in its generic definition.
17097 * class.c (mono_class_setup_vtable_general): Print generic
17098 arguments of generic types in debugging printf.
17100 2006-01-26 Zoltan Varga <vargaz@gmail.com>
17102 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
17104 * threads.c (mono_threads_request_thread_dump): New helper function.
17106 2006-01-25 Raja R Harinath <rharinath@novell.com>
17108 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
17110 2006-01-25 Ankit Jain <jankit@novell.com>
17112 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
17113 move definition to ..
17114 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
17116 2006-01-25 Ankit Jain <jankit@novell.com>
17117 Raja R Harinath <rharinath@novell.com>
17119 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
17120 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
17123 2006-01-25 Martin Baulig <martin@ximian.com>
17125 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
17126 `MonoDebuggerThread' into debug-debugger.c.
17128 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
17130 * profiler.c: fix printing of data.
17132 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
17134 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
17135 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
17137 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
17139 * object.c: fix deadlock related to string interning.
17141 2006-01-23 Martin Baulig <martin@ximian.com>
17143 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
17145 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
17147 2006-01-23 Martin Baulig <martin@ximian.com>
17149 * mono-debug.h: Moved the prototypes of some functions which are
17150 used by the JIT here from mono-debug-debugger.h.
17152 2006-01-21 Martin Baulig <martin@ximian.com>
17154 * Makefile.am: Don't install mono-debug-debugger.h.
17156 2006-01-21 Martin Baulig <martin@ximian.com>
17158 * mono-debug-debugger.h: Enforce the private status of this header
17159 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
17160 Moved some stuff from mono-debugger-jit-wrapper.h here.
17162 2006-01-20 Raja R Harinath <rharinath@novell.com>
17164 * class.c (mono_class_from_typeref): Add a sanity test to help
17165 catch lack of assembly load/search hooks.
17167 2006-01-19 Zoltan Varga <vargaz@gmail.com>
17169 * marshal.c (emit_struct_conv): Relax the fields with same offset
17170 check even more. Fixes #77230.
17172 2006-01-18 Martin Baulig <martin@ximian.com>
17174 * loader.c (find_method_in_class): Added `gboolean is_inflated'
17175 argument; if false, we compare the uninstantiated signatures.
17176 (method_from_memberref): Compare the uninstantiated signatures;
17179 2006-01-18 Robert Jordan <robertj@gmx.net>
17181 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
17182 Clear the weak link. Fixes bug #77170.
17184 * gc.c (mono_gchandle_free):
17185 Reflect *-gc.c changes (tiny optimization).
17187 2006-01-18 Zoltan Varga <vargaz@gmail.com>
17189 * metadata.c (mono_metadata_signature_dup): Applied patch from
17190 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
17193 2006-01-17 Zoltan Varga <vargaz@gmail.com>
17195 * marshal.c (emit_struct_conv): Allow fields with the same offset when
17196 marshalling from native to managed code. Fixes #77230.
17198 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17200 * threadpool.c: fix problem (Mac only) when more than one asynchronous
17201 connect. Fixes bug #77020.
17203 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
17205 * class.c: fixed id assignement for nested interfaces (bug #77275).
17206 Added also better info for --print-vtable debugging.
17208 2006-01-12 Martin Baulig <martin@ximian.com>
17210 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
17211 interfaces on-the-fly; fixes #76625.
17213 * class-internals.h
17214 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
17215 don't need that anymore.
17217 2006-01-12 Miguel de Icaza <miguel@novell.com>
17220 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
17221 To avoid initing the nested_classes when not needed I turned the
17222 PeerCredData as a toplevel internal class, as it has to be shared
17225 Fixes the CASA issue.
17227 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
17229 * domain.c: Accessors for MonoJitInfo
17231 * profiler-private.h: Add jitinfo to the end jit hook
17233 * profiler.[ch]: Define new hooks, called after jitting which give
17234 the MonoJitInfo that was compiled
17236 2006-01-10 Martin Baulig <martin@ximian.com>
17238 * class.c (mono_class_setup_events): Add support for generic
17239 classes; fixes #76440.
17241 2006-01-06 Raja R Harinath <rharinath@novell.com>
17244 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
17245 on passed-in method.
17247 2006-01-03 Zoltan Varga <vargaz@gmail.com>
17249 * object.c (mono_runtime_invoke_array): Add Nullable support.
17251 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
17253 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
17255 * file-io.c: Don't consider sockets as directory and avoid an endless
17256 loop. Fix bug #76966.
17258 2006-01-03 Zoltan Varga <vargaz@gmail.com>
17260 * object.c (mono_nullable_init): New helper function.
17261 (mono_nullable_box): Ditto.
17263 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
17265 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
17267 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
17269 2006-01-02 Zoltan Varga <vargaz@gmail.com>
17271 * class.c (mono_class_is_assignable_from): Make T assignable to
17274 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
17276 * appdomain.c: Bump corlib version to 46.
17277 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
17278 serialization purpose) and changed ves_icall_System_Reflection_
17279 Assembly_get_code_base signature to accept a boolean (to escape, or
17280 not, the assembly code base).
17282 2005-12-23 Dick Porter <dick@ximian.com>
17286 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
17287 CreateEvent icall now returns "created" boolean parameter.
17289 2005-12-22 Zoltan Varga <vargaz@gmail.com>
17291 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
17294 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
17295 when attr_klass is an interface. Fixes #77045.
17297 2005-12-20 Zoltan Varga <vargaz@gmail.com>
17299 * marshal.c (emit_struct_conv): Fix previous patch.
17301 * marshal.c (emit_struct_conv): Add a check for fields with the same
17304 2005-12-20 Raja R Harinath <rharinath@novell.com>
17306 Fix regression in Mono.C5.
17307 * class.c (mono_class_create_generic): If 'klass' is an interface
17308 set up the interface offsets.
17309 (mono_class_is_assignable_from): Don't throw away generic arguments.
17311 2005-12-19 Raja R Harinath <rharinath@novell.com>
17313 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
17316 2005-12-15 Raja R Harinath <rharinath@novell.com>
17318 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
17320 (do_mono_metadata_parse_generic_class): Don't pass the current
17321 generic context when parsing the type being instantiated: it
17322 cannot use it, anyway.
17324 * loader.c (method_from_memberref): Don't inflate a signature if
17325 it doesn't contain any type parameters.
17327 2005-12-15 Zoltan Varga <vargaz@gmail.com>
17329 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
17331 2005-12-14 Martin Baulig <martin@ximian.com>
17334 (mono_type_get_name_recurse): Don't return null for type
17335 parameters and open generic classes.
17336 (mono_class_setup_methods): Don't exclude generic instances.
17337 (mono_get_unique_iid): Use different IDs for different
17338 instantiations of the same generic type.
17339 (mono_class_setup_vtable): Only use setup_generic_vtable() for
17340 open generic instances; create a normal vtable for closed generic
17342 (mono_class_setup_vtable_general): We're now also called for
17343 closed generic instances.
17346 (mono_reflection_bind_generic_parameters): Correctly use
17347 mono_metadata_lookup_generic_inst() everywhere.
17349 2005-12-14 Zoltan Varga <vargaz@gmail.com>
17351 * object.c (mono_class_create_runtime_vtable): Call
17352 mono_class_setup_vtable ().
17354 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
17356 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
17359 * loader.c (mono_loader_set_error_type_load): Print the type load
17360 warnings to the console so they are more visible to the user.
17361 (mono_loader_set_error_method_load): Ditto.
17363 * reflection.c (ensure_runtime_vtable): Revert the last change as it
17366 * reflection.c (ensure_runtime_vtable): Fix build.
17368 * reflection.c (ensure_runtime_vtable): Disable an optimization which
17369 doesn't work in all cases.
17371 2005-12-13 Zoltan Varga <vargaz@gmail.com>
17373 * object.c (mono_array_new_full): Treat a single dimensional array
17374 with 0 lower bounds as an szarray. Fixes #76973.
17376 * reflection.c (custom_attr_visible): Really fix this.
17378 2005-12-12 Zoltan Varga <vargaz@gmail.com>
17380 * reflection.c (custom_attr_visible): Allow nested public attributes
17383 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
17386 2005-12-12 Raja R Harinath <harinath@gmail.com>
17388 * class.c (set_generic_param_owner): Delete.
17389 (mono_class_create_from_typedef): Don't set ->owner field of
17390 generic parameters to "param containers" of enclosing classes.
17391 * reflection.c (mono_reflection_initialize_generic_parameter):
17394 2005-12-11 Zoltan Varga <vargaz@gmail.com>
17396 * reflection.c (custom_attr_visible): Fix build.
17398 2005-12-10 Zoltan Varga <vargaz@gmail.com>
17400 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
17401 private attributes.
17403 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
17404 handling of null parameter defaults.
17406 2005-12-09 Raja R Harinath <rharinath@novell.com>
17408 * class.c (mono_class_from_generic_parameter): Don't set
17409 klass->generic_container.
17410 (my_mono_class_from_generic_parameter): Likewise.
17412 2005-12-07 Zoltan Varga <vargaz@gmail.com>
17414 * reflection.c (load_public_key): Fix a warning.
17415 (method_encode_code): Fix unaligned accesses.
17417 2005-12-07 Martin Baulig <martin@ximian.com>
17419 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
17422 (write_generic_param_entry): Encode our custom attrs.
17424 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
17426 2005-12-07 Martin Baulig <martin@ximian.com>
17428 * reflection.c (encode_new_constraint): Removed; we don't use the
17429 `NewConstraintAttribute' anymore.
17431 2005-12-06 Zoltan Varga <vargaz@gmail.com>
17433 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
17434 not fire a TypeResolve event when Assembly.GetType () is called.
17436 2005-12-05 Ben Maurer <bmaurer@ximian.com>
17438 Beginning of support for nullable types in the runtime. Parts of
17439 this patch are from Martin.
17441 * appdomain.c (MONO_CORLIB_VERSION): Bump
17443 * domain.c (mono_init_internal): get the nullable type
17445 * class.c (mono_class_is_nullable): New method
17446 (mono_class_get_nullable_param): New mehod
17447 (mono_class_create_generic): In types T? set cast_class to T
17449 * class-internals.h (MonoDefaults): new nullable default class
17450 (mono_class_get_nullable_param, mono_class_get_nullable_param):
17453 2005-12-05 Raja R Harinath <rharinath@novell.com>
17455 * metadata.c (select_container): New. Refactor code to select the
17456 appropriate GenericContainer given the type of generic parameter
17457 we are looking for.
17458 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
17459 not a MonoGenericContext. Use select_container. Update parameters.
17460 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
17461 and MONO_TYPE_MVAR.
17462 (unwrap_arrays): Remove duplicate tests.
17463 (find_generic_param): Rename from 'has_same_context'. Now walks a
17464 generic instantiated class to find any arguments that are generic
17466 (mono_type_create_from_typespec_full): Use find_generic_param to
17467 avoid evicting some generic instantiations from the typespec
17470 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
17472 * reflection.c: fixed writing of doubles on ARM FPA.
17474 2005-12-02 Robert Jordan <robertj@gmx.net>
17476 * icall.c: Fixed EventInfo.ReflectedType (#76829).
17478 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17480 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
17481 least on SUSE 10 they are not the same (on debian, they are just the
17484 2005-12-01 Raja R Harinath <rharinath@novell.com>
17486 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
17487 DeclaringType for VARs and MVARs.
17488 * class.c (set_generic_param_owner): Fix initialization of owner
17491 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
17493 * icall.c: fixed Enum.ToObject() to correctly convert the values.
17495 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17497 * threadpool.c: workaround for a bug that shows up on the Mac:
17498 select()+connect() on a blocking socket is not like it should
17499 be, so we proceed to connect() in that case, wasting the I/O
17500 threadpool thread until connect succeedes. Fixes bug #75436.
17502 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17504 * threadpool.c: fix typo when setting file descriptor states.
17506 2005-11-28 Raja R Harinath <rharinath@novell.com>
17508 * class-internals.h (MonoGenericContainer.is_signature): Remove.
17509 * metadata.c (mono_metadata_parse_method_signature_full): Don't
17510 create a temporary signature container.
17511 (mono_metadata_parse_generic_param): Update to changes.
17512 (mono_type_create_from_typespec_full): Update to changes.
17513 * loader.c (method_from_memberref): Don't use a
17514 MonoGenericContainer while parsing a memberref signature.
17515 (method_from_methodspec): Remove dead-store of the 'container'
17516 variable. It's overwritten before use.
17518 * metadata.c (mono_type_create_from_typespec_full): Make debugging
17520 (mono_metadata_parse_generic_param): Likewise.
17521 * loader.c (find_method_in_class): Does not need a
17522 MonoGenericContainer. Use 'mono_method_signature' rather than
17523 'mono_method_signature_full'.
17524 (find_method, mono_get_method_constrained, method_from_memberref):
17527 * metadata.c (mono_type_create_from_typespec_full): Ensure that
17528 owner-less generic-parameters are never evicted from the typespec
17531 * loader.c (method_from_memberref): Don't use the current context
17532 when parsing signatures.
17533 (method_from_methodspec, mono_get_method_from_token): Update to changes.
17535 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
17536 side-effects in g_assert.
17537 * loader.c (mono_get_method_from_token): Resolve klass earlier so
17538 that we don't potentially lose information.
17540 2005-11-26 Dick Porter <dick@ximian.com>
17543 * threads.c: icalls to implement basic (ie, not named)
17544 System.Threading.Semaphore.
17546 2005-11-24 Dick Porter <dick@ximian.com>
17549 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
17550 Use GetProcessId() if it's available.
17552 2005-11-23 Zoltan Varga <vargaz@gmail.com>
17554 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
17556 2005-11-23 Raja R Harinath <rharinath@novell.com>
17557 Ankit Jain <jankit@novell.com>
17559 * loader.c (mono_get_method_from_token): Initialize 'method' field
17560 of all generic parameters before parsing the signature. Remove
17561 code that "fixed"-up MVAR references.
17563 2005-11-23 Ankit Jain <jankit@novell.com>
17565 * metadata.c (mono_metadata_has_generic_params):
17566 (mono_metadata_load_generic_param_constraints):
17567 (mono_metadata_load_generic_params): Move duplicate code ...
17568 (mono_metadata_get_generic_param_row): ... here. Returns the
17569 first row-id in GenericParam table for a given owner (token).
17570 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
17573 2005-11-23 Raja R Harinath <rharinath@novell.com>
17574 Ankit Jain <jankit@novell.com>
17576 * metadata.c (mono_metadata_class_equal): Pass signature_only when
17577 comparing VARs too.
17578 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
17579 type->data.generic_param only if the type is an MVAR.
17580 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
17581 leak owner-less VARs and MVARs into managed space.
17583 2005-11-21 Martin Baulig <martin@ximian.com>
17585 * class-internals.h
17586 (MonoMethod): Moved the `generic_container' here from
17587 `MonoMethodNormal' since we now also need it for
17588 `MonoMethodPInvoke';
17589 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
17590 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
17591 an union containing both `MonoMethodNormal' and
17592 `MonoMethodPInvoke'.
17595 (mono_get_method_from_token): Allow implementing generic methods
17599 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
17602 2005-11-17 Dick Porter <dick@ximian.com>
17606 * process.c: Split the Process Start_internal icall into
17607 ShellExecuteEx_internal and CreateProcess_internal, which are
17608 called depending on whether UseShellExecute is true. Fixes bug
17611 * appdomain.c (MONO_CORLIB_VERSION): Incremented
17613 2005-11-17 Zoltan Varga <vargaz@gmail.com>
17615 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
17616 'msize' parameters, use the information in 'mspec' instead.
17617 (emit_object_to_ptr_conv): Ditto.
17619 * marshal.c (emit_struct_conv): Handle explicit layout structs with
17620 fields out of order. Fixes #76733.
17622 2005-11-17 Ankit Jain <jankit@novell.com>
17624 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
17626 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
17628 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
17631 2005-11-16 Zoltan Varga <vargaz@gmail.com>
17633 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
17634 for types with non-auto layout. Fixes #76717.
17636 2005-11-16 Ankit Jain <jankit@novell.com>
17638 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
17639 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
17640 if generic_context is null.
17641 (mono_metadata_generic_param_equal): param->owner can be null.
17642 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
17645 2005-11-16 Zoltan Varga <vargaz@gmail.com>
17647 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
17650 2005-11-15 Martin Baulig <martin@ximian.com>
17652 * object.c (set_value): Use mono_class_from_mono_type() instead of
17653 the hack for generic instances; fixes #76136.
17655 2005-11-15 Zoltan Varga <vargaz@gmail.com>
17657 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
17660 * image.c (load_metadata_ptrs): Initialize the new fields.
17662 * reflection.c (create_dynamic_mono_image): Ditto.
17664 * reflection.c (build_compressed_metadata): Use the new fields.
17666 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
17669 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
17672 2005-11-15 Ankit Jain <jankit@novell.com>
17673 Raja R Harinath <harinath@gmail.com>
17675 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
17676 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
17677 new per-generic_container cache if the cached MonoType's context matches
17678 the current context.
17679 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
17680 to the expected context.
17681 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
17683 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17685 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
17686 we changed the signature of an icall.
17687 * icall.c: Modify to mono_double_ParseImpl return true/false
17688 depending on the success, instead of throwing the exception. This will
17689 help us in Double.TryParse methods.
17691 2005-11-14 Zoltan Varga <vargaz@gmail.com>
17693 * marshal.c (emit_marshal_object): Throw an exception when
17694 marshalling 'object' instead of crashing. Fixes #76696.
17696 2005-11-11 Zoltan Varga <vargaz@gmail.com>
17698 * class-internals.h: Add prototype for mono_type_get_full_name ().
17700 2005-11-11 Dick Porter <dick@ximian.com>
17702 * threads.c (mono_thread_manage): Make sure the main thread has
17703 abandoned all its mutexes when cleaning up. Fixes bug 74680.
17705 2005-11-11 Zoltan Varga <vargaz@gmail.com>
17707 * loader.c (mono_loader_set_error_type_load): Log a warning to the
17708 console about the missing type.
17709 (mono_loader_set_error_method_load): Ditto.
17711 2005-11-09 Miguel de Icaza <miguel@novell.com>
17713 * mono-config.c (mono_get_config_dir): Set the system defaults if
17716 * assembly.c (mono_set_dirs): New API entry point to set the
17717 assembly and the config directory in one call
17719 2005-11-09 Zoltan Varga <vargaz@gmail.com>
17721 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
17722 the ftnptr was created from a delegate in a domain other than the
17723 current domain. Fixes #75377.
17725 * exception.h exception.c: Add mono_get_exception_not_supported ().
17727 2005-11-08 Martin Baulig <martin@ximian.com>
17729 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
17731 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
17733 * security-manager.h: Added definitions to deal with strongname key
17734 pairs bigger (and smaller) than 1024 bits.
17735 * reflection.c: Remove hardcoded strongname size (128 bytes) and
17736 adjust wrt the public key length being used.
17738 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
17740 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
17741 Windows build (r51396-51397).
17743 2005-11-03 Martin Baulig <martin@ximian.com>
17745 * class.c (mono_class_setup_vtable_general): Also add generic
17746 methods to the vtable; fixes #76581.
17748 2005-11-01 Miguel de Icaza <miguel@novell.com>
17750 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
17751 sure that we lookup GetString method from the System.Text.Encoding
17752 class, not the derived class or we get an empty method.
17754 Fixed class #76612.
17756 2005-10-25 Miguel de Icaza <miguel@novell.com>
17758 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
17759 if it has been previously set (embedders).
17761 Make mono_set_rootdir available also on Unix.
17763 005-10-24 Robert Jordan <robertj@gmx.net>
17765 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
17767 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
17769 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
17770 only calls which are made to native code use this flag.
17772 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
17774 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
17776 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
17777 Add support for FieldBuilders.
17779 2005-10-29 Martin Baulig <martin@ximian.com>
17782 (mono_debug_using_mono_debugger): New public method; returns
17783 whether we're running inside the debugger.
17785 2005-10-27 Zoltan Varga <vargaz@gmail.com>
17787 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
17788 for Method/Constructor/FieldBuilders.
17790 2005-10-26 Zoltan Varga <vargaz@gmail.com>
17792 * reflection.c (module_add_cattrs): Save custom attributes for global methods
17793 and fields as well.
17795 2005-10-26 Martin Baulig <martin@ximian.com>
17797 * mono-debug-debugger.c
17798 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
17800 2005-10-24 Raja R Harinath <harinath@gmail.com>
17802 * icall.c (base64_to_byte_array): Don't pass an out-of-range
17803 integer to isspace.
17805 2005-10-21 Zoltan Varga <vargaz@gmail.com>
17807 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
17808 when passing valuetypes byref. Fixes #76502.
17810 2005-10-19 Jackson Harper <jackson@ximian.com>
17812 * profiler.c: Don't put a . in front of types that are not in a
17815 2005-10-18 Zoltan Varga <vargaz@gmail.com>
17817 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
17819 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
17821 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
17823 (mono_marshal_get_ldflda_wrapper): Fix a warning.
17825 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17827 * assembly.c metadata-internals.h icall.c: Define an additional
17828 parameter for mono_assembly_name_parse_full, so we can avoid creating
17829 S.R.AssemblyName.Version when no version info wasn't passed.
17831 2005-10-09 Miguel de Icaza <miguel@novell.com>
17833 * class.c (mono_type_get_full_name): Reimplement method that was
17836 * image.c: Some docs
17838 2005-10-10 Zoltan Varga <vargaz@gmail.com>
17840 * profiler.c (output_newobj_profile): Fix printing of Total memory
17843 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
17845 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
17847 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
17849 * threads.c: remove debug output.
17851 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
17853 * threads.c (mono_thread_manage): Fix crashes if more than 64
17854 threads need to be aborted. Hopefully fixes #75899.
17856 * assembly.c (mono_stringify_assembly_name): New helper function.
17858 * class.c: Use mono_stringify_assembly_name instead of the similar
17861 * assembly.h assembly.c: Add support for calling a postload search
17862 hook if an assembly cannot be loaded.
17864 * appdomain.c: Register new search hooks which call the AssemblyResolve
17865 events in AppDomain. Fixes #75231
17867 2005-10-07 Martin Baulig <martin@ximian.com>
17869 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
17870 methods without debug info.
17872 2005-10-07 Zoltan Varga <vargaz@gmail.com>
17874 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
17877 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17879 * file-io.c: now that we return symlinks, use lstat and, when the file
17880 is a symbolic link, stat, to get the file attributes. Also avoid the
17881 conversion to/from utf16/external.
17883 2005-10-06 Zoltan Varga <vargaz@gmail.com>
17885 * class.c (mono_class_layout_fields): Compute klass->has_references
17886 correctly if an embedded valuetype is not yet initialized. Fixes
17889 2005-10-04 Martin Baulig <martin@ximian.com>
17892 (mono_metadata_load_generic_param_constraints): New public
17893 function; splitted the constraints loading out from
17894 mono_metadata_load_generic_params().
17896 * class.c (mono_class_create_from_typedef): Call
17897 mono_metadata_load_generic_param_constraints() after setting up
17898 the type and creating our parent; fixes #75329.
17900 2005-10-04 Martin Baulig <martin@ximian.com>
17902 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
17903 non-dynamic parent classes.
17905 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
17907 * file-io.c : win32 build fix (ETXTBSY seems not found).
17909 2005-10-04 Martin Baulig <martin@ximian.com>
17912 (mono_image_get_methodspec_token): Make the cache actually work;
17915 2005-10-04 Martin Baulig <martin@ximian.com>
17917 * class.c (mono_class_name_from_token): Removed the unneccessary
17918 `MonoGenericContext *' argument.
17920 2005-10-04 Martin Baulig <martin@ximian.com>
17923 (method_from_methodspec): Make the caching work again; fixes the
17924 performance regression from #76262.
17926 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17930 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
17931 GetFileSystemEntries that performs the same work but without going
17932 into io-layer, locking, etc.
17934 2005-09-30 Zoltan Varga <vargaz@gmail.com>
17936 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
17937 ThreadState_Stopped as well. Fixes #76047.
17939 2005-09-29 Martin Baulig <martin@ximian.com>
17942 (inflate_generic_context): If the new context has a `gmethod', set
17943 its `container' that that gmethod's `container'.
17946 (mono_metadata_parse_generic_param): Simplify things;
17947 `generic_container = generic_context->container;' is just fine.
17949 * loader.c (method_from_methodspec): Code cleanups.
17951 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17953 * decimal.c: fix warning (and let gcc generate correct
17954 code on ARM with optimizations).
17956 2005-09-28 Martin Baulig <martin@ximian.com>
17959 (method_from_memberref): Added `MonoGenericContext *class_context'
17960 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
17961 (method_from_methodspec): If we're a memberref, use the enclosing
17962 context when parsing its parent. Fixes #76262; see gtest-206.cs.
17964 2005-09-28 Martin Baulig <martin@ximian.com>
17966 * object.c (mono_runtime_invoke_array): Added support for
17967 MONO_TYPE_GENERICINST; fixes #75917.
17969 2005-09-27 Martin Baulig <martin@ximian.com>
17971 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
17972 `k->byval_arg.type' to determine the actual type.
17974 * loader.c (method_from_methodspec): Removed some hacks.
17976 2005-09-27 Ben Maurer <bmaurer@ximian.com>
17978 * class-internals.h (mono_field_is_deleted): Do the test for
17979 rtspecialname before we check the actual name of the field. This
17980 prevents us from dereferencing a pointer into the string table,
17981 saving us from accessing a few pages
17983 * *.c: Replace the use of {Enter,Leave}CriticalSection with
17984 macros. This will allow a deadlock debugger to easily be plugged
17987 2005-09-27 Martin Baulig <martin@ximian.com>
17989 * loader.c (method_from_methodspec): Create a "signature"
17990 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
17992 2005-09-27 Martin Baulig <martin@ximian.com>
17995 (inflate_generic_class): Correctly set the new context's
17999 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
18000 instead of a `MonoGenericContext *'.
18001 (mono_method_signature_full): Take a `MonoGenericContainer *'
18002 instead of a `MonoGenericContext *'.
18005 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
18006 instead of a `MonoGenericContext *'.
18007 (mono_metadata_parse_method_signature_full): Likewise.
18009 2005-09-26 Martin Baulig <martin@ximian.com>
18012 (mono_class_from_generic_parameter): Set `klass->generic_container'
18013 (mono_class_from_generic_parameter): Likewise.
18014 (mono_bounded_array_class_get): We inherit the generic container
18015 from the element class.
18018 (find_method, find_method_in_class): Take a `MonoGenericContext *'
18019 argument rather than computing it here.
18020 (method_from_memberref): Correctly set the generic context before
18021 parsing the signature. Fixes #75681.
18023 2005-09-26 Zoltan Varga <vargaz@gmail.com>
18025 * object.c (mono_class_has_special_static_fields): Fix warnings.
18027 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18029 * assembly.c: Add parse_public_key function, to
18030 par the public keys. Also added mono_assembly_name_parse_full,
18031 to define it the parsed key should be freed or not.
18032 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
18033 to parse a long format assembly name.
18034 * metadata-internals.h: Keep mono_assembly_name_parse_full as
18035 private, since calling it to preserve the key requires
18036 freeing it manually.
18038 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
18040 * locales.c : removed HAVE_ICU part.
18042 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
18044 * object.c (mono_class_create_runtime_vtable): Avoid calling
18045 field_is_special_static if the klass has no special static fields.
18047 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
18048 (MonoCachedClassInfo): Likewise.
18050 * object.c (mono_class_has_special_static_fields): New helper function.
18052 2005-09-23 Zoltan Varga <vargaz@gmail.com>
18054 * class.c (mono_class_create_from_typedef): Don't call
18055 interfaces_from_typedef_full for enums.
18056 (mono_class_create_from_typedef): Compute the base types of enums directly
18057 without calling mono_class_setup_fields ().
18058 (mono_class_find_enum_basetype): New helper function.
18060 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
18061 one place inside the string heap.
18063 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
18065 * class.c: locking fixes, code cleanups, some docs added.
18066 Allocate some data structures in the image mempool.
18068 2005-09-23 Zoltan Varga <vargaz@gmail.com>
18070 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
18073 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
18075 * class-internals.h, class.c, reflection.c: reduce memory taken by
18078 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
18080 * metadata.c, metadata.h, loader.h: documentation updates, code and
18083 2005-09-23 Zoltan Varga <vargaz@gmail.com>
18085 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
18088 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
18089 page faults caused by the runtime while reading metadata.
18091 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18093 * socket-io.c: the field names were changed 3 months ago and no one
18094 realized until bug #76077 got filed!
18096 2005-09-20 Martin Baulig <martin@ximian.com>
18098 * icall.c (assembly_icalls): Removed some unused debugger icalls.
18100 2005-09-20 Martin Baulig <martin@ximian.com>
18102 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
18103 write the rank into the class entry.
18105 2005-09-20 Martin Baulig <martin@ximian.com>
18107 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
18109 2005-09-19 Zoltan Varga <vargaz@gmail.com>
18111 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18113 * icall.c (custom_attrs_defined_internal): New icall.
18115 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
18117 (mono_custom_attrs_construct_by_type): New helper function.
18119 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
18121 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
18122 terminate the resulting string. Fixes #76123.
18124 2005-09-16 Martin Baulig <martin@ximian.com>
18127 (mono_debug_add_method): Ignore inflated methods for the moment.
18129 2005-09-14 Martin Baulig <martin@ximian.com>
18131 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
18133 2005-09-13 Zoltan Varga <vargaz@gmail.com>
18135 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
18136 return a success/failure indication.
18137 (mono_metadata_interfaces_from_typedef_full): Ditto.
18138 (get_constraints): Ditto.
18140 2005-09-12 Zoltan Varga <vargaz@gmail.com>
18142 * marshal.c (emit_marshal_array): Fix handling of null arrays.
18144 * marshal.c (emit_marshal_array): Add support for returning string
18145 arrays from delegates. Fixes #76063.
18147 * marshal.c: Use the emit_ldloc/stloc macros where possible.
18149 2005-09-11 Zoltan Varga <vargaz@gmail.com>
18151 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
18154 2005-09-09 Zoltan Varga <vargaz@gmail.com>
18156 * reflection.c icall.c: Fix after mono_get_exception_type_load
18159 * assembly.c (mono_assembly_get_assemblyref): New helper function.
18160 (mono_assembly_load_reference): Use the new helper.
18162 * class-internals.h (MonoLoaderError): New structure containing
18163 information about type loading errors.
18165 * class-internals.h loader.c: Add APIs to store per-thread loader
18168 * loader.c class.c: Set the loader error if needed.
18170 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
18172 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
18174 * decimal.c: fixed to handle the broken ARM fp format.
18176 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
18178 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
18181 2005-09-06 Martin Baulig <martin@ximian.com>
18183 * domain.c (supported_runtimes): Added v2.0.50727.
18185 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
18187 * culture-info.h: reduce the size of some structures.
18189 2005-09-05 Martin Baulig <martin@ximian.com>
18191 Reflect latest API changes in the August CTP.
18194 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
18195 ("MonoType.HasGenericArguments"): Removed.
18196 ("MonoMethod.BindGenericParameters"): Renamed to
18197 "MakeGenericMethod".
18198 ("MethodBuilder.BindGenericParameters"): Renamed to
18199 "MakeGenericMethod".
18201 2005-09-05 Martin Baulig <martin@ximian.com>
18203 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
18205 2005-09-05 Martin Baulig <martin@ximian.com>
18207 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18209 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
18210 generic_container is non-NULL.
18212 2005-09-05 Martin Baulig <martin@ximian.com>
18214 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18216 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
18218 2005-08-29 Michal Moskal <malekith@nemerle.org>
18220 * reflection.c (encode_locals,
18221 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
18222 for large generic types.
18224 2005-09-05 Martin Baulig <martin@ximian.com>
18226 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18228 * class.c (mono_dup_array_type): New public method.
18229 (mono_metadata_signature_deep_dup): New public method.
18230 (dup_type): Correctly duplicate array and function types.
18232 2005-09-05 Martin Baulig <martin@ximian.com>
18234 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18236 * reflection.c (get_default_param_value_blobs): Handle generic types
18237 and generic methods.
18239 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
18241 * class.c: Fixed error reporting (method/class were inversed) for
18242 inheritance demands.
18243 * security-manager.c|h: Added the AppDomain when calling the managed
18244 System.Security.SecurityManager.InheritanceDemand method.
18246 2005-09-01 Raja R Harinath <rharinath@novell.com>
18248 * reflection.c (encode_marshal_blob): 'marshaltype' and
18249 'marshaltyperef' are alternate sources for the custom marshaler
18252 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
18254 * class.c: fix creation of array classes with rank == 1
18255 (patch by Ankit Jain <jankit@novell.com>).
18257 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
18259 * object.c: fix check for creating the bound data for arrays vs
18262 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18264 * object.c: configuration file name is now based on the executable name,
18265 not the image name. Fixes bug #75931.
18267 2005-08-29 Zoltan Varga <vargaz@gmail.com>
18269 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
18270 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
18272 2005-08-25 Zoltan Varga <vargaz@gmail.com>
18274 * rand.c: Use wincrypt.h instead of WinCrypt.h.
18276 2005-08-24 Ankit Jain <jankit@novell.com>
18277 Raja R Harinath <rharinath@novell.com>
18279 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
18280 called by it recursively.
18281 (mono_class_init): Remove special case in pending_init handling, since it's
18282 superseded by the fix to mono_class_from_typeref.
18284 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
18286 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
18287 BROKEN_THREAD_START stuff.
18289 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
18291 * class-internals.h object.c: Add a new kind of trampoline called a delegate
18294 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
18296 * object.c (mono_delegate_ctor): Replace the original function address with
18297 a delegate trampoline.
18299 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
18301 * icall.c: add boolean argument to base64_to_byte_array and
18302 InternalFromBase64String to control whether a whitespace-only string
18303 is allowed (or should casue a FormatException to be thrown). We need
18304 this as the behavior has changed between MS.NET 1.x and 2.0, and we
18305 to match the MS behaviour in both profiles.
18306 * appdomain.c: Bump corlib version.
18308 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18310 This patch implements a big portion of publisher policy
18311 support, used to bind assembly versions and redirect
18312 one assembly from version A to version B.
18315 New GSList loaded_assembly_bindings, for storing the cached
18317 (assembly_binding_maps_name): New static function for checking if a
18318 assembly binding information maps an assembly name.
18319 (mono_assembly_binding_info_free): New function for freeing
18320 assembly binding information resources.
18321 (get_publisher_policy_info): New static function for retrieving
18322 assembly binding information from a MonoImage.
18323 (compare_versions): New static function for comparing an assembly
18324 binding information data and the version of an assembly name.
18325 (check_policy_versions): New static function for checking if an
18326 assembly binding info mapping an assembly name is valid for it.
18327 (mono_assembly_load_publisher_policy): New static function for
18328 loading the 'policy.major.minor.MyAssembly' image for an assembly
18329 with an assembly name 'aname'.
18330 (mono_assembly_bind_version): New static function for updating
18331 assembly redirection.
18332 (mono_assembly_apply_binding): New static function for applying
18334 (search_binding_loaded): New static function for searching
18335 loaded assembly binding infos in the cache domain.
18336 (mono_assembly_load_full): Don't apply assembly binding for
18337 reflection only assemblies.
18339 * metadata-internals.h: Add MonoAssemblyBindingInfo,
18340 which contains information about assembly binding. Also
18341 declare signature for mono_config_parse_publisher_policy ()
18342 function, used to retrieve pub policy info.
18345 (publisher_policy_start): New static function used to parse publisher
18346 policy config files.
18347 (publisher_policy_parser): New static MonoParseHandler containing
18348 the functions used when parsing config files.
18349 (mono_config_parse_publisher_policy): New function for parsing
18350 publisher policy files.
18352 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
18354 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
18356 * marshal.c (mono_delegate_free_ftnptr): Ditto.
18358 * object.c (mono_get_addr_from_ftnptr): New helper function.
18360 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
18362 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18364 2005-08-19 Dick Porter <dick@ximian.com>
18366 * threads.c, threads.h, appdomain.c, appdomain.h,
18367 profiler-private.h, monitor.c, object.c, object-internals.h,
18368 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
18369 store the thread ID, so it can hold a 64 bit value if needed.
18371 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
18373 * reflection.c (mono_reflection_create_dynamic_method): Store the
18374 handle class into the method references as well so ldtoken works in
18377 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
18380 2005-08-19 Ankit Jain <jankit@novell.com>
18383 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
18384 here rather than using the method signature of a arbitrary function
18385 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
18387 Hack done with Harinath.
18389 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18391 * threadpool.c: disable printing stack traces when we get a exception
18392 in a threadpool thread. I need to do more testing to figure out which
18393 cases actually print this. Fixes bug #75828.
18395 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18397 * icall.c: there might be ignored whitespace after the last '='. This
18398 fixes length computation and bug #75840.
18400 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
18402 * assembly.c (mono_assembly_load_full): Consider .exe extension as
18403 well. Fixes #75809.
18405 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
18408 * reflection.c (create_custom_attr_data): Ditto.
18410 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
18412 * locales.c, culture-info.h : removed RegionLCIDMap.
18413 * culture-info-tables.h : regenerated.
18415 2005-08-16 Martin Baulig <martin@ximian.com>
18417 * class.c (mono_type_get_name_recurse): Small fix.
18419 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
18421 * locales.c : indentation fixie.
18423 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
18425 * object-internals.h,
18429 icall.c : added RegionInfo table support.
18430 * culture-info-table.h : regenerated for region support.
18432 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
18434 * reflection.c (resolve_object): handle all kinds of MonoMethod
18435 including generic ones
18437 2005-08-12 Ankit Jain <jankit@novell.com>
18439 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
18440 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
18442 2005-09-12 Lluis Sanchez <lluis@ximian.com>
18444 * process.c: Don't close a thread handle when it's NULL. This is a
18445 workaround for bug #75733.
18447 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
18449 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
18451 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
18453 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
18455 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18457 * threadpool.c: if a work item in the thread pool has a callback that
18458 catches a exception, don't propagate it after invoking the callback.
18461 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
18463 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
18465 * class-internals.h (MonoCachedClassInfo): Add some new fields.
18467 * class.c (mono_class_init): Load field info lazily in the AOT case.
18469 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
18471 2005-08-03 Ankit Jain <jankit@novell.com>
18474 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
18475 PInvoke calling convention is 0.
18477 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
18479 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
18480 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
18482 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
18484 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
18485 to handle threads not started by the GC (patch by Michael Meeks
18486 <michael.meeks@novell.com>).
18488 2005-07-31 Kamil Skalski <nazgul@omega.pl>
18490 * reflection.c: Make buffer used in emitting types larger for some
18491 big generic types (patch by Michal Moskal).
18493 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
18495 * mono-debug.c: Fix some (not all) alignment problems.
18497 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18499 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
18500 Invoke mono_image_load_from_data_full passing the refonly
18504 (mono_assembly_open_from_bundle): Add the refonly argument,
18505 in order to pass it to other methods it calls to.
18506 (do_mono_assembly_open): Add the refonly argument, in order
18507 to pass it to other methods it calls to.
18508 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
18509 the refonly parameter to it.
18511 * image.c: Add loaded_images_refonly_hash and
18512 loaded_images_refonly_guid_hash to cache the reflection
18513 only loaded images.
18514 (mono_images_init): Initialize the hash tables used for
18515 caching the reflection only images.
18516 (load_modules): Invoke mono_image_open_full passing the refonly
18517 parameter to load the modules the correct way.
18518 (build_guid_table): Add the refonly argument, to re-build the
18519 correct hash table.
18520 (do_mono_image_open): Added the refonly argument, in order to
18521 define it for the loaded image.
18522 (mono_image_loaded_full): New function, which receives an
18523 additional parameter to look for the image in the refonly or
18524 non-refonly section.
18525 (mono_image_loaded): Updated, using mono_image_loaded_full.
18526 (mono_image_loaded_by_guid_full): The same case that happens
18527 with mono_image_loaded_full.
18528 (mono_image_loaded_by_guid): Likewise.
18529 (register_image): Use the ref_only variable inside MonoImage
18530 to decide in which hash table store the current image.
18531 (mono_image_open_from_data_full): Rename
18532 mono_image_open_from_data to mono_image_open_from_data_full,
18533 adding the refonly argument, to define the ref_only variable
18535 (mono_image_open_from_data): Return
18536 mono_image_open_from_data_full.
18537 (mono_image_open_full): Rename mono_image_open to
18538 mono_image_open_full, receiving the new refonly argument,
18539 to pass it to inner methods.
18540 (mono_pe_file_open): Update this function, to open
18541 a MonoImage as a non-refonly image.
18542 (mono_image_close): Use the refonly variable inside
18543 MonoImage to remove the image from the correct caches.
18545 * image.h: Add the signatures of mono_image_open_full,
18546 mono_image_open_from_data_full, mono_image_loaded_full,
18547 mono_image_loaded_by_guid_full.
18549 * metadata-internals.h: Add the ref_only field to
18552 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18554 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
18555 Fix the last behavior, which used to load the assemblies and
18556 extract MonoReflectionAssemblyName information, instead of
18557 extract it from the metadata tables. Needed for Reflection
18560 2005-07-29 Martin Baulig <martin@ximian.com>
18562 * mono-debug-debugger.c
18563 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
18567 (mono_debug_address_from_il_offset): Check whether we have
18568 debugging support before attempting to take the lock.
18569 (mono_debug_source_location_from_address): Likewise.
18570 (mono_debug_source_location_from_il_offset): Likewise.
18571 (mono_debug_il_offset_from_address): Likewise.
18572 (mono_debug_address_from_il_offset): Likewise.
18574 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
18576 * class.c (mono_class_from_name_case): Add support for dynamic images.
18579 * object.c (mono_class_compute_gc_descriptor): Add a workaround
18582 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
18584 * reflection.c (mono_method_get_object): Fix warning.
18586 2005-07-28 Martin Baulig <martin@ximian.com>
18589 (mono_debug_add_wrapper): Also write the wrapper type.
18591 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
18593 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
18595 * class.c (mono_class_init): Avoid reading nested classes if the AOT
18596 data indicates the class has none.
18598 2005-07-26 Ben Maurer <bmaurer@ximian.com>
18600 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
18601 loader lock with the debugger lock. Prevents deadlocks for beagle.
18603 Beagle can now run on an smp box for a weekend without any
18606 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
18608 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
18609 in a module. Fixes #75629.
18611 2005-07-26 Martin Baulig <martin@ximian.com>
18613 * mono-debug.c (mono_debug_add_wrapper): New static method.
18614 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
18615 interncall or a wrapper.
18617 * mono-debug.h (MonoDebugWrapperData): New public typedef.
18618 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
18619 (MONO_DEBUGGER_VERSION): Bump to 51.
18621 * mono-debug-debugger.c
18622 (mono_debugger_add_type): Removed this empty function.
18623 (mono_debugger_add_method): Likewise.
18625 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
18627 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
18628 before accessing method->slot.
18630 2005-07-21 Jb Evain <jbevain@gmail.com>
18632 * reflection.c (method_encode_clauses/class): Handle filters clauses.
18635 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
18637 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
18640 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
18642 * image.h image.c: Add mono_image_get_guid () API function.
18644 2005-07-19 Ben Maurer <bmaurer@ximian.com>
18646 There were issues when multiple threads tried to load
18647 assemblies. A deadlock was created between assemblies_mutex and
18648 mono_domain_assemblies_lock. This fixes the issue by making the
18649 assembly ref counting be lock free. See bug 75586.
18651 * image.c (mono_image_close): The add ref function here was using
18652 Interlocked operations while the unref was using a mutex and a
18653 --. I don't think this was ever a bug that would be exposed in a
18654 non-pendantic way (ie, by an embedder doing a ref on one thread
18655 and an unref on another), but for the sake of correctness, this is
18658 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
18659 (mono_assembly_load_reference): Call mono_assembly_addref rather
18660 than touching the refcount ourselves.
18661 (mono_assembly_close): Use InterlockedDecrement to unref the
18662 assembly. Don't acquire the lock unless it is actually needed.
18664 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
18666 * class.c (mono_class_layout_fields): Fix calculation of has_references
18669 2005-07-12 Martin Baulig <martin@ximian.com>
18671 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18674 (mono_type_hash): Provide better hashing for generic instances.
18675 (mono_generic_inst_hash): Improve hashing.
18676 (mono_generic_class_hash): Likewise.
18678 * reflection.c (mymono_metadata_type_hash): Improve hashing for
18681 2005-07-12 Martin Baulig <martin@ximian.com>
18683 * reflection.c (mono_reflection_create_runtime_class): Remove the
18684 hack for generic type definitions and non-`Run' assemblies.
18685 (mono_reflection_bind_generic_parameters): Also use
18686 `klass->wastypebuilder' to check for TypeBuilders.
18688 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
18690 * class.c (mono_class_layout_fields): Fix calculation of has_references
18693 * class.c (inflate_generic_class): Fix a leak.
18694 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
18697 2005-07-11 Martin Baulig <martin@ximian.com>
18699 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
18702 2005-07-11 Martin Baulig <martin@ximian.com>
18704 * loader.c (find_method): Also lookup in
18705 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
18707 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18709 * appdomain.c (mono_domain_unload): Don't free the error message
18710 before passing it to mono_get_exception_...
18712 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
18714 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
18716 * threads.c: try to better guess an available RT signal (bug #75387).
18718 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18720 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
18723 2005-07-07 Martin Baulig <martin@ximian.com>
18725 * class.c (mono_type_get_name_full): Return NULL for
18726 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
18729 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18731 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
18732 exit the appdomain as well being aborted.
18734 * threadpool.c: Create all threadpool threads inside the root appdomain, and
18735 change back to the root domain after calling managed code. This enables
18736 appdomains using threadpools to be unloaded.
18738 2005-07-07 Martin Baulig <martin@ximian.com>
18740 * class-internals.h
18741 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
18742 into `MonoDynamicGenericClass' since we only need it for dynamic
18745 * reflection.c (mono_class_bind_generic_parameters): We don't need
18746 to compute the `parent' here.
18748 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
18750 * culture-info-table.h : regenerated.
18752 2005-07-06 Martin Baulig <martin@ximian.com>
18755 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
18757 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
18759 2005-07-06 Martin Baulig <martin@ximian.com>
18761 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
18762 we're doing a signature-only comparision; fixes #74945.
18764 2005-07-06 Martin Baulig <martin@ximian.com>
18766 * class-internals.h (MonoGenericClass): Moved some things out into
18767 a new `MonoInflatedGenericClass' type.
18768 (MonoInflatedGenericClass): New type; the `klass' of a
18769 `MonoGenericClass' is now computed lazyly in
18770 mono_get_inflated_generic_class().
18772 * class.c (mono_get_inflated_generic_class): New public function.
18773 (mono_class_inflate_generic_method): Removed the unused
18774 `MonoClass *' argument.
18775 (setup_generic_vtable): Don't call mono_get_inflated_method() on
18777 (mono_class_create_generic): Make this static and merge it with
18778 mono_class_create_generic_2(); we're now called automatically from
18779 mono_get_inflated_generic_class().
18781 * loader.c (mono_method_signature): Call
18782 mono_get_inflated_method() here.
18784 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
18786 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
18787 type of fields with RVA.
18789 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
18790 for this pseudo class.
18791 (my_mono_class_from_generic_parameter): Likewise.
18792 (mono_class_init): Allow interfaces to have cctors.
18794 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
18796 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
18797 lazily for AOT methods.
18799 2005-07-05 Martin Baulig <martin@ximian.com>
18801 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
18802 returns FALSE for a successful match, not TRUE.
18804 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
18806 * loader.c (mono_method_get_index): Optimize this a bit.
18808 2005-07-04 Martin Baulig <martin@ximian.com>
18811 (class_compute_field_layout): Move the check for generic type
18812 definitions into mono_class_layout_fields(). Fixes #74684.
18813 (mono_class_from_generic_parameter): Correctly compute
18814 `klass->parent'; fixes #75457.
18816 * reflection.c (register_assembly, register_module): Make sure
18817 `domain->rejobject_hash' is already created.
18819 2005-07-02 Martin Baulig <martin@ximian.com>
18821 * class-internals.h
18822 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
18823 `MonoDynamicGenericClass'.
18825 2005-07-01 Lluis Sanchez <lluis@ximian.com>
18827 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
18828 returned by a field getter is null, since null is a valid value.
18830 2005-07-01 Martin Baulig <martin@ximian.com>
18832 * reflection.c (mono_reflection_generic_class_initialize): Update
18833 the `dgclass->fields [i].parent' to the correct class.
18834 (mono_image_get_fieldref_token): Use the declaring type, not the
18837 2005-07-01 Martin Baulig <martin@ximian.com>
18839 * loader.c (find_method): Also look in the interfaces; fixes #75429.
18841 2005-06-30 Ben Maurer <bmaurer@ximian.com>
18843 * threads.c (thread_cleanup): assert that thread != NULL
18844 (wait_for_tids_or_state_change): We were using the wrong variable
18845 when accessing wait->threads. `i' was always out of the bounds of
18848 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18850 * loader.c: map user32 and kernel32 to libMonoSupportW
18852 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
18854 * appdomain.c (unload_thread_main): Mark this as WINAPI.
18856 2005-06-28 Martin Baulig <martin@ximian.com>
18858 * loader.c (method_from_methodspec): Fix #75334.
18860 2005-06-28 Martin Baulig <martin@ximian.com>
18862 Fix #74953 - Arrays now implement the generic IList<T> interface
18863 on the 2.0 platform.
18865 * class-internals.h (MonoDefaults): Added `generic_array_class'.
18867 * reflection.c (mono_class_bind_generic_parameters): New public
18868 function; similar to mono_reflection_bind_generic_parameters(),
18869 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
18871 * domain.c (mono_init_internal): Try to initialize.
18872 `mono_defaults.generic_array_class' here; this'll only succeed if
18873 we're using the 2.0 corlib.
18876 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
18877 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
18878 (mono_lookup_internal_call): Added support for nested classes.
18881 (mono_get_method_from_token): Set `result->signature->pinvoke' if
18882 we're an interncall and have generic arguments.
18885 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
18886 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
18887 instance of System.Array.InternalArray<T> for arrays, so they
18888 implement the generic IList<T> interface.
18890 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
18892 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
18893 (chastamar@yahoo.com). Fixes #75374.
18895 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
18897 * culture-info-table.h: regenerated.
18899 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18901 * icall.c: handle spaces correctly for base64 strings.
18903 2005-06-26 Ben Maurer <bmaurer@ximian.com>
18905 * *.c: Kill some warnings.
18907 2005-06-23 Duncan Mak <duncan@novell.com>
18909 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
18910 that this builds on Solaris 10 (x86).
18912 2005-06-23 Martin Baulig <martin@ximian.com>
18915 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
18916 generic type definitions.
18918 2005-06-23 Martin Baulig <martin@ximian.com>
18922 * metadata.c (mono_class_get_overrides): Renamed to
18923 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
18924 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
18925 pass it to mono_get_method_full().
18927 2005-06-22 Ben Maurer <bmaurer@ximian.com>
18929 * reflection.c (mono_reflection_create_runtime_class): take the
18930 mono_domain_lock in this method. Prevents deadlocks
18932 2005-06-22 Martin Baulig <martin@ximian.com>
18934 * loader.c (method_from_methodspec): Fix #75330.
18936 2005-06-22 Martin Baulig <martin@ximian.com>
18938 * reflection.c (type_get_qualified_name): Use
18939 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
18940 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
18941 argument; use it if we don't have an assembly name.
18943 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
18945 * object.c: In mono_message_init, set "copy out" flag for in
18946 parameters with the [Out] flag.
18948 2005-06-21 Martin Baulig <martin@ximian.com>
18951 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
18954 2005-06-21 Martin Baulig <martin@ximian.com>
18956 * class.c (mono_class_init): Don't initialize `class->fields' for
18957 generic instances since they're initialized again in
18958 compute_field_layout().
18959 (compute_field_layout): Set the field's `generic_info' here; fix
18962 2005-06-21 Martin Baulig <martin@ximian.com>
18964 * class-internals.h
18965 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
18967 * metadata.c (mono_metadata_generic_method_equal): Also
18968 distinguish the `generic_class'; fixes #75334.
18970 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18974 * domain-internals.h:
18975 * reflection.c: 'domain_assemblies' field is now protected by its own
18976 lock. Don't call into managed code to run the AssemblyLoad event if we
18977 now there are no registered delegates for it.
18979 2005-06-20 Martin Baulig <martin@ximian.com>
18981 * class.c (mono_class_is_assignable_from): Use a custom version of
18982 mono_class_has_parent() to make things work for generic instances;
18985 2005-06-20 Martin Baulig <martin@ximian.com>
18987 * loader.c (method_from_methodspec): Apply a patch from
18988 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
18990 2005-06-20 Martin Baulig <martin@ximian.com>
18992 * class.c (mono_class_init): Reverted Zoltan's last change; it
18995 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
18997 * threads.c (wait_for_tids_or_state_change): Add missing locking.
18999 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19001 * socket-io.c: fix the index in the socket array for writable/error
19002 sockets. Fixes bug #75306.
19004 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
19006 * class.c (mono_class_init): Allow interfaces to have static ctors.
19008 2005-06-17 Martin Baulig <martin@ximian.com>
19010 * loader.c (method_from_methodspec): Use `context->container' when
19011 parsing the `gmethod->inst'.
19013 2005-06-17 Martin Baulig <martin@ximian.com>
19015 * class.c (mono_type_get_name_recurse): Don't add the assembly
19016 name for type arguments.
19018 2005-06-15 Martin Baulig <martin@ximian.com>
19020 * reflection.c (mono_image_get_inflated_method_token): Encode
19021 correct klass; fixes #75260.
19023 2005-06-13 Michal Moskal <malekith@nemerle.org>
19025 * icall.c: Make GetCorrespondingMethod/Constructor take
19026 MonoReflectionMethod method not MonoMethod. Removed
19027 MonoType.GetCorrespondingField, and make
19028 MonoGenericType.GetCorrespondingField take name not
19031 2005-06-13 Michal Moskal <malekith@nemerle.org>
19033 * reflection.c (field_encode_signature, encode_locals):
19034 Make sizes of buffers for types larger (for big generic types).
19035 (create_generic_typespec,
19036 mono_reflection_sighelper_get_signature_local,
19037 mono_reflection_sighelper_get_signature_field):
19038 Add asserts for too small buffers.
19040 2005-06-15 Martin Baulig <martin@ximian.com>
19042 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
19043 if our parent is not a dynamic type.
19045 2005-06-15 Martin Baulig <martin@ximian.com>
19047 * class-internals.h (MonoTypeNameFormat): New enum.
19050 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
19051 (mono_type_get_full_name): Removed.
19052 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
19053 argument instead of the boolean's.
19055 * icall.c (ves_icall_System_MonoType_getFullName):
19056 Added `gboolean assembly_qualified'.
19059 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
19061 * reflection.c (mono_reflection_parse_type): Parse the new type
19064 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19066 * icall.c: no need to convert from utf16 to utf8 and then back again
19067 after the call to GetLogicalDrives.
19069 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19071 * icall.c: frombase64. Fix problems exposed by new tests.
19073 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19075 * icall.c: added internal calls for converting char [] and strings in
19076 base64 into byte [].
19078 2005-06-10 Martin Baulig <martin@ximian.com>
19080 * class.c (mono_class_create_generic_2): Read the nested classes
19081 from the metadata rather than from `gklass->nested_classes' since
19082 `gklass' might not be initialized yet.
19084 2005-06-09 Duncan Mak <duncan@novell.com>
19086 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
19087 all public headers. Fixes #74919.
19089 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
19091 * domain.c: The key for proxy_vtable_hash is now a pointer
19092 array. Added new GHashFunc and GCompareFunc functions for this.
19094 * class.h: The list of interfaces in MonoRemoteClass is known in
19095 advance and can't grow (we create a new MonoRemoteClass if needed),
19096 so now the interface array can be allocated together with
19099 * object.c: Added a new method create_remote_class_key.
19100 Fixed mono_remote_class so it does not depend on
19101 mono_upgrade_remote_class.
19102 Removed extend_interface_array.
19103 Added new method clone_remote_class(), which makes a copy of a remote
19104 class and adds a new interface or class to it.
19105 mono_upgrade_remote_class() now creates a new remote class (or gets
19106 it from the cache) if an vtable upgrade is needed. In this way
19107 we make sure that other objects sharing the same remote class
19108 don't get the new vtable with unwanted interfaces.
19110 * object-internals.h:
19111 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
19113 * marshal.c: Track changes in mono_upgrade_remote_class().
19115 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
19116 * icall.c: Add runtime methods for obtaining members of inflated
19117 class, which were created from supplied non-inflated members. It
19118 is used in internal Get{Method,Constructor,Field} methods in
19121 2005-06-09 Martin Baulig <martin@ximian.com>
19124 (mono_reflection_bind_generic_method_parameters): Fix #75169.
19126 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19127 * reflection.c (mono_image_basic_init): Define
19128 Version in MonoDynamicAssembly.
19130 2005-06-08 Martin Baulig <martin@ximian.com>
19135 (mono_method_signature_full): New public method; takes a
19136 `MonoGenericContext *'.
19137 (find_method): Use mono_method_signature_full() and pass the
19138 klass'es context to it.
19140 * class.c (mono_class_is_inflated_method): Use
19141 mono_method_signature_full() and pass the context to it.
19143 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
19145 * object.c: add proper locking in mono_remote_class_vtable(),
19146 fixes possible memory corruption.
19148 2005-06-08 Michael Meeks <michael.meeks@novell.com>
19150 * marshal.c (mono_remoting_marshal_init): set
19151 initialized after initialization.
19153 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
19155 * locales.c : hush.
19157 2005-06-06 Michael Meeks <michael.meeks@novell.com>
19159 * object.c (extend_interface_array): fix really silly
19160 memory corrupting / comparison bug.
19162 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19164 * reflection.c: Functions added to support the creation
19165 of CustomAttributeData, which includes Attribute data
19166 used by ReflectionOnly methods.
19168 * reflection.h: mono_reflection_get_custom_attrs_data and
19169 mono_custom_attrs_data_construct added (functions exposed).
19171 * icall.c: Added mono_reflection_get_custom_attrs_data
19174 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
19176 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
19179 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
19181 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
19183 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
19184 dynamic DllImportAttribute.
19186 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
19187 dynamic DllImportAttribute.
19189 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
19192 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19194 * threads.c: avoid segfault when an unstarted thread is aborted.
19196 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
19198 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
19199 Returns the name and version of the runtime for reporting.
19201 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19203 * appdomain.c: bump corlib version.
19204 * object-internals.h: new field in MonoReflectionAssembly.
19206 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19208 * object-internals.h: Carlos forgot to add this field.
19210 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19212 * icall.c: Added create_version to create instances
19213 of Version of MonoReflectionAssemblyName. This change helps
19214 the AssemblyName tests to keep running fine.
19216 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
19218 * object.c (mono_method_return_message_restore): A somehow less
19219 intrusive fix for #75138.
19221 2005-06-03 Raja R Harinath <rharinath@novell.com>
19223 * object.c (mono_method_return_message_restore): Fix computation
19224 of expected number of out args.
19226 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
19228 * reflection.c (mono_image_get_method_info): Fix the case when the
19231 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
19233 * object.c: Added missing null check in
19234 mono_method_return_message_restore.
19236 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
19238 * reflection.c (mono_image_get_method_info): Handle the case when
19241 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
19243 * object.c: When creating the vtable for a proxy, take into account
19244 all inherited interfaces, not only the ones registered in
19245 iclass->interfaces. This fixs bug #74996.
19246 Also, in mono_method_return_message_restore, verify that the array
19247 of out args has the expected lengh.
19249 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19251 * socket-io.c: update the timeout in Poll when the call is interrupte.
19253 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19255 * socket-io.c: support abort/suspend in Select_internal after last
19258 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19260 * threadpool.c: remove warning.
19262 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19265 * socket-io.[ch]: Select_internal uses poll() now when available, thus
19266 removing the 1024 limit from select(). Runtime part of the fix for
19269 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19271 * socket-io.c: when resolving the addresses for the same
19272 host returned by gethostname(), get the local IPs from the interface
19273 list. Loopback addresses are discarded if the are interfaces up with
19274 non-loopback ones. Fixes bug #63265.
19276 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
19278 * appdomain.c, verify.c, object-internals.h, reflection.c:
19279 bumped corlib number to 36, and added new extra_flags field
19280 to ReflectionMethodBuilder and friends. Fixes #75060.
19282 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
19284 * gc.c: register a new weak link only if the object is non-null
19287 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
19289 * culture-info.h : short time pattern too.
19291 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
19293 * culture-info.h : expand long time pattern string length.
19295 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
19297 * culture-info-table.h : update (more French date format; #72788).
19299 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
19301 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
19302 the method is static. Fixes #75029.
19304 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
19306 * reflection.c: Update the table_idx field of method builders after
19307 saving the module, since it can change. This is a workaround for
19310 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
19312 * culture-info-table.h : update (additional French date format).
19314 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
19316 * icall.c (ves_icall_type_Equals): Revert last change.
19318 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
19320 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
19322 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
19324 * class-internals.h: Added executioncontext_class field to
19325 MonoDefaults structure.
19326 * domain.c: Cache System.Threading.ExecutionContext class in
19328 * object.c: Capture the ExecutionContext for asynchroneous calls in
19329 mono_async_result_new.
19330 * object-internals.h: Added execution_context and original_context
19331 fields to MonoAsyncResult. Added execution_context to MonoThread.
19332 * security-manager.c|.h: Added mono_get_context_capture_method to
19333 return the capture method (if required by the security manager or by
19334 the framework version used).
19335 * threadpool.c: Apply capture (if present) ExecutionContext in
19336 mono_async_invoke and revert to original context after it completes.
19338 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
19340 * culture-info-table.h : updated (real hacky solution for zh-CHT).
19342 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
19344 * culture-info-table.h : zh-CHT related workaround.
19346 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
19348 * marshal.c (emit_marshal_custom): Add some error checking and call the
19349 methods in the ICustomMarshaler interface. Fixes #74875.
19351 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
19352 native->managed wrappers.
19354 2005-05-12 Martin Baulig <martin@ximian.com>
19356 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
19357 here and use the loader lock.
19359 * mono-debug.c: Properly lock when the debugger is not attached.
19360 (mono_debug_init): Release the initial lock if we're not running
19363 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
19365 * marshal.c (emit_marshal_custom): Pass through NULL values without
19366 calling the custom marshalling routines.
19368 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
19369 conversion in structures. Fixes #74882.
19371 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
19373 * culture-info-table.h : zh-* cultures were missing.
19375 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
19377 * threads.c: Added a new event background_change_event which is signaled
19378 when a thread changes its background mode.
19379 Moved here several checks previously done in managed code. The checks
19380 require the thread lock, and using the thread lock in managed code
19381 can result in deadlocks.
19382 Merged Start_internal and Thread_internal into a single method. Now
19383 Thread_internal does all work of creating and starting a thread.
19384 Added icalls for setting and getting the state of the object. Moved from
19385 managed code to avoid locking there.
19386 Added wait_for_tids_or_state_change() which is called instad of
19387 wait_for_tids when waiting for non-backround threads to end. This method
19388 will return if one of the threads ends or the background_change_event
19390 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
19391 the background mode. This method signals the background_change_event
19394 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
19395 removed Start_internal.
19397 2005-05-11 Martin Baulig <martin@ximian.com>
19399 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
19400 to order of some fields to get proper alignment on 64-bit machines.
19402 2005-05-11 Martin Baulig <martin@ximian.com>
19404 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
19405 changes as they're broken and completely fuck up the debugger.
19407 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
19409 2005-05-10 Martin Baulig <martin@ximian.com>
19411 * reflection.c (mono_reflection_generic_class_initialize): Don't
19412 call mono_class_setup_parent() here.
19414 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19416 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
19417 send/receive timeout use an integer in milliseconds. We were using a
19420 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19423 (internal_get_cultures): reserve the first slot of the array for the
19424 InvariantCulture, which will be filled in managed code.
19426 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
19428 * reflection.c (mono_image_fill_module_table): Initialize the
19429 GENERATION field as well.
19431 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19433 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
19434 Monitor.Enter on the object.
19436 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
19438 * threads.c: Enable the wait for running threads when exiting.
19439 * icall.c: Suspend all threads before exiting.
19441 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
19443 * assembly.c (mono_assembly_load_reference): Fix warning.
19445 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19447 * threadpool.c: changed the default number of threads per cpu. From now
19448 on, the default will be 20 + (5 * number of cpus) instead of 50.
19450 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
19452 * loader.c (mono_method_get_signature_full): Add locking here.
19454 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
19456 * appdomain.c: Moved methods for parsing and freeing assembly
19457 names to assembly.c.
19458 * assembly.c, domain-internals.h: Created public methods for parsing
19459 assembly names. Fixed mono_assembly_load_with_partial_name:
19460 it now finds the best match, taking into account the version,
19461 token and culture specified in the partial name. Also return
19462 the latest version if no version information is specified.
19464 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
19466 * threadpool.c: replace check for SocketAsyncCall class.
19468 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19470 * threadpool-internals.h:
19471 * Makefile.am: added threadpool-internals.h
19473 * threadpool.c: call mono_unhandled_exception on exceptions not handled
19474 that happen in threadpool threads (tested on MS).
19475 (mono_thread_pool_remove_socket): new function that dispatch any pending
19476 AIO call on a socket that is closing. By now only epoll really needs it,
19477 as select/poll wake up when the socket closes.
19480 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
19482 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
19484 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
19486 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
19488 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
19490 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
19492 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
19493 has an abort request, convert it into a suspend request.
19495 2005-04-30 Ben Maurer <bmaurer@ximian.com>
19497 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
19498 warning for the usage of `UnmanagedFunctionPointerAttribute' which
19499 is not supported yet.
19501 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19503 * image.c: register assemblies loaded from data (bundles) in the loaded
19504 assemblies hash. Fixes bug #74772.
19506 2005-04-29 Martin Baulig <martin@ximian.com>
19508 * class.c (mono_type_get_name_recurse): Update to the new naming
19509 schema from the latest .NET 2.x beta2.
19510 (mono_class_setup_vtable_general): If we're a generic instance,
19511 copy the vtable from our generic type definition and inflate all
19514 * loader.c (find_method): Update to the new naming schema from the
19515 latest .NET 2.x beta2.
19517 2005-04-29 Raja R Harinath <harinath@gmail.com>
19519 * class.c (mono_class_init): Add a mono_loader_unlock to the
19522 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
19524 * icall.c (ves_icall_System_Environment_Exit): Remove the
19525 suspend_all_other_threads () call for the time being, since it can hang.
19527 * threads.c (mono_thread_manage): Similarly, disable the waiting for
19528 the background threads to exit, since it can also hang.
19530 * class.c (mono_class_init): Applied patch from Ankit Jain
19531 (radical@gmail.com). Avoid pending init errors when a field refers
19532 to a nested class using a typeref. Fixes #74734.
19534 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
19535 this for dynamic modules.
19537 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19539 * threads.c: don't wait for threads that are in the process of aborting
19540 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
19541 and waiting for background threads to finish. This makes xsp and
19542 mod-mono-server exit without random length delays and/or hangs.
19544 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19546 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
19548 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
19550 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
19551 dynamic types to prevent infinite loops. Fixes #74727.
19553 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
19554 ..._is_assignable_to.
19556 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
19558 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
19560 2005-04-25 Martin Baulig <martin@ximian.com>
19562 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
19565 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
19567 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
19569 * reflection.c (build_compressed_metadata): Set metadata header
19572 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
19574 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
19575 number into an integral and a decimal part. Fixes #70473.
19577 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
19579 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
19581 * culture-info-table.h : reflected the latest locale-builder output.
19583 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19585 * threadpool.c: check for SuspendRequested too when deciding if
19586 mono_thread_interruption_checkpoint should be called.
19588 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19590 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
19591 * threads.c: remove interruption_mutex and use Interlocked instead. When
19592 suspending all the threads, wait for all the suspended events at once.
19593 If we're shutting down and get an APC that is going to be queued,
19594 call mono_thread_execute_interruption immediately, as the thread might
19595 be sleeping on a pthread condition or mutex.
19597 * icall.c: call mono_runtime_set_shutting_down before suspending the
19600 Fixes bug #74693. And now xsp is happier when exiting.
19602 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
19604 * loader.c (mono_stack_walk): Fix #74690.
19606 2005-04-22 Martin Baulig <martin@ximian.com>
19608 * mono-debug.h (MonoDebugMethodJitInfo): Added
19609 `MonoDebugMethodJitInfo *jit'.
19611 * mono-debug.c (mono_debug_read_method): Cache the
19612 MonoDebugMethodJitInfo in `address->jit'.
19613 (mono_debug_free_method_jit_info): New public method.
19615 2005-04-22 Martin Baulig <martin@ximian.com>
19617 * class.c (mono_class_is_assignable_from): Disallow
19618 type parameter -> interface.
19620 2005-04-21 Dick Porter <dick@ximian.com>
19622 * threads.c (mono_thread_create): Turn an assertion into an error.
19624 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
19626 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
19628 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
19629 Fix some gcc 4.0 warnings.
19631 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
19633 * file-io.c: fix alt dir separator char on unix systems
19634 and cleanup (fixes bug #71214).
19636 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
19638 * marshal.c: Use CALLVIRT instead of CALL when dispatching
19639 a call to a remote domain, since the method may be an
19640 interface method in the client domain. This fixes bug #74192.
19642 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19644 * threadpool.c: recv/send are now performed before going back to managed
19645 code to save one transition.
19647 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19649 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
19651 * metadata/threadpool.c: removed hack to workaround the bug above.
19655 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
19657 * reflection.c reflection.h: Fix handling of parameter defaults in
19658 dynamic methods. Also fixes handling of parameter attributes.
19661 * mono-debug.c (mono_debug_close_image): Fix warning.
19663 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19665 * socket-io.h: replaced old unused field with new 'blocking'.
19666 * threadpool.c: restore socket blocking state on windows(tm).
19668 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
19670 * icall.c: don't return the codebase in the AssemblyName[] returned by
19671 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
19672 * object-internals.h: Removed FIXME (fields were presents) and fixed
19673 versioncompat declaration.
19675 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19677 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
19678 not closed, so don't cleanup when it happens.
19680 2005-04-13 Chris Toshok <toshok@ximian.com>
19682 * mono-debug-debugger.h: change prototype for
19683 mono_debugger_lookup_type.
19685 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
19686 this function, although it should probably be named
19687 mono_debugger_init_type.
19689 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19691 * threadpool.c: fix non-AIO case.
19693 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
19695 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
19696 the built-in profiler to measure just JIT compilation times.
19698 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19700 * threadpool.c: the epollfd might be closed by another thread at
19701 any time, so ignore EBADF at treat it as a "we're closing" sign.
19703 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19705 * threadpool.c: release the semaphores with a count equals to the number
19706 of working threads in both IO and regular pools. Fixed typo that messed
19707 up the count of IO pool threads. Don't initialize the pipe handles if
19710 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19712 * threadpool.c: some systems don't like a NULL when deleting the socket
19715 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19717 * threadpool.c: fix semaphore allocation.
19719 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19721 * threadpool.c: added epoll() based implementation for asynchronous IO
19722 that is used instead of the default poll() when available.
19723 It can be disabled by setting MONO_DISABLE_AIO.
19725 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19727 * threadpool.c: windows needs 'closesocket' and instead of returning
19728 0 when the stream is closed while in select, it returns -1. Fixes bug
19731 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
19733 * class.c (class_compute_field_layout): Fix the regression caused by
19736 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19738 * threadpool.c: separate pool for socket async. IO.
19739 * threadpool.h: mono_max_worker_threads is not a global any more.
19741 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
19743 * class.c (class_compute_field_layout): Fix #74549.
19745 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19747 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
19748 use 2 connected sockets instead.
19750 2005-04-08 Miguel de Icaza <miguel@novell.com>
19752 * mono-config.c: Add new entry point for mkbundle
19753 mono_config_parse_memory.
19755 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19757 * threadpool.c: removed another unused function.
19759 2005-04-08 Ankit Jain <radical@corewars.org>
19761 * reflection.c (get_default_param_value_blobs): Add 'types'
19762 parameter to get the types encoded in the constant table.
19763 (mono_param_get_objects): Use the type from the constant table,
19764 not the type of the parameter, when creating default values.
19765 Handle null default values correctly.
19767 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19774 * socket-io.c: removed dead code for async IO.
19776 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19778 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
19780 * threadpool.c: intercept socket async. calls and pass them to a thread
19781 that is polling and dispatching the job items to the threadpool as
19782 socket become ready. Fixes bugs #71217, #71933.
19784 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
19785 between char and short/ushort arrays.
19787 * socket-io.c: remove dead code.
19789 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
19792 icall.c : removed InternalToUpper_Comp() and
19793 InternalToLower_Comp().
19795 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
19797 * char-conversions.h : The tables were incorrectly generated. Should
19798 be generated against invariant culture.
19800 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
19802 * object.c (mono_runtime_invoke_array): Fix return value when
19803 passing pre-created valuetype objects to ctors.
19805 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
19806 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
19809 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
19811 * domain.c: removed g_assert for runtimesecurityframe_class. This is
19812 only used with --security and hides the wrong corlib version error.
19814 2005-03-30 Joshua Tauberer <tauberer@for.net>
19816 * class.c: Changed mono_class_name_from_token so that types
19817 outside of a namespace don't have an initial period. Improved
19818 the g_warning message used in _mono_class_get when loading
19820 * assembly.c: In mono_assembly_load_reference, when an assembly
19821 can't be found, "No such file or directory" is misleading and
19822 unhelpful because a few paths were checked for the presence of
19823 the assembly. When that happens (ENOENT), display a nicer
19824 message indicating the directories that were searched. In all
19825 cases, the warning is made easier to read for non-hackers.
19827 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
19829 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
19831 * appdomain.h|domain.c: Removed inline from functions.
19832 * appdomain.c: Reduced warnings when compiling on windows.
19833 * icall.c: Fixed output_debug declaration to gunichar2*.
19834 * mono-config.c: Reduced warnings when compiling on windows.
19835 * rand.c: Added missing "windows.h". Added missing return value.
19836 * rawbuffer.c: Added missing winsock2.h for windows.
19837 * sysmath.h: Added mono-compiler.h header to allow/ease
19838 compilation with non-GCC compilers.
19839 * threads.c: Fixed declarations to compile with VS.NET C compiler.
19840 Removed cast warnings.
19842 Adapted from the work of J Lothian (for VC6).
19844 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
19846 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
19849 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
19851 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
19854 2005-03-27 Raja R Harinath <harinath@gmail.com>
19856 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
19857 has to be in $(exec_prefix). $(prefix) is for arch-independent
19858 stuff, and it would probably use $(prefix)/share rather than
19861 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19863 * console-io.c: added 2 includes that might be missing.
19865 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
19867 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
19870 * reflection.c (create_custom_attr): Allocate the params array using
19871 alloca so it gets GC tracking.
19873 2005-03-23 Chris Toshok <toshok@ximian.com>
19875 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
19878 2005-03-24 Raja R Harinath <rharinath@novell.com>
19880 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
19881 changes to pick up any changes in prefix, etc.
19883 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19885 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
19887 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
19888 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
19890 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19892 * class-internals.h object-internals.h class.c reflection.c: Extend the
19893 mono_lookup_dynamic_token () function to return the class of the
19896 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
19897 well. Fixes #73848.
19899 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
19901 * security-manager.c: Skip inheritance checks for intra-corlib
19902 class inheritance and method overrides. This skips a lot of checks
19903 and (anyway) permissions cannot work until corlib is loaded.
19905 2005-03-23 Martin Baulig <martin@ximian.com>
19907 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
19908 MONO_TYPE_GENERICINST.
19910 2005-03-23 Martin Baulig <martin@ximian.com>
19912 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
19914 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19916 * class.c: added locking comments to some functions.
19917 Cache the interface offsets arrays (saves about 20 KB
19918 of runtime memory in a typical app).
19919 Reduce the time overhead in mono_class_setup_supertypes ().
19921 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
19923 * icall.c: speedup and fix leaks in GetMethodsByName and
19924 GetPropertiesByName.
19926 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19928 * reflection.c: some locking fixes.
19930 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19932 * metadata.c: added missing break in case statement.
19934 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
19936 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19937 typedbyref return values. Fixes #73941.
19939 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
19941 * security-manager.c|h: Added demandunmanaged method and
19942 suppressunmanagedcodesecurity class to MonoSecurityManager.
19943 Renamed aptc class to allowpartiallytrustedcallers.
19945 2005-03-17 Martin Baulig <martin@ximian.com>
19947 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
19949 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19951 * file-io.c: disabled file async. IO using aio_*. It uses the
19952 threadpool now. Workaround for bug #73718.
19954 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19956 * assembly.h, mono-config.c: added code to deal with bundled configs
19957 for bundled assemblies.
19959 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
19961 * *.c, private.h: cleanup, removing old private.h header file.
19963 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
19965 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
19966 and throw_on_unmappable_char attributes.
19968 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
19970 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
19971 _ProcessName_internal.
19973 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
19975 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
19978 * icall.c threads.c threads-types.h: Remove slothash icalls as they
19979 are no longer used.
19981 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
19983 * object.c (compute_class_bitmap): Add support for generics. Fixes
19986 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
19988 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
19990 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19992 * filewatcher.c: commented out the code for windows watcher, as we don't
19993 use it (we use the managed implementation instead).
19995 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
19997 * object-internals.h (MonoThread): Remove 'unused1' field.
19999 * appdomain.c: Bump corlib version.
20001 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
20003 * reflection.c (mono_reflection_create_runtime_class): Remove the
20004 AssemblyBuilder.Save optimization since it causes too many problems.
20006 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
20008 * exception.c|h: Added mono_get_exception_reflection_type_load to
20009 create a ReflectionTypeLoadException object.
20010 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
20011 to return NULL is a InheritanceDemand fails during reflection. Updated
20012 ves_icall_System_Reflection_Assembly_GetTypes to throw a
20013 ReflectionTypeLoadException if an InheritanceDemand fails during
20014 reflection. Added icall mapping for GetLinkDemandSecurity.
20015 * security-manager.c|h: Added ves_icall_System_Security_
20016 SecurityManager_GetLinkDemandSecurity internal call to return the
20017 class and methods permissions set for a LinkDemand. Removed unused
20018 fields in MonoSecurityManager.
20020 2005-03-10 Martin Baulig <martin@ximian.com>
20022 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
20023 it's a generic instance.
20025 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
20027 * reflection.c (mono_get_object_from_blob): Applied patch from
20028 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
20030 * class.c (mono_class_is_assignable_from): Another try at fixing
20031 #73469 without breaking anything.
20033 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
20035 * class.c: (mono_class_is_assignable_from): Revert the last changes
20036 since they don't work with generics.
20038 * class.c (mono_class_is_assignable_from): Fix build bustage.
20040 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
20041 the managed IsAssignableFrom method. Fixes #73469.
20043 * reflection.c (mono_reflection_call_is_assignable_from): New helper
20046 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
20048 * object.c (mono_load_remote_field_new): Fix returning uninitialized
20049 memory when the remoting callback does not sets the out arguments.
20052 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
20055 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
20057 * object-internals.h (MonoStackFrame): Sync with managed object layout.
20059 * appdomain.c: Bump corlib version.
20061 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
20063 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
20066 * threads.c (mono_thread_attach): Detect threads which are not started
20067 by the GC pthread wrappers.
20069 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
20071 * icall.c: Added new icall for RNG.
20072 * rand.c|h: Added new icall to open the RNG. This allows to share a
20073 single handle on Linux to access /dev/urandom and fix #73183.
20075 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
20077 * object.c: setting the new vtable in a transparent proxy object must
20078 not change the GC descriptor.
20080 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20082 * object.c: fixed compilation without GCJ support.
20083 * reflection.c: for runtime-created types ensure klass->has_references
20084 is correct (bug #73215).
20086 2005-03-02 Martin Baulig <martin@ximian.com>
20088 * class.c (mono_class_is_assignable_from): Make this work if
20089 `oklass' is a generic instance; fixes #72831.
20091 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
20093 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
20096 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
20098 * marshal.c: Reorganize native->managed marshalling code to also use
20099 the emit_marshal_... functions.
20101 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
20103 * object.c: typed allocs have issues with bitmap sizes > 30,
20104 so check for max_set >= 30.
20106 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
20108 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
20109 managed code. Fixes #73012.
20111 * metadata.h (MonoMarshalSpec): Add elem_mult field.
20113 * metadata.c reflection.c: Load/Emit elem_mult as well.
20115 * metadata.h (MonoMarshalSpec): Add comment.
20117 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
20119 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
20120 num_elem to -1 if not given.
20122 * object-internals.h (MonoReflectionMarshal): Add has_size field.
20124 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
20127 2005-03-01 Marek Safar <marek.safar@seznam.cz>
20129 * null-gc.c (mono_gc_free_fixed): Was not compilable.
20131 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
20133 * reflection.c (encode_marshal_blob): Encode param_num field as well.
20135 * object-internals.h (MonoReflectionMarshal): Add param_num field.
20137 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
20139 * object.c: generalized the reference bitmap creation
20140 and added hooks for the new GC.
20141 * class-internals.c: removed the gc_bitmap field from MonoClass.
20143 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20145 * domain.c: help the compiler to produce better code
20146 in mono_jit_info_table_find ().
20148 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
20150 * object.c: make all allocations look typed.
20152 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20154 * socket-io.c: load Mono.Posix if it's not loaded already
20157 2005-02-24 Martin Baulig <martin@ximian.com>
20159 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
20160 * reflection.c (dup_type): Likewise.
20162 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
20164 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
20165 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
20167 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20169 * domain.c, threads.c, object-internals.h: make the critical thread
20170 local vars use the fast access mode (even when we're compiled in
20171 a lib). Provide accessors to be used by the jit during codegen.
20173 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20175 * appdomain.c: Changed hook functios behavior to include
20176 support for the reflection only assemblies. Some icalls were changed
20177 to support the mentioned assemblies too. Signatures of static methods
20178 try_assembly_resolve and real_load now have an additional parameter:
20181 * assembly.c: General changes to mono_assembly_ methods to support
20182 reflection only api. Functions mono_assembly_open, mono_assembly_load,
20183 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
20184 suffix, to support an additional gbool parameter to specify whether
20185 the assembli is reflection only or not. Created some new hook functions
20186 to add support for reflection only assemblies. Signatures of static
20187 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
20188 have now an additional parameter: refonly.
20190 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
20191 indicating whether the assembly is reflection only or not.
20193 * exception.c: Add mono_get_exception_invalid_operation.
20195 * icall.c: Throw an InvalidOperationException when trying to invoke
20196 a property/method/event, or trying to set/get the value of a field.
20197 Also add an icall to retrieve the ref_only flag to the
20198 MonoReflectionAssembly.
20200 2005-02-23 Chris Toshok <toshok@ximian.com>
20202 Part of fix for #72827.
20203 * mono-debug.c (mono_debug_add_method): add lexical block data to
20204 the info we write. Kind of a hack at the moment - we copy the
20205 lexical block info from the MonoDebugMethodInfo to the
20206 MonoDebugMethodJitInfo here, before writing it.
20207 (mono_debug_read_method): read the lexical block info.
20209 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
20211 * debug-mono-symfile.h: add lexical block support.
20213 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
20216 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
20218 * loader.c (mono_lookup_pinvoke_call): Fix warning.
20220 * object.c (mono_runtime_free_method): Call mono_free_method () and
20221 put the TODOs there.
20223 * loader.c (mono_free_method): Free up most memory allocated for
20226 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20228 * reflection.c: properly flag a Type argument to a
20229 named custom attr value (bug #72248).
20231 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20233 * reflection.c: reduce code duplication in named custom
20234 attribute encoding.
20236 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
20238 * reflection.c: properly encode custom attrs of type object
20241 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
20243 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
20245 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
20247 * socket-io.c: load System.dll if it's not loaded already
20248 (bug #72850 and #70477).
20250 2005-02-21 Martin Baulig <martin@ximian.com>
20252 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
20255 2005-02-21 Martin Baulig <martin@ximian.com>
20257 * reflection.c (mono_image_build_metadata): We also need to
20258 "fixup" the MethodImpl table after we computed the final method
20259 indices. Call fixup_methodimpl() to do that.
20260 (fixup_methodimpl): New private method.
20262 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
20264 * assembly.c: special case mscorlib.dll (bug#72536),
20265 patch from Carlos Alberto Cortez.
20267 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
20269 * threads-types.h threads.c: Fix build bustage.
20271 * threads.c: Use a union for long<->double conversions.
20273 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
20274 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
20276 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
20277 containing the checkpoint call with NOT_TAKEN.
20279 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
20280 checkpoint before pushing the arguments, so they won't have to be
20283 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20285 * domain.c, assembly.c, domain-internals.h: make some data
20286 const and relocation-free.
20288 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
20290 * object.c, appdomain.c, class-internals.h: introduce the
20291 MonoClassRuntimeInfo structure to hold the info needed to
20292 use a class at runtime. Made mono_class_vtable() lock-free
20293 for all the appdomains.
20295 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
20297 * metadata-internals.h, image.c: introduce a per-image mempool to
20298 be used for memory that has the same lifetime as the image.
20300 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
20302 * domain.c: In mono_init_internal(), instead of selecting the first
20303 runtime version supported by an executable, get a list of all
20304 supported versions and select the one for which an mscorlib exists
20305 (since even if the runtime supports a given version, it doesn't mean
20306 that the framework for that version is installed).
20307 Modified get_runtimes_from_exe to support this behavior.
20308 In supported_runtimes, added information about additional system
20311 * assembly.c: Added support for more than one system assembly version
20312 per runtime version. Updated the assembly list.
20313 In mono_assembly_remap_version, removed the initial version check,
20314 since we don't know to which version we need to compare until we
20315 get the version set on which the assembly is based.
20316 Moved the code for loading corlib into the new method
20317 mono_assembly_load_corlib(), so it can be used by the initialization
20320 * domain-internals.h: Updated data structures and added declaration
20321 for mono_assembly_load_corlib.
20323 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
20325 * reflection.c (resolve_object): Fix the creation of the signature in
20326 the SignatureHelper case.
20328 * assembly.c (mono_assembly_remap_version): Fix binary search.
20330 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
20332 * class.c: Added inheritance check when a method is overloaded (from a
20333 virtual method or when implementing an interface) and when a class is
20334 inherited. Added functions to set a failure for a class and to
20335 retreive the exception from a failure.
20336 * class-internals.h: Added fields to MonoClass to keep the exception
20337 information status for inheritance (or other exceptions) to be thrown
20338 later (i.e. not at load time).
20339 * object.c: Throw the inheritance SecurityException when a type is to
20340 be created with either class or method inheritance violations.
20341 * reflection.c|h: Fix when getting declsec from a class. Removed
20342 unrequired code for class. Improved sanity in parameter naming.
20343 * security-manager.c|h: Added functions to check for class and method
20346 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
20348 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
20349 and has_finalize in dynamic types as well.
20351 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
20353 * culture-info-table.h : fixed currency format for en-GB (and so on).
20355 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
20357 * gc.c: ensure the GC handles never have 0 as a value.
20359 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
20361 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
20362 a pointer to a struct to unmanaged code. Fixes #72625.
20364 2005-02-16 Martin Baulig <martin@ximian.com>
20366 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
20368 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
20370 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
20372 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
20374 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
20376 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
20377 UnmanagedFunctionPointerAttribute, use it for determining calling convention
20380 * reflection.c (mono_custom_attrs_get_attr): New helper function.
20382 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
20384 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
20386 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
20387 changes to make the current context a field in MonoThread.
20389 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
20391 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
20394 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
20395 extracted from mono_marshal_get_native_wrapper.
20397 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
20398 to create wrappers around native functions.
20400 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
20401 delegates for arbitrary function pointers. Fixes #71472.
20403 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20405 * threads.c: cleaned up the code a little.
20407 2005-02-15 Martin Baulig <martin@ximian.com>
20409 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
20412 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
20413 allocate larger chunks if needed.
20415 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
20417 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
20420 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
20422 * domain.c: keep the domains in an array and ensure the domain ids
20423 are kept small, so they can be used as indexes to domain-specific data
20424 with a small memory overhead.
20426 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
20428 * icall.c: Handle byref types in Type icalls. Fixes #72544.
20430 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
20432 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
20434 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
20436 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
20438 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
20441 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
20443 2005-02-12 Ben Maurer <bmaurer@ximian.com>
20445 * domain-internals.h: add the hashtable here.
20447 * class-internals.h: Remove `info' from MonoMethod
20449 * domain.c: Add a new hashtable, jit_trampoline_hash
20451 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20453 * object.c: don't set the value of static fields
20456 2005-02-11 Martin Baulig <martin@ximian.com>
20458 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
20459 (mono_debug_add_method): Silently ignore the method if it's too big.
20460 (mono_debug_add_type): Likewise.
20462 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
20464 * threads.c, appdomain.c: remove #ifdefs from the code.
20466 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
20468 * metadata-internals.h: Added flags to MonoAssembly to cache the most
20469 common security informations. This allows us to stay in unmanaged code
20470 when doing LinkDemand and it's special cases (except for the first
20471 time for initialization). The flags a very much used with --security.
20472 * reflection.c|h: Added code to get declarative security attributes
20473 for LinkDemand and InheritanceDemand. This required to refactor the
20474 existing code for Demand.
20475 * security-manager.c|h: Added new method fields for the special cases
20478 2005-02-10 Martin Baulig <martin@ximian.com>
20480 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
20481 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
20483 2005-02-10 Martin Baulig <martin@ximian.com>
20485 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
20486 debugging code; this is almost a complete rewrite.
20488 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
20490 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20492 * domain.c, object.h: expose mono_string_equal () and
20493 mono_string_hash ().
20494 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
20495 it's implemented in managed code.
20497 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20499 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
20500 lo leak objects between appdomains.
20502 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20504 * assembly.c: old compilers compilation fix from
20505 robertj@gmx.net (Robert Jordan).
20507 2005-02-09 Ben Maurer <bmaurer@ximian.com>
20509 * class-internals.h: Little reminder for the future.
20511 * debug-helpers.c: Fix up wrapper_type_names
20513 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20515 * image.c, metadata-internals.h: when loading an image from a file,
20516 mmap all of it and use the same codepaths as when using a
20517 in-memory image: the code is simpler and we use less memory
20518 (both writable and readonly).
20520 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
20522 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
20523 API to alloc runtime data structures that need to be tracked by the
20524 GC and contain pointers.
20525 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
20526 make the code more readable and eventually use a different GC.
20528 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
20530 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
20533 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
20535 * object.c: In release_type_locks(), don't release the cctor lock
20536 if it has already been released. This fixes a crash in the
20539 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20541 * gc.c, marshal.c, icall.c: register a delegate for finalization
20542 only when the native function pointer has been allocated for it.
20544 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20546 * object.c: cleaned up some code, allocate objects that are
20547 pointer free with the atomic malloc variant. Allocate memory
20548 for static data from the mempool if it's pointer-free.
20549 Allocate the bounds array at the end of the array data, when needed.
20550 * object-internals.h, object.h: move a private function in a private
20552 * class.c: handle missing case in tracking references in fields.
20554 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
20556 * class.c, class-internals.h: keep track if a type has
20557 reference fields in either the instance or static fields.
20559 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
20561 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
20562 and renamed to MonoRuntimeInfo. Added fields to store the expected
20563 framework assembly version. Changed mono_get_framework_version and
20564 mono_get_runtime_version for a single mono_get_runtime_info method.
20566 * assembly.c: Added method to remap system assembly versions to the
20567 current executing runtime version. Removed old mapping code.
20568 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
20570 * icall.c, reflection.c: Track api changes.
20572 2005-02-06 Miguel de Icaza <miguel@novell.com>
20574 * loader.c (method_from_memberref): Improve error reporting,
20575 produce the class name instead of the typeref/typedef index.
20577 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
20579 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
20581 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20583 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
20584 stdcall and charset name mangling. Reorganize the code and add
20585 some tracing stuff.
20587 2005-02-05 Ben Maurer <bmaurer@ximian.com>
20589 * monodiet.c: More iters!
20591 * marshal.c: Iter usage.
20593 * icall.c: Iter usage.
20595 * object.c: Use iters.
20597 * debug-helpers.c: More iters
20599 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20601 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
20604 2005-02-05 Ben Maurer <bmaurer@ximian.com>
20606 * mono-debug-debugger.c: use iters
20608 * class.c, class-internals.h: mono_class_setup_events is static
20611 * All callers: use iters
20613 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20615 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
20616 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
20618 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
20620 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
20622 * marshal.h: Add prototypes for ldfld/stfld_remote.
20624 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
20625 this is called during startup.
20627 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
20629 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
20630 MonoThreadsSync struct private in monitor.c. Changed the way
20631 MonoThreadsSync is allocated so it's faster and there is no
20632 need to keep track of it with a finalizer and it uses less memory.
20633 This also finally allows us to allocate mono objects as ptrfree when
20634 there are no reference fields.
20636 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
20638 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
20639 disappearing link to the GC interface and use them to simplify
20640 the gchandles code.
20642 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
20644 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
20645 stfld_remote which call mono_load/store_field_new. This allows methods
20646 calling ldfld/stfld wrappers to be AOTed.
20648 * console-io.c: Include sys/filio.h under solaris.
20650 * console-io.c: Include curses.h if needed correctly.
20652 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
20654 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
20655 method->klass as well.
20657 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
20659 * class.c (mono_class_init): Switch on lazy initialization of
20662 * class.c (mono_class_get_finalizer): Handle the case when the
20663 finalizer is inherited.
20665 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20667 * console-io.c: <curses.h> is needed by term.h on solaris.
20669 2005-02-03 Ben Maurer <bmaurer@ximian.com>
20671 * icall.c, class-internals.h, monodiet.c, class.c: Remove
20672 mono_class_setup_properties where possible. Remove this ftn from
20673 the header file, and make it static.
20675 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
20677 * loader.c: Add missing setup_... call.
20679 * class.c: Add missing setup_... calls.
20681 * class.c (mono_class_init): Switch on lazy initialization of
20682 the generic vtable.
20684 * class.c (mono_class_init): Fix generics broken by the recent changes.
20686 * monodiet.c (handle_type): Add missing setup_... calls.
20688 * class.c: Back out garbage in previous patch.
20690 * class.c: Add missing setup_... calls.
20692 * class.c (mono_class_get_method_from_name_flags): Avoid calling
20693 mono_class_setup_methods () if possible.
20695 * class-internals.h (MonoClass): Add 'has_cctor' flag.
20697 * class-internals.h (MonoCachedClassInfo): New structure.
20699 * class.c: Initialize properties and events fields of MonoClass lazily.
20701 * class.c: Add infrastructure for lazily initializing the methods and
20702 vtable fields of MonoClass. Not yet used.
20704 * class.c (mono_class_get_finalizer): New helper function.
20706 * class.c: Add infrastructure for loading some class related data from
20709 * object.c: Add infrastructure for initializing the vtable from data
20712 * gc.c (run_finalize): Use mono_class_get_finalizer ().
20714 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
20715 appropriate initialization function before accessing parts of the
20716 MonoClass structure.
20718 * marshal.c: Fix warnings.
20720 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
20722 * mono-debug-debugger.c (get_exception_message): Use
20723 mono_class_get_method_from_name_flags ().
20725 2005-02-02 Ben Maurer <bmaurer@ximian.com>
20727 * reflection.c, appdomain.c: Replace a few manual searches that
20728 Zoltan missed. (Paolo approved this part of my initial patch).
20730 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
20732 * profiler.c: disable recording statistical events at report time.
20734 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20736 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
20737 to byteswap arrays of enum values, too (bug #72080).
20739 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
20741 * appdomain.c (set_domain_search_path): Allow this to be called if
20742 domain->setup is not yet set.
20744 * loader.c (mono_method_get_index): New helper function.
20746 * loader.c reflection.c: Use mono_method_get_index ().
20748 * class.c (mono_class_get_method_from_name_flags): New helper method.
20750 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
20753 * class.c (mono_class_get_cctor): New helper method.
20755 * string-icalls.c object.c class.c marshal.c reflection.c: Use
20756 mono_class_get_method () to look up methods.
20758 2005-02-01 Miguel de Icaza <miguel@novell.com>
20760 * console-io.c: Fix the build, this should work on Windows.
20762 2005-01-31 Ben Maurer <bmaurer@ximian.com>
20764 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
20765 be set to null to keep things valid
20767 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20769 * icall.c: added Console 2.0 icalls.
20770 * Makefile.am: added console-io.[ch]
20771 * console-io.[ch]: internal calls for Console 2.0 API.
20773 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20775 * class.c: make sure we consider all the interfaces
20776 when calculating max_interface_id (bug found by
20777 Jeroen Frijters running ikvm).
20779 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
20781 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
20782 valuetype fields to null.
20784 * object.c (set_value): Ditto. Fixes #71669.
20786 2005-01-31 Martin Baulig <martin@ximian.com>
20788 * metadata.c (mono_metadata_has_generic_params): New public
20789 function; checks whether something is a generic method.
20791 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20793 * appdomain.c: fix infinite recursion when adding assemblies.
20795 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
20797 * object.c: Fix small typo to return all items for Environment.
20798 GetCommandLineArgs.
20800 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20802 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
20803 reflection.c: more domain and assembly-unload related fixes
20804 and memory leaks plugs.
20806 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
20808 * 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.
20810 2005-01-29 Ben Maurer <bmaurer@ximian.com>
20812 * loader.c (mono_method_signature): Make this method lazy
20813 (mono_get_method_from_token): Don't computate the signature here.
20815 Doing this saves quite a bit of memory. I got 90 kb on starting up
20816 monodoc. It should also save some disk reads on startup.
20818 * *: MonoMethod->signature might be NULL now. You *MUST* use
20819 mono_method_signature.
20821 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
20823 * object.c (mono_runtime_get_main_args): Return an array from the
20824 current domain here. Fixes #71938.
20826 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20828 * monitor.c: formatting changes to comply with the
20829 mono coding style and remove #ifdefs from the code.
20831 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20833 * metadata.c, private.h: remove some unneeded data
20834 and use a more compact representation for table schemas.
20836 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20838 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
20839 to get a better distribution in hash tables.
20840 * *.c: use mono_aligned_addr_hash() where appropriate.
20841 * assembly.c: make var static.
20843 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
20845 * domain-internals.h: Put MonoJitInfo on a diet.
20847 * domain.c: Fix a warning.
20849 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20851 * gc.c: rework the gc handles code to reuse handles
20854 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20856 * domain.c: fixed long standing bug in mono_string_equal() which
20857 was brought to light with the ldstr changes.
20859 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
20861 * reflection.c: Remove warning by adding missing include for marshal.h
20863 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20865 * domain.c, object.c: change the ldstr_table to hold
20866 MonoString* as keys: makes the runtime isinterned lookup
20867 faster and simplifies memory management.
20869 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
20871 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
20872 possible to add imperative security checks before calling the icall.
20873 * reflection.c: Return security attributes on the original MonoMethod
20874 (and not the wrapped one). This fix permissions on icalls.
20876 2005-01-25 Dick Porter <dick@ximian.com>
20878 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
20879 the check for mktime() support actually test the mktime() return
20880 value. "Fixes" bug 71682, though the output is still different to
20883 2005-01-25 Martin Baulig <martin@ximian.com>
20885 * class.c (mono_class_is_assignable_from): Make this work for
20888 2005-01-24 Ben Maurer <bmaurer@ximian.com>
20890 * marshal.c (mono_string_utf8_to_builder)
20891 (mono_string_builder_to_utf16): We might not have ownership of the
20892 string. In thise case, we need to create a new buffer.
20894 * object-internals.h (mono_stringbuilder_capacity): sb->str might
20895 be null, in which case, use the default capacity.
20897 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20899 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
20900 GC events to the profiler.
20902 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20904 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
20905 if you don't want the GC to run.
20907 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
20909 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
20910 start providing a GC API and keeping different implementations in
20912 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
20914 2005-01-22 Ben Maurer <bmaurer@ximian.com>
20916 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
20917 mmap rather than allocating a huge buffer.
20918 (mono_debug_close_mono_symbol_file): Free the buffer allocated
20921 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
20923 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
20924 and CheckExecutionRights.
20925 * reflection.c|h: Keep the index of the declarative security to be
20926 used, instead of the pointer, when AOT compiler is used. Also add
20927 class initialization when requesting demands.
20928 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
20929 CheckExecutionRights. Both properties are now FALSE by default, and
20930 unmodifiable, unless the --security option is used.
20932 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20934 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
20935 reflection.c: properly refcount images and assemblies, many leaks fixed.
20937 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20939 * threadpool.c: increase the timeout for threads in the thread pool to
20940 10s. Fixes bug #67159.
20942 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
20944 * class-internals.h: Sun's compiler insists on explicit
20945 signed on bit fields to handle then correctly.
20947 2005-01-19 Miguel de Icaza <miguel@ximian.com>
20949 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
20950 Make the size of the array fit only the number of invalid path
20951 chars that we have.
20953 * class.c (_mono_class_get): Improve the error reporting when a
20954 class referenced is not found, to assist debugging.
20956 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
20958 * threads.c: fix off-by-one error.
20959 * domain.c: free data allocated in the domain.
20961 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20963 * reflection.c (mono_method_body_get_object): Fill out exception info
20966 * object-internals.h: Add MonoReflectionExceptionHandlingClause
20969 2005-01-19 Martin Baulig <martin@ximian.com>
20971 * loader.c (mono_get_method_constrained): Make this work again.
20973 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20975 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
20976 guint16 to match the managed side.
20978 * reflection.c (mono_reflection_body_get_object): Fill out local
20981 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
20984 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
20985 'local_var_sig_token'.
20987 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
20989 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
20992 * reflection.c (mono_method_body_get_object): Handle abstract and
20995 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
20997 * marshal.c, loader.c, class-internals.h, reflection.c:
20998 store the emthod data for a wrapper in an array instead of a list.
21000 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
21002 * marshal.c: change the code to allocate memory more
21003 conservatively for method wrappers.
21005 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
21007 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
21008 fields from MonoClass to the marshal info structure where they belong.
21010 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
21012 * class.c, object.c, class-internals.h, marshal.c: rearrange
21013 some fields and tweak some types to lower memory usage.
21015 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
21017 * threads.c (signal_thread_state_change): Handle the case when the
21018 target thread is the current thread.
21020 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
21022 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
21023 emit_ptr_to_object_conv.
21025 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
21026 marshalling. Fixes #71352.
21028 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
21030 * metadata.h, blob.h: move table enum to blob.h so it can be included
21032 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
21033 cut the size of MonoImage/MonoDynamicImage.
21035 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
21037 * profiler.c (mono_profiler_install_simple): Fix default arguments.
21039 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
21041 * reflection.c, reflection.h, icall.c: add a function to check
21042 if an attribute type is defined for a metadata object.
21044 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
21046 * object-internals.h: Added some needed fields from StringBuilder class.
21047 * marshal.c: Set the maxCapacity when creating a StringBuilder.
21049 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
21051 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
21052 threads before shutting down the runtime.
21054 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
21056 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
21058 * object-internal.h, threads.c: implement stacksize and
21059 parameterized thread start functionality (requires
21060 matching corlib). Marked broken code for later removal.
21062 2005-01-12 Martin Baulig <martin@ximian.com>
21064 * class-internals.h (MonoGenericClass): Moved the `initialized'
21065 flag to MonoDynamicGenericClass, removed `init_pending'.
21066 (MonoGenericInst): Added `is_reference' flag.
21068 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
21070 * reflection.c (mono_image_create_pefile): Only set the pe_offset
21071 inside the MSDOS header. Fixes #71201.
21073 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
21075 (mono_domain_finalize): Ditto.
21077 2005-01-12 Martin Baulig <martin@ximian.com>
21079 * class.c (mono_get_shared_generic_class): Use the cache for
21080 non-dynamic generic classes.
21082 * class-internals.h (mono_class_create_generic_2): Removed
21083 function prototype, this function is now static inside class.c.
21085 * class.c (mono_class_create_generic_2): Made this static, only
21086 call it from mono_class_init() and mono_class_setup_parent().
21087 (collect_implemented_interfaces_aux): Call mono_class_init() on
21088 the interfaces we collect.
21089 (mono_class_setup_vtable): Call mono_class_init (class->parent).
21091 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
21093 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
21094 it a real thread handle.
21096 * domain-internals.h: Move exvar_offset from MonoJitInfo to
21097 MonoJitExceptionInfo, since each catch clause needs its own variable.
21099 2005-01-11 Dick Porter <dick@ximian.com>
21101 * image.c (mono_pe_file_open): New variant on mono_image_open()
21102 that does not set up the CLI metadata; used for FileVersionInfo so
21103 it can get the data for windows binaries too.
21105 * process.c (process_read_string_block): Don't read off the end of
21106 the StringTable block.
21108 These both fix bug 70766.
21110 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
21112 * gc.c: set some fields to NULL at GC cleanup time.
21113 * threads.c: if we quit the main thread, call exit ().
21115 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
21117 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
21119 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
21121 * threads.h, threads.c, object.c: added accessor and settor for
21122 main_thread. Handle it specially when exiting from it: wait
21123 for other foreground threads to exit.
21125 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
21127 * process.c, verify.c: remove some bloat.
21129 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
21131 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
21132 the calling convention to cdecl under win32.
21134 2005-01-08 Ben Maurer <bmaurer@ximian.com>
21136 * object.c (mono_object_get_size): New function to get the size of
21137 an object instance.
21139 * profiler.c (simple_allocation): Use above.
21141 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
21143 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
21144 ves_icall_System_AppDomain_getRootDomain (as it's not required to
21145 get an appdomain by it's id and we can't assume the root's id is 0).
21146 * domain-internals.h: Change the function prototype to match.
21147 * icall.c: Change the icall table for AppDomain.
21149 2005-01-08 Miguel de Icaza <miguel@ximian.com>
21151 * locales.c (string_invariant_compare_char): Only compute
21152 GUnicodeTypes in the case where we need them. Test for ordinality
21153 first and return if so.
21158 * FIXME: here we must use the information from c1type and c2type
21159 * to find out the proper collation, even on the InvariantCulture, the
21160 * sorting is not done by computing the unicode values, but their
21161 * actual sort order.
21164 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
21166 * loader.c: for P/Invoke methods, allow the "Internal" shared
21167 library name to refer to the calling process symbol namespace.
21169 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
21171 * Makefile.am: Add the security manager to the build.
21172 * security-manager.c|h: New. Initialization of the security manager.
21174 2005-01-07 Dick Porter <dick@ximian.com>
21177 * monitor.c: Update thread state during Monitor and WaitHandle
21178 waits. Fixes bug 71031.
21180 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
21182 * reflection.c (property_encode_signature): Correctly handle when the
21183 property has no methods.
21185 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
21187 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
21189 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
21190 fields from mb, not rmb. Fixes #71017.
21192 * marshal.c (emit_ptr_to_str_conv): Add support for
21193 ByValTStr -> string conversion. Fixes #71015.
21195 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
21197 * mempool.c (mono_mempool_contains_addr): New helper function.
21199 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
21201 * metadata.c (mono_metadata_compute_size): Fix size calculation of
21202 HasSematics encoded fields.
21204 * metadata.c (mono_type_to_unmanaged): Improve error message for
21205 invalid string marshalling.
21207 * metadata.c: Fix warnings.
21209 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
21211 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
21214 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
21216 * domain.c object.c domain-internals.h: Revert part of r38077 since the
21217 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
21220 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
21222 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
21223 so methods containing these can be AOTed.
21225 2005-01-03 Martin Baulig <martin@ximian.com>
21227 * loader.c (find_method): Removed the hack for generic instances.
21228 (method_from_memberref): If our parent is a generic instance, pass
21229 its generic type definition to find_method() and then inflate the
21231 (mono_get_method_constrained): Pass the generic type definition to
21232 find_method() and inflate the method later.
21234 * class-internals.h (MonoStats): Added `generic_class_count'.
21236 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
21237 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
21239 * reflection.c (mono_custom_attrs_from_params): Don't ignore
21240 generic type definitions.
21242 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
21244 * loader.c icall.c: Fix warnings.
21246 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
21248 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
21249 blittable types. Fixes #70864.
21251 2004-12-29 Martin Baulig <martin@ximian.com>
21254 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
21256 * reflection.c (mono_method_get_object): Create a
21257 "System.Reflection.MonoGenericMethod" for inflated methods; don't
21258 call mono_get_inflated_method().
21260 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
21262 2004-12-27 Martin Baulig <martin@ximian.com>
21264 * class-internals.h (MonoMethod): Added `is_inflated' flag.
21265 (MonoMethodInflated): Added `inflated' field.
21267 * class.c (mono_class_inflate_generic_method): Don't really
21268 inflate the method here; just set the `is_inflated' flag in the
21270 (mono_class_get_inflated_method): Actually inflate the method here
21271 if it's not already inflated; we use the MonoMethodInflated's new
21272 `inflated' field as a cache.
21274 2004-12-26 Martin Baulig <martin@ximian.com>
21277 (inflate_generic_class): Moved some code out of inflate_generic_type().
21278 (mono_class_inflate_generic_method): If we're already inflated,
21279 inflate the context and use the declaring method; ie. make sure
21280 the declaring method of an inflated method is always the generic
21282 (mono_class_create_from_typedef): Create
21283 `class->generic_container->context->gclass'.
21285 2004-12-24 Ben Maurer <bmaurer@ximian.com>
21287 * metadata-internals.h, marshal.c, reflection.c: More
21288 MonoGHashTable->GHashTable.
21290 * domain-internals.h, class.c: Change MonoGHashTable's into
21291 GHashTables for some cases where no gc stuff is used
21293 All users: update apis
21295 2004-12-23 Ben Maurer <bmaurer@ximian.com>
21297 * metadata.c (builtin_types): Make this `const'. Makes this get
21298 put into the shareable section.
21299 (mono_metadata_init): Casts to make gcc happy.
21301 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
21303 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
21305 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
21307 * icall.c: Added an internal call to retrieve the position and length
21308 of assembly-level declarative security attributes (RequestMinimum,
21309 RequestOptional and RequestRefuse). This is used by the Assembly class
21310 to re-create the corresponding permission sets.
21312 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
21314 * marshal.c: fix the stelemref wrapper to be type correct
21317 2004-12-20 Ben Maurer <bmaurer@ximian.com>
21319 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
21320 to do key & 0x7fffffff. Hashtable already does this. It just
21321 results in longer code.
21323 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
21325 * appdomain.c: Bump corlib version.
21326 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
21327 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
21328 * reflection.c|h: Add functions to get declarative security infos
21329 (blob position and length) for assemblies, classes and methods.
21331 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
21333 * reflection.c: sort the constant table (bug #70693).
21335 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
21337 * object-internals.h, threads.c, domain.c: add accessors for
21338 the MonoThread and MonoDomain tls keys.
21340 2004-12-18 Martin Baulig <martin@ximian.com>
21342 * class.c (inflate_generic_type): If we're inflating a generic
21343 instance, set `ngclass->context->container = context->container';
21344 ie. the container we inflated into.
21346 * metadata.c (mono_metadata_parse_generic_param): Reflect above
21347 inflate_generic_type() changes.
21349 2004-12-17 Martin Baulig <martin@ximian.com>
21351 * class-internals.h
21352 (MonoGenericClass): Replaced `MonoType *generic_type' with
21353 `MonoClass *generic_class'. Removed `dynamic_info'; if
21354 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
21355 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
21357 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
21359 * exception.c (mono_exception_from_token): New helper function.
21361 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
21363 * assembly.c (mono_assembly_load_with_partial_name): Call
21364 mono_assembly_loaded before invoking the preload hooks. Fixes
21367 * object-internals.h (MonoThread): Change culture_info and
21368 ui_culture_info into an array.
21370 * threads.c: Cache culture info objects from more than one appdomain.
21372 * threads.c threads-types.h icall.c: Add icalls for manipulating the
21373 current UI culture.
21375 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
21377 * threads.h threads.c appdomain.c: Clear the culture_info field of
21378 all threads during unloading if they point to an object in the dying
21381 2004-12-13 Ben Maurer <bmaurer@ximian.com>
21383 * culture-info.h (TextInfoEntry): New struct
21384 * object-internals.h: sync with managed
21385 * locales.c: fill the `text_info_data' field
21386 * culture-info-tables.h: update
21388 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
21390 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
21393 2004-12-12 Ben Maurer <bmaurer@ximian.com>
21395 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
21396 (ves_icall_ModuleBuilder_getMethodToken): Ditto
21398 2004-12-12 Martin Baulig <martin@ximian.com>
21400 * mono-debug-debugger.c (write_type): If we're an enum and the
21401 builtin types have already been initialized, call mono_class_init().
21403 2004-12-11 Martin Baulig <martin@ximian.com>
21405 * metadata.c (mono_metadata_load_generic_params): Added
21406 `MonoGenericContainer *parent_container' argument; automatically
21407 compute `container->is_method'; pass the correct owner to
21410 * reflection.c (compare_genericparam): Sort the GenericParam table
21411 according to increasing owners.
21413 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
21415 * profiler.c: allow disabling the default profiler.
21417 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
21419 * decimal.c, icall.c: allow disabling System.Decimal support.
21421 2004-12-09 Marek Safar <marek.safar@seznam.cz>
21423 * reflection.c: Add support for null attribute arguments.
21425 2004-12-09 Martin Baulig <martin@ximian.com>
21427 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
21428 names to get rid of compiler warnings.
21430 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
21432 * marshal.c (mono_marshal_get_struct_to_ptr): Call
21433 mono_marshal_load_type_info (). Fixes #69625.
21434 (mono_marshal_get_ptr_to_struct): Likewise.
21436 2004-12-08 Martin Baulig <martin@ximian.com>
21438 * mono-debug.h: Bumped version number to 47.
21440 * mono-debug-debugger.c
21441 (mono_debugger_event_handler, mono_debugger_event): Take two
21442 guint64 arguments insteed of a gpointer and a guint32.
21444 2004-12-08 Martin Baulig <martin@ximian.com>
21446 * debug-mono-symfile.h
21447 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
21448 `address' to `native_offset'.
21450 2004-12-08 Martin Baulig <martin@ximian.com>
21452 * class.c (mono_class_create_from_typespec): Only inflate if we
21453 either have `context->gclass' or `context->gmethod'.
21455 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
21457 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
21459 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
21461 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
21463 * reflection.c (mono_assembly_get_object): Remove the workaround put
21464 in for the release.
21466 * appdomain.c: Use the corlib_internal field from MonoAssembly.
21468 * appdomain.c: Bump corlib version.
21470 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
21471 be visible in other appdomains.
21473 2004-12-07 Ben Maurer <bmaurer@ximian.com>
21475 * threads.c: Interlocked inc and dec for longs were messed up,
21476 use a KISS based impl for this. Fixes 70234
21478 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
21480 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
21482 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
21484 * icall.c: fix to follow policy not to allow struct
21485 arguments in icalls.
21487 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21489 * process.c: make the patch that handles spaces in file paths work
21490 on mono/windows too.
21492 2004-12-06 Martin Baulig <martin@ximian.com>
21494 * class.c (mono_class_create_generic): Call
21495 mono_class_setup_supertypes() if we're dynamic.
21496 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
21498 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
21500 * object-internals.h: Add new fields to MonoThread.
21502 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21504 * icall.c threads-types.h threads.c: Add new icalls.
21506 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
21508 * object-internals.h (MonoReflectionAssembly): Sync object layout with
21511 * appdomain.c: Bump corlib version.
21513 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
21514 internal assemblies. Fixes #69181.
21516 2004-12-05 Martin Baulig <martin@ximian.com>
21518 * class.c (mono_class_inflate_generic_signature): Make this a
21519 no-op if `context' is NULL or we don't have any type parameters;
21520 also copy `sentinelpos'.
21522 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
21524 * image.c: Add unbox_wrapper_cache.
21526 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
21528 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
21529 function generator.
21531 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
21534 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
21536 2004-12-04 Martin Baulig <martin@ximian.com>
21538 * loader.c (mono_method_get_signature_full): New public function;
21539 like mono_method_get_signature(), but with an additional
21540 `MonoGenericContext *' argument.
21542 * class.c (mono_class_inflate_generic_signature): Formerly known
21543 as inflate_generic_signature(); make this public.
21545 2004-12-04 Martin Baulig <martin@ximian.com>
21548 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
21549 instead of a `MonoGenericContainer *'.
21550 (mono_metadata_parse_array_full): Likewise.
21551 (mono_metadata_parse_signature_full): Likewise.
21552 (mono_metadata_parse_method_signature_full): Likewise.
21553 (mono_metadata_parse_generic_inst): Likewise.
21554 (mono_metadata_parse_generic_param): Likewise.
21555 (mono_metadata_parse_mh_full): Likewise.
21556 (mono_type_create_from_typespec_full): Likewise.
21558 2004-12-03 Martin Baulig <martin@ximian.com>
21560 * class-internals.h (MonoGenericContainer): Replaced the
21561 `MonoGenericContext * pointer with a `MonoGenericContext'
21562 structure and made it the first element.
21564 2004-12-03 Martin Baulig <martin@ximian.com>
21567 (inflate_generic_type): Set the `context->container' when creating
21568 a new MonoGenericContext.
21569 (mono_class_inflate_generic_method): Likewise.
21570 (mono_class_create_from_typespec): Just use `context->container'
21571 to get the container.
21573 * loader.c (method_from_methodspec): Set `context->parent' from
21574 `context->container' - and if that's a method container, use its
21575 parent. Also set the `context->container' when creating a new
21576 MonoGenericContext.
21577 (mono_get_method_from_token): Use just `context->container' to get
21580 * metadata.c (do_mono_metadata_parse_generic_class): Also set
21581 `gclass->context->container'.
21583 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
21584 the `context->container' when creating a new MonoGenericContext.
21586 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
21588 * reflection.c (compare_genericparam): Sort params with identical
21589 owner by their number. Fixes gen-111 on sparc.
21591 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
21593 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
21594 around the domain changes.
21596 * appdomain.c (mono_domain_unload): Handle the case when the thread
21597 calling Unload is itself being aborted during unloading. Fixes #70022.
21599 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
21601 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
21602 checkpoint_func as an icall so it gets a wrapper.
21603 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
21604 in the cross-appdomain wrappers too.
21606 * threads.c (mono_thread_has_appdomain_ref): Make this public.
21608 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
21610 * reflection.c: Fix some memory leaks.
21612 2004-12-02 Martin Baulig <martin@ximian.com>
21614 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
21616 * metadata.c (generic_class_cache): New static hashtable.
21617 (mono_metadata_lookup_generic_class): New public method.
21619 2004-12-02 Martin Baulig <martin@ximian.com>
21621 * class.c (mono_class_create_from_typedef): Call
21622 mono_class_setup_parent() and mono_class_create_mono_type() before
21623 parsing the interfaces.
21625 2004-12-02 Martin Baulig <martin@ximian.com>
21627 * metadata.c (generic_inst_cache): New static hashtable.
21628 (mono_metadata_lookup_generic_inst): New public function.
21629 (mono_metadata_inflate_generic_inst): New public function.
21630 (mono_metadata_parse_generic_inst): New public function.
21631 (do_mono_metadata_parse_generic_class): Use the new
21632 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
21633 since this'll also use the cache.
21635 * reflection.c (mono_reflection_bind_generic_method_parameters):
21636 Use mono_metadata_lookup_generic_inst() to use the new cache.
21638 * class.c (inflate_mono_type): Use
21639 mono_metadata_inflate_generic_inst() to inflate a generic
21640 instance; this'll also use the new cache.
21642 * loader.c (method_from_methodspec): Use
21643 mono_metadata_parse_generic_inst() and
21644 mono_metadata_inflate_generic_inst() rather than parsing it
21645 manually, so we can use the new cache.
21647 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
21649 * threads.c (wait_for_tids): Do not incorrectly free threads when
21650 the wait times out.
21652 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21654 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
21655 iter->args based on whether parameters are passed in registers (i.e.
21656 MONO_ARCH_REGPARMS is defined)
21658 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
21660 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
21661 the exception message. Fixes #70070.
21662 (method_from_methodspec): Fix warnings.
21664 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21666 * process.c: (complete_path) return the path quoted
21668 2004-12-01 Martin Baulig <martin@ximian.com>
21670 * class-internals.h (MonoGenericInst): New structure.
21671 (MonoGenericClass): Replaced `type_argc', `type_argv' and
21672 `is_open' with `MonoGenericInst *inst'.
21673 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
21674 `is_open' with `MonoGenericInst *inst'.
21676 2004-11-30 Martin Baulig <martin@ximian.com>
21678 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
21680 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
21681 to `generic_class_cache'.
21684 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
21685 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
21686 (mono_generic_inst_is_valuetype): Renamed to
21687 mono_generic_class_is_valuetype().
21689 * class-internals.h
21690 (MonoGenericInst): Renamed to MonoGenericClass.
21691 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
21692 (MonoClass): Renamed `generic_inst' to `generic_class'.
21693 (MonoGenericContext): Renamed `ginst' to `gclass'.
21695 * object-internals.h
21696 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
21698 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
21699 mono_reflection_generic_class_initialize().
21701 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
21702 now known as "System.Reflection.MonoGenericClass".
21703 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
21705 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
21707 * class-internals.h: Added a flag field to MonoClass to cache the
21708 declarative security attributes actions associated with the class.
21709 * domain-internals.h: Added booleans to MonoJitInfo to cache the
21710 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
21711 applicable to the JITted method.
21712 * reflection.c|h: Added functions to extract (as flags) which security
21713 actions are available (declaratively) for a method, class or assembly.
21714 * metadata.c|h: Added functions to search the declarative security
21715 table in the metadata.
21717 2004-11-29 Ben Maurer <bmaurer@ximian.com>
21719 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
21720 EXPORTEDTYPES are already in the class name cache, so there is no
21721 need to add extra code here to look at them. Just removes a bit of
21724 (ves_icall_System_Environment_get_TickCount): No need for #if
21725 WINDOWS. We already have the code in io-layer.
21727 2004-11-28 Martin Baulig <martin@ximian.com>
21730 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
21733 2004-11-27 Miguel de Icaza <miguel@ximian.com>
21735 * assembly.c (do_mono_assembly_open): Instead of having a
21736 conditional WITH_BUNDLE, incorporate support for bundles here, by
21737 having a global `bundles' variable holding a pointer to the actual
21740 (mono_register_bundled_assemblies): New API call used by the
21743 See mkbundle.1 for details.
21745 2004-11-27 Martin Baulig <martin@ximian.com>
21747 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
21748 the vtable for generic methods.
21750 2004-11-26 Martin Baulig <martin@ximian.com>
21753 (mono_metadata_generic_method_hash): New public function.
21754 (mono_metadata_generic_method_equal): Likewise.
21756 * class-internals.h
21757 (MonoGenericContainer): Added `GHashTable *method_hash'.
21759 * reflection.c (ReflectionMethodBuilder): Added
21760 `MonoGenericContainer *generic_container'.
21761 (reflection_methodbuilder_to_mono_method): Don't create a new
21762 MonoGenericContainer each time we're called.
21763 (mono_reflection_bind_generic_method_parameters): Use
21764 `container->method_hash' to cache the results so we don't create a
21765 different method if we're called several times with the same
21768 * loader.c (method_from_methodspec): Use the new
21769 `container->method_hash' here, too.
21771 2004-11-26 Martin Baulig <martin@ximian.com>
21773 * class.c (inflate_generic_signature): Correctly compute
21774 `res->has_type_parameters'.
21775 (mono_class_vtable): Use the `has_type_parameters' flag to
21776 determine whether we're a generic method.
21778 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
21780 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
21782 * object.c (mono_runtime_run_main): Fix a small memory leak.
21784 2004-11-25 Martin Baulig <martin@ximian.com>
21786 * class.c (set_generic_param_owner): Fixed the loop.
21788 2004-11-25 Martin Baulig <martin@ximian.com>
21790 * object.c (mono_class_vtable): Don't create any JIT wrappers for
21793 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
21795 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
21796 names. Fixes #69787.
21798 2004-11-24 Martin Baulig <martin@ximian.com>
21800 * class.c (mono_class_create_generic_2): If we don't have a
21801 `ginst->parent', inflate `gklass->parent' to get our parent.
21803 2004-11-24 Martin Baulig <martin@ximian.com>
21805 * reflection.c (compare_genericparam): Correctly sort the
21806 GenericParam table; fixes #69779.
21808 2004-11-23 Ben Maurer <bmaurer@ximian.com>
21810 * reflection.c: When writing a PE file, don't create a huge
21811 buffer in memory. Just write the arrays we have to the file.
21812 This reduces memory usage.
21814 * metadata-internals.h: MonoDynamicStream pefile is no longer used
21817 2004-11-17 Martin Baulig <martin@ximian.com>
21819 * class.c (mono_class_init): Don't setup `class->parent' for
21820 dynamic instances; moved this to mono_class_generic_2().
21821 (mono_class_create_generic): Also set `klass->inited' for dynamic
21823 (mono_class_create_generic_2): Don't do anything for dynamic
21824 generic instances. Set `klass->parent' here and also call
21825 mono_class_setup_parent() here.
21827 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
21828 `MonoType *parent' argument; set `ginst->parent' before calling
21829 mono_class_create_generic_2(), so we set the correct parent.
21831 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
21833 * reflection.c: allow getting attributes from ModuleBuilder
21836 2004-11-17 Martin Baulig <martin@ximian.com>
21838 * class.c (mono_class_create_from_typedef): If a type parameter is
21839 inherited from an outer class, set its owner to that class.
21841 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
21843 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
21844 for (int*) written size. This fixes bug #69592.
21846 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
21848 * icall.c: Added IsAuthenticodePresnet internal call.
21849 * image.c|h: New function that check a MonoImage for an Authenticode
21850 signature in the certificate PE data directory.
21851 * security.c|h: New internal call to ask the runtime if an
21852 Authenticode signature seems referenced in the PE header.
21854 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
21856 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
21858 * reflection.c (mono_image_create_pefile): Free the assembly streams
21859 after writing out the assembly file.
21861 * object.c (mono_runtime_run_main): Fix small memory leak.
21863 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
21864 property access modifiers. Fixes #69389.
21866 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21868 * domain.c, object.c, object-internals.h, domain-internals.h,
21869 object.h, marshal.c: keep dynamic code info per domain.
21871 2004-11-15 Martin Baulig <martin@ximian.com>
21873 * class.c (mono_type_get_name_recurse): Put type arguments in
21874 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
21877 2004-11-15 Martin Baulig <martin@ximian.com>
21879 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
21880 (mono_class_setup_vtable): When computing `the_cname' for a
21881 generic instance, don't include the namespace since we'd otherwise
21884 2004-11-15 Martin Baulig <martin@ximian.com>
21886 * class.c (mono_class_create_generic): Changed return type to void.
21887 (mono_class_create_generic_2): New public function; setup
21888 `class->method', `class->field' and `class->interfaces' here
21889 instead of in mono_class_init().
21891 * class.h (mono_class_create_generic): Moved to class-internals.h.
21893 2004-11-14 Ben Maurer <bmaurer@ximian.com>
21895 * reflection.c (mono_image_create_pefile): take a file HANDLE.
21896 rather than writing to memory, write to this file. Right now,
21897 we are just writting into a buffer, and copying that. However
21898 we can avoid the buffer later.
21900 (mono_dynamic_stream_reset): new function
21902 * icall.c, object-internals.h: update for the above.
21904 2004-11-13 Ben Maurer <bmaurer@ximian.com>
21906 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
21907 have been using gc'd memory. First it is slower, unlikely
21908 the comment in the source code said, secondly, it increases
21909 our footprint to do it in the gc.
21911 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
21912 the method so that it does not have to copy to managed code.
21914 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
21916 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
21918 2004-11-12 Martin Baulig <martin@localhost>
21920 * reflection.c (mono_image_create_token): Allow generic method
21921 definitions here, since they may appear in an `.override'; see
21922 gen-98/gen-99 for an example.
21924 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
21926 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
21929 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
21932 2004-11-11 Martin Baulig <martin@ximian.com>
21934 * class.c (mono_class_setup_vtable): In an explicit interface
21935 implementation, the method name now includes the arity.
21937 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
21939 * object.c (mono_array_full_copy): Fix warning.
21941 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
21943 * appdomain.c: Removed look_for_method_by_name(). Use the new method
21944 mono_class_get_method_from_name() instead.
21946 * class-internals.h: Added two new types of wrappers.
21947 Added MonoRemotingTarget enum. Added new trampoline function type, which
21948 takes an additional MonoRemotingTarget value as parameter, so it is
21949 possible to request a trampoline for a specific target.
21951 * class.c: Added new mono_class_get_method_from_name() method.
21953 * class.h: In MonoRemoteClass, we can have now to vtables, one for
21954 general remoting sinks and one specific for cross domain calls.
21956 * debug-helpers.c: Added new wrapper names.
21958 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
21961 * image.c: Porperly delete value objects form the remoting invoke hashtable.
21963 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
21964 with several other methods (mono_marshal_get_xappdomain_dispatch,
21965 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
21966 and others) can generate a fast remoting wrapper for cross domain calls.
21967 More information can be found in docs/remoting.
21968 Other changes: Removed mono_find_method_by_name, and used
21969 mono_class_get_method_from_name instead.
21970 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
21971 is stored in the remoting invoke hashtable.
21973 * marshal.h: published the new method for getting the xdomain wrapper,
21974 and also added a method for getting the adequate wrapper for a given
21977 * object-internals.h, object.c: Added a couple of methods for capying and
21979 Modified mono_install_remoting_trampoline, which takes the new remoting
21980 trampoline that has a remoting target as parameter.
21981 mono_class_proxy_vtable now also takes a remoting target as parameter, and
21982 will return the most suitable vtable for the target.
21983 Added mono_remote_class_vtable, which returns the vtable of a remote class
21984 (which can be the normal remoting vtable or the xdomain vtable).
21986 * threads.c: the xdomain invoke and dispatch wrappers must also be
21987 protected against interruptions.
21989 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21991 * icall.c: use memmove in BlockCopyInternal when the source and
21992 destination arrays are the same.
21994 2004-11-09 Martin Baulig <martin@ximian.com>
21996 * class-internals.h (MonoGenericContainer): Removed `method' and
21997 `signature', replaced them with `is_method' and `is_signature'
21998 flags. Added `context'.
22000 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
22001 instead of a `MonoGenericContainer *'.
22003 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
22004 for dynamic type parameters.
22005 (mono_metadata_load_generic_params): Setup `container->context'.
22007 * reflection.c (mono_reflection_setup_generic_class): Setup
22008 `tb->generic_container->context'.
22009 (do_mono_reflection_bind_generic_parameters): Use
22010 mono_class_inflate_generic_type() to correctly inflate types,
22011 rather than using our own hack just for MONO_TYPE_VAR.
22013 2004-11-09 Martin Baulig <martin@ximian.com>
22015 * class.c (mono_class_inflate_generic_method): Small fix; don't
22019 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
22020 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
22021 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
22022 (ves_icall_Type_BindGenericParameters): Likewise.
22023 (ves_icall_Type_get_IsGenericInstance): Likewise.
22024 (ves_icall_Type_GetGenericParameterPosition): Likewise.
22025 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
22026 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
22027 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
22029 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
22031 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
22032 assembly versions and public key tokens. Fixes #69113.
22034 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
22036 * metadata.c: fix bug introduced with the type cache changes
22039 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
22041 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
22042 the MonoClass pointer instead of the token in exception clauses.
22043 * reflection.c: updates for the above and make the code not depend
22044 on the structure of MonoExceptionClause.
22046 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
22048 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22049 Add support for dynamic assemblies. Fixes #69114.
22051 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
22053 2004-11-07 Ben Maurer <bmaurer@ximian.com>
22055 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
22056 since most only those methods use it. the code member of
22057 MonoMethodPInvoke was dead, so that can be removed too. Also,
22058 remove inline_count (again, not used), and move slot so that it
22059 can share bits with some other flags. This saves 8 bytes in the
22060 structure and gives us about 50 kb back for mcs helloworld.cs
22062 * *.[ch]: Do naming changes for the above.
22064 * loader.c (mono_method_get_header): Lazily init the header
22066 (mono_get_method_from_token): don't init the header here
22067 (mono_free_method): the header may never be allocated
22069 Overall, this saves 150 kb of unmanaged allocations
22070 for mcs helloworld.cs. That accounts for 10% of the unmanaged
22073 * loader.c, loader.h (mono_method_get_header): new accessor.
22075 * *.[ch]: use the above method. Prepares us to lazily load
22078 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
22079 three warnings, which are actual bugs (see 69206).
22081 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
22082 unused. Saves a cool 4 bytes / method.
22084 2004-11-06 Ben Maurer <bmaurer@ximian.com>
22086 * metadata.c (builtin_types): Add types for System.Object here.
22087 (mono_metadata_parse_type_full): Cache MonoType*'s that are
22088 for a class or valuetype from klass->this_arg or klass->byval_arg.
22090 On mcs for a hello world, this gets us down from 21836 MonoType's
22093 (mono_metadata_free_type): Account for the above change.
22095 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
22097 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
22098 exception instead of asserting if name is null.
22099 (ves_icall_System_AppDomain_GetData): Ditto.
22101 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
22103 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
22106 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
22107 Return NULL when the domain does not have entry_assembly set.
22109 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
22110 Add a 'resource_modules' argument.
22111 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
22113 * reflection.c (mono_reflection_create_runtime_class): Move setting
22114 of wastypebuilder here, so mono_get_type_object () returns a MonoType
22117 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
22118 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
22119 Throw an ArgumentNullException if 'ptr' is null.
22121 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
22122 assemblies here. Fixes #69020.
22124 2004-11-05 Geoff Norton <gnorton@customerdna.com>
22126 * reflection.c (build_compressed_metadata): Fix the previous patch for
22127 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
22130 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
22132 * assembly.c (mono_assembly_names_equal): Allow a match if one of
22133 the cultures is false. Fixes #69090.
22135 * reflection.c (build_compressed_metadata): Fix invalid memory read
22136 detected by valgrind.
22138 * reflection.c (mono_reflection_get_type): Avoid triggering a
22139 TypeResolve multiple times for the same type. Fixes #65577.
22141 2004-11-04 Ben Maurer <bmaurer@ximian.com>
22143 * marshal.c: Avoid using ldftn to call managed functions. It is
22144 much slower than just a call.
22146 * reflection.c (mono_module_get_object): free the basename we
22147 allocate here from glib.
22149 * reflection.c (ensure_runtime_vtable): make sure to free
22150 overrides. Also, we were allocating an array of MonoMethod not an
22151 array of MonoMethod*.
22153 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
22155 * image.c (mono_image_close): free image->guid here.
22157 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
22159 * reflection.c: Fix some spec conformance issues with the PE file
22160 structures so mcs compiled apps run on the Net 2.0 beta.
22162 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
22164 * string-icalls.c (ves_icall_System_String_ctor_encoding):
22165 Implement this. Fixes #67264.
22167 * debug-helpers.h debug-helpers.c marshal.c: Move
22168 mono_find_method_by_name to debug-helpers.c.
22170 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
22172 * object.c (mono_release_type_locks): type_initialization_hash is
22175 * reflection.c object.c object-internals.h: Fix warnings.
22177 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
22178 without accessors. Fixes #61561.
22180 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
22181 application base from the root domain if not set. Fixes #65641.
22182 (mono_runtime_init): Fix warning.
22184 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22186 * appdomain.c: call mono_thread_pool_init.
22187 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
22188 of worker threads based on the number of CPUs and the environment
22189 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
22190 for non-windows (windows) systems.
22192 2004-10-27 Chris Toshok <toshok@ximian.com>
22194 * mono-debug-debugger.c (write_class): don't call mono_class_init
22195 here, as even with the check for (!klass->init_pending), we get
22196 into a situation where we're hitting cycles in class
22197 initialization. Fixes #68816.
22199 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
22201 * image.c: Avoid overwriting values in the loaded_images_hash when an
22202 assembly is loaded multiple times. Fixes #61152.
22204 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
22205 so multiple satellite assemblies for the same name can be loaded.
22208 * mono_domain_assembly_preload: Actually return the loaded assembly,
22211 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
22212 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
22214 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
22215 pending finalizers are not invoked after the appdomain has been
22216 unloaded. Fixes #67862.
22218 2004-10-22 Martin Baulig <martin@ximian.com>
22220 * mono-debug-debugger.c
22221 (mono_debugger_runtime_invoke): Don't box valuetypes.
22223 2004-10-22 Chris Toshok <toshok@ximian.com>
22225 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
22226 don't hide private methods.
22228 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
22230 * icall.c: Allows the runtime to "share" (when known) the public key
22231 token of an assembly. This avoid the need to recalculate the token
22232 (from the public key) in managed code.
22234 2004-10-21 Chris Toshok <toshok@ximian.com>
22236 * debug-helpers.c (append_class_name): argh, revert last patch.
22238 2004-10-21 Chris Toshok <toshok@ximian.com>
22240 * debug-helpers.c (append_class_name): use '+' as the delimiter,
22241 not '/', so that it matches what the debugger uses to look up
22244 2004-10-21 Martin Baulig <martin@ximian.com>
22246 * mono-debug-debugger.c (mono_debugger_throw_exception): New
22247 public method; this is called each time an exception is thrown and
22248 allows the debugger to use exception catch points.
22250 2004-10-21 Martin Baulig <martin@ximian.com>
22252 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
22253 the stack pointer and the exception object in some struct and pass
22254 that to the debugger.
22256 2004-10-21 Chris Toshok <toshok@ximian.com>
22258 * mono-debug-debugger.c (do_write_class): add instance/static
22259 event support. We don't expose "raise" or "other" yet.
22260 (event_is_static): new method.
22262 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
22264 * mono-debug-debugger.c
22265 (mono_debugger_handle_exception): Remove
22266 bogus return value for fussy compilers.
22268 2004-10-20 Martin Baulig <martin@ximian.com>
22270 * mono-debug-debugger.c
22271 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
22272 (mono_debugger_handled_exception): Likewise.
22274 2004-10-20 Martin Baulig <martin@ximian.com>
22276 * mono-debug-debugger.h (MonoDebuggerEvent): Added
22277 MONO_DEBUGGER_EVENT_EXCEPTION.
22279 * mono-debug-debugger.c (mono_debugger_handle_exception): New
22280 public function to send the debugger a notification for an
22281 exception and inform it about a catch/finally clause.
22283 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
22285 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
22286 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
22289 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
22291 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
22293 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
22294 marshalled as [In,Out]. Fixes #58325.
22296 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
22298 * reflection.c (mono_method_body_get_object): Implement some fields.
22300 2004-10-12 Martin Baulig <martin@ximian.com>
22302 * reflection.c (mono_reflection_bind_generic_parameters): Small
22303 fix, correctly retrieve our parent from a generic instance.
22305 2004-10-12 Martin Baulig <martin@ximian.com>
22307 * metadata.c (mono_metadata_generic_param_equal): We always have
22311 (mono_class_from_generic_parameter): We need to have an owner.
22312 (my_mono_class_from_generic_parameter): Likewise.
22314 * reflection.c (mono_reflection_setup_generic_class): Renamed to
22315 mono_reflection_create_generic_class() and added a new
22316 mono_reflection_setup_generic_class().
22317 (mono_reflection_initialize_generic_param): If we're a nested
22318 generic type and inherited from the containing class, set our
22319 owner to the outer class.
22321 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
22323 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
22325 * reflection.c (mono_method_body_get_object): New function to create
22326 a MethodBody object.
22328 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
22330 2004-10-11 Martin Baulig <martin@ximian.com>
22332 * metadata.c (_mono_metadata_type_equal): Renamed to
22333 do_mono_metadata_type_equal() and made static.
22335 2004-10-11 Martin Baulig <martin@ximian.com>
22337 * appdomain.c: Bump corlib version number to 28.
22339 2004-10-10 Martin Baulig <martin@ximian.com>
22341 * class-internals.h
22342 (MonoGenericInst): Added `MonoGenericContainer *container'.
22343 (MonoGenericMethod): Likewise.
22344 (MonoGenericContext): Likewise.
22345 (MonoGenericParam): Added `MonoGenericContainer *owner'.
22348 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
22349 (do_mono_metadata_parse_generic_inst): Likewise.
22350 (mono_metadata_parse_type_full): New public method. This is the actual
22351 mono_metadata_parse_type() implementation - with an additional
22352 `MonoGenericContainer *' argument.
22353 (mono_metadata_parse_array_full): Likewise.
22354 (mono_metadata_parse_signature_full): Likewise.
22355 (mono_metadata_parse_method_signature_full): Likewise.
22356 (mono_metadata_parse_mh_full): Likewise.
22357 (mono_type_create_from_typespec): Likewise.
22358 (mono_metadata_interfaces_from_typedef_full): New public method;
22359 this is similar to the other _full() methods, but we take a
22360 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
22361 (mono_metadata_parse_generic_param): Take an additional
22362 `MonoGenericContainer *' argument and lookup the MonoGenericParam
22363 from that container.
22364 (mono_metadata_generic_param_equal): New static method to compare
22365 two type parameters.
22366 (_mono_metadata_type_equal): New static method; takes an
22367 additional `gboolean signature_only' argument - if true, we don't
22368 compare the owners of generic parameters.
22369 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
22370 with a TRUE argument - do a signature-only comparision.
22372 * loader.c: Use the new _full() methods and pass the
22373 MonoGenericContainer to them.
22375 * object-internals.h (MonoReflectionTypeBuilder): Added
22376 `MonoGenericContainer *generic_container' field.
22377 (MonoReflectionMethodBuilder): Likewise.
22379 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
22381 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
22382 case initial images of dynamic assemblies.
22384 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
22386 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
22388 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
22389 length of event->other array.
22390 (typebuilder_setup_events): Ditto.
22392 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
22393 'assembly_by_name' and add an 'assemblies' list.
22395 * assembly.h assembly.c: Add a new search hook for determining whenever
22396 an assembly is already loaded. Use this instead of searching in the
22397 loaded_assemblies list.
22399 * domain.c appdomain.c: Implement the new search hook so loaded
22400 assemblies are now scoped by appdomain. Fixes #67727.
22402 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
22404 * threads.c (mono_thread_attach): Initialize synch_lock field so
22405 mono_thread_detach works again.
22407 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
22408 'lib' too. Fixes #63130.
22410 2004-10-06 Jackson Harper <jackson@ximian.com>
22412 * culture-info-tables.h: regenerated.
22414 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
22416 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
22417 implemented by other interfaces in the result. Fixes #65764.
22419 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22420 Handle unloadable modules without crashing.
22422 * image.c (load_modules): Revert the previous patch since modules must
22423 have a fixed index inside the array.
22425 * image.c (load_modules): Don't include native modules in the modules
22428 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
22430 * reflection.h: Add param_defaults field.
22432 * reflection.c: Add support for parameter defaults in dynamic methods.
22435 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
22436 an empty string when a type has no namespace. Fixes #64230.
22438 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
22440 * tabledefs.h: Added "internal" security actions to support non-CAS
22441 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
22442 Note: they do not seems to be used anymore in 2.0 (new metadata format)
22444 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
22446 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
22447 constructor of abstract class. Fixes #61689.
22449 2004-10-04 Martin Baulig <martin@ximian.com>
22451 * class-internals.h (MonoGenericContainer): New type.
22452 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
22453 `MonoGenericContainer *generic_container'.
22454 (MonoClass): Replaced `gen_params' and `num_gen_params' with
22455 `MonoGenericContainer *generic_container'.
22457 * metadata.c (mono_metadata_load_generic_params): Return a
22458 `MonoGenericContainer *' instead of a `MonoGenericParam *';
22459 removed the `num' argument.
22461 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
22463 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
22464 for dynamic images.
22466 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
22469 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
22471 * reflection.c: Save pe_kind and machine values into the generated
22474 * appdomain.c: Bump corlib version number.
22476 * object-internals.h: Reorganize layout of LocalBuilder.
22478 * class-internals.h class.c (mono_class_get_implemented_interfaces):
22479 New helper function.
22481 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
22482 created MonoType for dynamic types. Fixes #66180.
22484 2004-10-02 Ben Maurer <bmaurer@ximian.com>
22486 * threadpool.c: the ares hashtable needs a critical section around it.
22487 this prevents some nasty segfaults
22489 2004-10-02 Massimiliano Mantione <massi@ximian.com>
22491 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
22492 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
22495 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
22497 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
22499 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
22501 * image.c: Always canonicalize image file names, to avoid loading
22502 the same assembly twice when referenced using a relative path.
22504 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
22506 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
22508 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
22510 * marshal.c: Fix warnings.
22512 2004-09-29 Geoff Norton <gnorton@customerdna.com>
22514 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
22515 attempting to marshal the delegate_trampoline as the method_addr.
22516 This patch has a static hashtable of marshalled delegates so that
22517 we can map delegate_trampoline addresses back to delegates. This
22518 allows a delegate passed to managed code to be passed back into native
22521 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
22523 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
22525 * reflection.c (method_encode_code): Align method headers properly.
22528 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
22530 * marshal.c: In the runtime invoke wrapper, reset the abort
22531 exception if it is cached. This avoids the automatic rethrowal of
22532 the exception after the catch of the wrapper. Also check for pending
22533 interruptions before calling the managed method. This is done using
22534 the new method emit_thread_force_interrupt_checkpoint, since the
22535 normal checkpoint method is ignored when running the invoke wrapper.
22536 * object.c: If the abort exception is rethrown, set the abort_exc
22537 field of the thread, so it will be rethrown aftere every catch.
22538 * threadpool.c: Only run an interruption checkpoint if what has been
22539 requested is a stop of the thread (aborts will be ignored).
22540 * threads.c: By default, a thread will now never be interrumped while
22541 running the runtime invoke wrapper (this ensures that runtime_invoke
22542 will always return to the caller if an exception pointer is provided).
22543 There is a new special method mono_thread_force_interruption_checkpoint()
22544 to force an interruption checkpoint even if running a protected
22545 wrapper, which is used by the same runtime invoke wrapper to do a check
22548 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
22550 * object.c, object-internals.h: Implemented mono_release_type_locks,
22551 which releases the cctor locks held by a thread.
22552 * threads.c, threads.h: In thread_cleanup, release cctor locks held
22553 by a thread. Added mono_thread_exit() method to be used to safely stop
22556 2004-09-28 Raja R Harinath <rharinath@novell.com>
22558 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22559 Move null check before dereference. Avoid indexing beyond the end
22560 of the 'modules' array.
22562 2004-09-28 Raja R Harinath <rharinath@novell.com>
22564 * metadata-internals.h (MonoImage): Add module_count field.
22565 * image.c (load_modules): Set image->module_count.
22566 (mono_image_load_file_for_image): Use image->module_count.
22567 * reflection.c (mono_image_load_module): Append to image->modules array
22568 of dynamic assembly.
22569 (mono_module_get_object): Fix loop to actually increment index.
22570 Use image->module_count.
22571 * assembly.c (mono_assembly_load_references): Use image->module_count.
22572 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22575 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
22577 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
22578 Avoid assert on generic types.
22580 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
22582 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
22584 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
22586 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
22587 function to convert a MarshalSpec structure to its managed counterpart.
22589 * reflection.c: Fix warnings.
22591 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
22594 * icall.c (mono_create_icall_signature): Fix build.
22596 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
22598 * icall.c: Add MakePointType icall.
22600 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
22603 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22605 * threadpool.c: reuse allocated slots in the queue.
22607 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
22609 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
22611 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
22613 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
22616 * tabledefs.h: Add constants for pinvoke attributes BestFit and
22617 ThrowOnUnmappableChar.
22619 * icall.c (ves_icall_Type_GetPacking): New icall.
22621 2004-09-24 Martin Baulig <martin@ximian.com>
22623 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
22625 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22628 (mono_domain_set): allow setting a domain that is being unloaded.
22629 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
22632 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
22634 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
22635 the GetCustomAttributes icall.
22637 2004-09-23 Martin Baulig <martin@ximian.com>
22639 * object-internals.h (MonoReflectionGenericParam): Replaced
22640 'has_ctor_constraint', `has_reference_type' and `has_value_type'
22641 with `guint32 attrs'.
22643 2004-09-23 Martin Baulig <martin@ximian.com>
22645 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
22647 2004-09-23 Martin Baulig <martin@ximian.com>
22649 * object-internals.h (GenericParameterAttributes): New enum.
22651 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
22653 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
22655 * class.c (init_events): Fill out event->other field.
22657 * class.c: Fix warnings.
22659 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
22661 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
22663 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
22664 walk which doesn't supply the IL offset.
22666 2004-09-22 Martin Baulig <martin@ximian.com>
22668 * reflection.c (mono_reflection_setup_internal_class): If we're
22669 System.ValueType, System.Object or System.Enum, set
22670 `klass->instance_size' and create the vtable.
22671 (mono_reflection_create_internal_class): If we're an enum type,
22672 get the base class from our current corlib.
22674 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
22676 * reflection.h (MonoResolveTokenError): New type.
22678 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
22681 * icall.c: Add an 'error' argument to the ResolveToken icalls.
22683 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
22685 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
22686 Support also calling constructors, but only for already allocated objects.
22688 2004-09-17 Geoff Norton <gnorton@customerdna.com>
22690 * reflection.c (type_get_qualified_name): If the klass is null
22691 return the typename to avoid a NullRefEx.
22692 (encode_cattr_value): Get the qualified name of the boxed type,
22693 not the underlying enumtype. Fixes #62984.
22695 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
22697 * marshal.c: Fix problems with previous checkin.
22699 2004-09-21 <vargaz@freemail.hu>
22701 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
22702 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
22704 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
22706 2004-09-21 Geoff Norton <gnorton@customerdna.com>
22708 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
22709 should only return a type for pointers, arrays, and passbyref types.
22712 2004-09-21 Martin Baulig <martin@ximian.com>
22714 * domain.c (mono_debugger_check_runtime_version): New public
22717 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
22719 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
22721 * reflection.c: Added missing sort to the declarative security
22722 attributes table. MS implementation stops seeing the attributes if the
22723 token number regress in the table (as shown by ildasm and permview).
22725 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
22727 * object-internals.h (MonoReflectionModule): Add 'token' field.
22729 * reflection.c (mono_reflection_get_token): Add support for Module
22731 (mono_module_get_object): Set 'token' field.
22732 (mono_module_file_get_object): Set 'token' field.
22734 * icall.c: Add new Assembly and Module icalls.
22736 * appdomain.c: Bump corlib version.
22738 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
22740 * loader.h loader.c class.h class.c: Add helper functions for obtaining
22741 tokens of metadata objects.
22743 * reflection.h reflection.c (mono_reflection_get_token): New function
22744 to obtain the token of a metadata object.
22746 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
22748 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
22750 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
22752 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
22754 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
22756 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
22757 * object-internals.h: Added 3 MonoArray* members to MonoReflection
22758 AssemblyBuilder to access the permissions set in the class lib.
22759 * reflection.c: Added security attributes encoding step in
22760 mono_image_build_metadata.
22761 * tabledefs.h: Added new security actions defined in 2.0:
22762 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
22764 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
22766 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
22769 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
22771 * locales.c: nullify the ICU_collator member of CompareInfo when it is
22772 finalized. There where random SIGSEVs at program termination, when
22773 an object being finalized was trying to do a string comparison and
22774 the current culture was already finalized.
22776 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22778 * threads.c: call thread_cleanup before finishing the thread if we get
22781 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
22783 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
22784 assemblies from the parent. Fixes #65665.
22786 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
22788 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
22791 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
22793 * reflection.h: add prototype for mono_get_dbnull_object
22794 * reflection.c: add prototypes for get_default_param_value_blobs
22795 and mono_get_object_from_blob for fussier compilers
22797 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
22799 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
22800 false deadlock checks in class initialization.
22802 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
22804 * image.c (mono_image_addref): Fix comment.
22806 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
22809 2004-09-12 Jambunathan K <kjambunathan@novell.com>
22811 * reflection.c (mono_param_get_objects): Modified to return
22812 ParameterInfo.DefaultValue object.
22814 (get_default_param_value_blobs):
22815 (mono_get_object_from_blob):
22816 (mono_get_dbnull_object): New helper routines.
22818 * object.c (mono_get_constant_value_from_blob): New helper routine
22819 carved out from get_default_field_value ()
22821 * object-internals.h (mono_get_constant_value_from_blob): Added
22822 function declaration.
22824 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
22826 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
22827 referenced assemblies. Fixes #62135.
22829 * exception.h exception.c (mono_get_exception_file_not_found2): New
22832 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
22834 * class.h class.c: Add mono_type_get_underlying_type ().
22836 2004-09-09 Geoff Norton <gnorton@customerndna.com>
22838 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
22839 Fix GetTypes() to support dynamically created assemblies.
22841 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
22843 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
22845 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
22848 * reflection.h reflection.c loader.c: Allow dynamic construction of
22849 pinvoke methods. Fixes #65571.
22851 * reflection.c (mono_reflection_get_type): Revert previous change since
22852 it causes regressions.
22854 2004-09-08 Martin Baulig <martin@ximian.com>
22856 * class.c (class_compute_field_layout): Don't call
22857 mono_class_layout_fields() for open generic instances.
22859 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
22860 * threads.c appdomain.c: fix typo in GC macro
22862 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22864 * threads.c: don't call mono_thread_detach() in start_wrapper(),
22865 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
22867 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
22869 * image.c (mono_image_close): Applied patch from
22870 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
22871 assembly is loaded multiple times from data.
22873 * image.c (mono_image_open): Fix warning.
22875 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22877 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
22878 once. Fixes #58334.
22880 * reflection.c (mono_reflection_create_runtime_class): Initialize
22881 klass->nested_classes. Fixes #61224.
22883 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22885 * threads.c: sched_yield() on exit, to allow threads to quit.
22887 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22889 * object.c (mono_unhandled_exception): Remove leftover debug code.
22891 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
22893 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
22895 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22897 * marshal.c (emit_marshal_array): Really null terminate string arrays.
22899 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
22901 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22903 * marshal.c (emit_marshal_array): Null terminate string arrays.
22905 * marshal.c (raise_auto_layout_exception): Fix warning.
22907 * reflection.c (mono_param_get_objects): Initialize the default value
22908 with DBNull.Value, not null. Fixes #62123.
22910 2004-09-01 Miguel de Icaza <miguel@ximian.com>
22912 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
22913 throw an exception with a cute explanation.
22915 2004-09-06 Dick Porter <dick@ximian.com>
22917 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
22918 Close the new process's thread handle, as we don't use it. The
22919 handle stays around forever otherwise.
22921 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22923 * object.c (arith_overflow): Fix warning.
22925 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
22926 calling conventions in method refs. Fixes #65352.
22928 * reflection.c: Fix warnings.
22930 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22932 * icall.c: Add a new icall for Array.Clear
22934 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22936 * object.c: When allocating an array, we have to throw
22937 an overflow exception if any of the lengths are < 0.
22939 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22941 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
22942 properly. Also move implementation of string array marshalling to
22943 managed code. Fixes #42316.
22945 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22947 * assembly.c: provide more information when loading an assembly fails.
22949 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22951 * filewatcher.c: don't expect the development fam package to be
22954 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
22956 * marshal.c: Make a copy of the signature cookie since it will be
22957 freed by the caller.
22959 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
22961 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
22963 * metadata.c (mono_metadata_free_marshal_spec): New function to free
22966 * marshal.c: More refactoring.
22968 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
22971 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
22973 * object.c: In mono_message_invoke, fill the output parameter array after
22974 calling the managed method (it was done before the call). This fixes
22977 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22979 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
22982 2004-09-02 Martin Baulig <martin@ximian.com>
22984 * class.c (mono_class_instance_size): Don't allow generic type
22985 definitions or open generic instances.
22986 (mono_class_array_element_size): If we're a value type, call
22987 mono_class_instance_size() on the original class.
22989 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
22990 handle generic instances.
22992 * mono-debug-debugger.c (write_type): Handle generic instances
22995 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22997 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
22998 the allocation request fails. Fixes #65089.
23000 * object.c (mono_runtime_free_method): Do not call mono_free_method.
23002 * object.c (mono_runtime_free_method): New function to free a dynamic
23005 * marshal.c (mono_delegate_free_ftnptr): New function to free the
23006 delegate trampoline.
23008 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
23009 with hasthis as dynamic,
23011 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
23013 * domain.c (mono_jit_info_table_remove): New function to remove an
23014 entry from the jit info table.
23016 * class-internals.h (MonoMethod): Add 'dynamic' field.
23018 * loader.c: Fix warnings.
23020 2004-09-01 Martin Baulig <martin@ximian.com>
23022 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
23023 instead of mono_debugger_lock() because the latter one is a no-op
23024 unless running in the debugger.
23026 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
23028 * class.c (class_compute_field_layout): Classes with auto-layout or
23029 reference fields are not blittable.
23031 2004-09-01 Dick Porter <dick@ximian.com>
23033 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
23034 mono_image_get_filename() to get the assembly location.
23037 * metadata.h: Fix compile warnings
23039 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
23041 * class.c (class_compute_field_layout): System.Object is blittable.
23043 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
23044 as in/out. Fixes #59909.
23046 2004-09-01 Martin Baulig <martin@ximian.com>
23048 * metadata.h (MONO_TYPE_ISREFERENCE): Call
23049 mono_metadata_generic_inst_is_valuetype() if we're a generic
23050 instance to check whether our underlying type is a reference type.
23052 2004-09-01 Martin Baulig <martin@ximian.com>
23054 * metadata.c (mono_type_size): If we're a generic instance, call
23055 mono_class_value_size() for value types.
23057 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
23059 * marshal.c: Implement more custom marshalling functionality. Fixes
23062 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23064 * mono-debug.c, debug-mono-symfile.c: add some locking love.
23066 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
23068 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
23070 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
23072 * icall.c: Fix some warnings.
23074 * threads.c (abort_appdomain_thread): Fix unref errors.
23075 (mono_thread_current): Fix THREAD_DEBUG define.
23077 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
23079 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
23081 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
23083 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
23085 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
23088 2004-08-28 Martin Baulig <martin@ximian.com>
23091 (mono_metadata_generic_inst_is_valuetype): New public function.
23093 * metadata.h (MONO_TYPE_ISSTRUCT): Call
23094 mono_metadata_generic_inst_is_valuetype() if we're a generic
23095 instance to check whether our underlying type is a valuetype.
23097 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
23099 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
23102 2004-08-25 Martin Baulig <martin@ximian.com>
23104 * loader.c (mono_get_method_from_token): Abstract methods can also
23105 be generic and thus have type parameters.
23107 * metadata-internals.h
23108 (MonoDynamicImage): Added `GPtrArray *gen_params'.
23110 * reflection.c (mono_image_get_generic_param_info): Don't create a
23111 metadata row, just add an entry to the `gen_params' array.
23112 (build_compressed_metadata): Sort the `gen_params' array and then
23113 actually create the metadata.
23115 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23117 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
23119 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
23121 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
23123 2004-08-24 Martin Baulig <martin@ximian.com>
23125 * class.cs (mono_class_is_subclass_of): Like an interface, a
23126 generic instance also derives from System.Object.
23128 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
23130 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
23131 custom modifiers to be in any order. Fixes #61990.
23133 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
23135 * object.c: Register mono_object_new_fast icall.
23137 * object.c (mono_class_get_allocation_ftn): Return to calling
23138 mono_object_new_fast, since it seems faster to compute the object
23139 size in unmanaged code than passing it as a parameter.
23141 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
23143 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
23144 this function with Boehm as the oom handler, so we don't have to check
23145 the result of GC_malloc.
23147 * object.c: Remove checks for oom.
23149 * object.h object.c (mono_class_get_allocation_ftn): New function to
23150 return the icall which can be used to allocate an instance of a given
23153 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
23155 * class-internals.h: Add 'enabled' field.
23157 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
23159 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
23161 2004-08-18 Jambunathan K <kjambunathan@novell.com>
23162 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
23165 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
23167 * appdomain.c: use the Tls function for appdomain too,
23168 at Zoltan's request. Actually return in mono_context_get
23170 * appdomain.c, profiler.c, threads.c: use __thread
23172 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
23174 * appdomain.c threads.c: Call GC_CreateThread on windows.
23176 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
23177 multiple libraries since this don't work on windows.
23179 2004-08-18 Martin Baulig <martin@ximian.com>
23181 * class-internals.h
23182 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
23185 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
23186 MonoMethodNormal since we also need it for abstract and interface
23190 (build_compressed_metadata): Sort the GenericParam table.
23191 (mono_image_create_token): Added `gboolean create_methodspec'
23192 argument; this is false when generating a MethodImpl token.
23193 (reflection_methodbuilder_to_mono_method): Abstract and interface
23194 methods may also have generic parameters.
23196 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
23198 * appdomain.c: thread local alloc
23200 2004-08-17 Martin Baulig <martin@ximian.com>
23202 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
23205 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
23208 * class.c (mono_type_get_full_name): New public function.
23209 (mono_type_get_name): Don't include the type arguments.
23211 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
23213 * Makefile.am: Build static versions of libmetadata and libmonoruntime
23214 for inclusion into the mono executable.
23216 2004-08-16 Martin Baulig <martin@ximian.com>
23218 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
23219 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
23221 2004-08-14 Martin Baulig <martin@ximian.com>
23223 * class.c (dup_type): Also copy the `byref' field.
23225 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
23227 * reflection.c (create_dynamic_mono_image): Revert the last change
23228 since it breaks bootstrap.
23230 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
23232 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
23234 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
23235 not free them with g_free.
23237 2004-08-11 Martin Baulig <martin@ximian.com>
23239 * reflection.c (mono_reflection_setup_internal_class): Also call
23240 mono_class_setup_mono_type() if we already have a `tb->type.type'.
23242 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
23244 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
23245 called during default (first) AppDomain creation. Keep track of
23246 Evidence when loading assemblies.
23248 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23250 * opcodes.c, opcodes.h: reduce runtime relocations.
23252 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
23254 * culture-info.h, locales.c: fixes and chages to sue the new
23255 optimized format of the locale data.
23256 * culture-info-tables.h: regenerated.
23258 2004-08-06 Geoff Norton <gnorton@customerdna.com>
23260 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
23262 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
23264 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
23265 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
23266 * domain-internals.h: icall declaration.
23267 * icall.c: icall registration.
23268 * object-internals.h: New fields in MonoAssembly for CAS.
23270 2004-08-05 Duncan Mak <duncan@ximian.com>
23272 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
23275 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23277 * reflection.c: fix to deal with object[] arrays in custom ctors
23280 2004-08-05 Martin Baulig <martin@ximian.com>
23282 * class.c (mono_class_array_element_size): Added support for
23283 generic instances and correctly handle "recursive" types.
23285 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
23287 * assembly.c: Fix warnings.
23289 2004-08-04 Martin Baulig <martin@ximian.com>
23292 (mono_type_get_name_recurse): Added `gboolean include_arity'
23293 argument specifying whether or not we should include the generic
23294 arity in the type name.
23295 (_mono_type_get_name): New static function.
23296 (mono_class_setup_vtable): If we're a generic instance, don't
23297 include the generic arity in the names of explicit method
23300 2004-08-03 Martin Baulig <martin@ximian.com>
23302 * class.c (mono_type_get_name_recurse): Enclose the generic type
23303 arguments in `<', '>'.
23305 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23307 * gc.c: make GC warning messages use the trace API, they are just
23308 noise to most of the users.
23310 2004-08-03 Martin Baulig <martin@ximian.com>
23312 * debug-mono-symfile.c (read_string): Correctly read the string.
23314 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
23316 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
23318 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
23320 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
23322 2004-07-30 Martin Baulig <martin@ximian.com>
23324 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
23325 Reflect latest symbol writer changes.
23327 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
23329 * object.c: always create an object if null is passed
23330 to Invoke() where a valuetype is expected.
23332 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
23334 * marshal.c (mono_marshal_init): make managed
23335 signatures match native ones better for 64bits.
23337 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23339 * appdomain.c: hack to build correctly the private bin path on windows.
23342 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
23344 * assembly.c: Load mscorlib from the correct framework directory
23345 (mono/<version>/mscorlib.dll).
23346 * appdomain.h: Added prototypes for new functions.
23347 * internals.h: Added some prototypes.
23348 * domain.c: When initializing the runtime, get from the executable and
23349 the configuration files the runtime version that the app supports.
23350 Added support methods for reading app.exe.config. Added list of versions
23351 supported by the JIT. Added two new methods: mono_init_from_assembly,
23352 which initializes the runtime and determines the required version from
23353 the provided exe file, and mono_init_version, which initializes
23354 the runtime using the provided version.
23355 * icall.c: Get machine.config from version-specific directory.
23356 * reflection.c: When generating an image, embed the version number
23357 of the current runtime.
23359 2004-07-28 Dick Porter <dick@ximian.com>
23362 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
23363 returned sockaddr size before creating the remote address object.
23364 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
23367 2004-07-28 Dick Porter <dick@ximian.com>
23369 * locales.c (string_invariant_compare_char): Fix invariant char
23370 compares between upper and lower cases. Fixes bug 61458.
23372 2004-07-27 Ben Maurer <bmaurer@ximain.com>
23374 * marshal.c: actually cache stelem.ref wrappers.
23376 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
23378 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
23379 sections and remove the mono_cli_rva_map () function.
23381 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23383 * debug-mono-symfile.c: fix one more endianess issue, from a patch
23384 by Geoff Norton (<gnorton@customerdna.com>).
23386 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23388 * class.c: fix class loads for pointer types (typeof(int) !=
23391 2004-07-27 Martin Baulig <martin@ximian.com>
23393 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
23394 reading the debugging information from an external ".mdb" file.
23396 2004-07-24 Martin Baulig <martin@ximian.com>
23398 * reflection.c (mono_image_get_type_info): Only write a class
23399 layout entry if we actually have a size or a packing size.
23401 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
23403 * reflection.c (type_get_fully_qualified_name):
23404 insert cast to get type checking of ?: with non-gcc compilers
23406 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
23408 * rand.c: use g_getenv for both lookups of
23411 2004-07-17 Martin Baulig <martin@ximian.com>
23413 * reflection.c (mono_reflection_bind_generic_method_parameters):
23414 Set `gmethod->reflection_info'.
23416 2004-07-17 Martin Baulig <martin@ximian.com>
23418 * class.c (mono_class_create_from_typedef): Insert the newly
23419 created class into the hash table before computing the interfaces
23420 since we could be called recursively.
23422 2004-07-16 Ben Maurer <bmaurer@ximain.com>
23424 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
23425 function to implement stelem.ref in managed code
23426 * class-internals.h, debug-helpers.c: a new wrapper type
23429 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
23431 * gc.c: allow GC handles to work even when no GC is compiled in.
23432 Fix part of bug #61134 (GetAddrOfPinnedObject).
23434 2004-07-13 Peter Williams <peter@newton.cx>
23436 * process.c (complete_path): Make sure we don't attempt to execute
23439 2004-07-12 Geoff Norton <gnorton@customerdna.com>
23441 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
23442 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
23443 and will add/subtract the hour if needed
23445 2004-07-12 Martin Baulig <martin@ximian.com>
23447 * reflection.c (mono_field_get_object): If we have
23448 `field->generic_info', take the attributes from
23449 `field->generic_info->generic_type'.
23451 2004-07-12 Martin Baulig <martin@ximian.com>
23453 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
23454 This function must be called before initializing the runtime.
23455 (mono_debug_init_1): New function; call this after initializing
23456 the runtime, but before loading the assembly. It tells the
23457 debugger to load corlib and the builtin types.
23459 * mono-debug-debugger.c: Did some larger changes in the debugging
23460 code; support recursive class declarations, make sure we actually
23463 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23465 * debug-helpers.c: undo my previous patch and fixed the real issue in
23466 ../mini/exceptions-x86.c
23468 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23470 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
23471 when no HOME env. variable was set and a NullRef was thrown in a .cctor
23472 called from other .cctors.
23474 2004-07-09 Miguel de Icaza <miguel@ximian.com>
23476 * loader.c: Removed the mono_loader_wine_init hack now that we are
23477 doing a managed version of Windows.Forms.
23479 2004-07-09 Ben Maurer <bmaurer@ximian.com>
23481 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
23482 threadpool.c, threads.c: remove static data from rootset.
23484 2004-07-09 Dick Porter <dick@ximian.com>
23486 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
23487 Don't do any more processing if the matched length was 0. It was
23488 increasing the size of the string before. Fixes bug 61167.
23490 2004-07-09 Dick Porter <dick@ximian.com>
23494 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
23495 Add support for SO_PEERCRED if its available.
23497 2004-07-09 Peter Bartok <pbartok@novell.com>
23498 * loader.c: winelib.exe.so error message is now only displayed if
23499 MONO_DEBUG is set. To help us avoid questions when people are trying
23500 out the new Managed.Windows.Forms.
23502 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
23504 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
23505 for isinst and castclass wrappers.
23507 * class-internals.h icall.c: Move registration and lookup of JIT icalls
23508 to libmetadata from the JIT, so they could be used by the marshalling
23509 code and the interpreter.
23511 * marshal.c: Register marshalling related JIT icalls here instead of
23512 in mini.c. Use CEE_MONO_ICALL instead of the family of
23513 CEE_MONO_PROC<x> opcodes to call marshalling functions.
23515 * metadata.h: Remove unneeded marshalling conversions.
23517 * opcodes.c: Update for new opcodes.
23519 2004-07-08 Martin Baulig <martin@ximian.com>
23521 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
23522 (mono_debug_get_domain_data): Make this function static.
23524 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23526 * gc.c, object.h: add nice GC handle API for embedders.
23528 2004-07-06 Ben Maurer <bmaurer@ximian.com>
23530 * reflection.c: more changes for the new api
23532 * object.c: When we reflect on a field w/ a constant value, it
23533 will not have a memory location, so we must access metadata. Also,
23534 allow easier reading of strings so that we can read them from
23537 * class.c (mono_class_layout_fields): no need for literal fields here.
23539 * class-internals.h: api changes for const fields
23541 * icall.c (ves_icall_get_enum_info): use new apis for const fields
23543 2004-07-06 Martin Baulig <martin@ximian.com>
23545 * mono-debug.h: Increment version number to 44.
23547 * mono-debug.c (mono_debug_add_wrapper): The second argument is
23548 now a gpointer, rewrote this whole method.
23550 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
23551 function. Add information about the wrapper in a new "misc table".
23553 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
23554 for the new misc table.
23556 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
23558 * metadata-internals.h image.c: Add a cache for helper signatures.
23560 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
23562 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
23564 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
23565 delegates from a delegate. Fixes #61033.
23567 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
23568 marshalling of stringbuilder arrays. Fixes #59900.
23570 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
23572 * icall.c: Add EnumBuilder:setup_enum_type icall.
23574 2004-06-30 Ben Maurer <bmaurer@ximian.com>
23576 * icall.c: Added a new icall for the property version of
23577 OffsetOfStringData.
23579 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
23581 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
23582 it has a constant size across platforms.
23584 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
23587 2004-06-29 Martin Baulig <martin@ximian.com>
23589 * mono-debug.c (mono_debug_add_method): Protect the whole function
23590 in mono_debugger_lock(), not just parts of it.
23592 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
23594 * reflection.c: make sure padding bytes in heaps are zeroed.
23596 2004-06-24 David Waite <mass@akuma.org>
23598 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
23599 image.c, loader.c, locales.c, marshal.c, metadata.c,
23600 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
23601 string-icalls.c, threads.c: change to C90-style comments from C99 /
23604 2004-06-24 Dick Porter <dick@ximian.com>
23607 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
23608 return createdNew. Fixes bug 60412.
23611 * icall.c: Add createdNew parameter to CreateMutex icall
23613 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23615 * reflection.c, object-internals.h: save default value in params.
23617 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23619 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
23620 no need to build a new path combining that with the application base.
23623 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
23625 * reflection.c: fixed minor standard compliance issues.
23627 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23629 * reflection.c: fixed issue with encoding some custom attributes
23630 (arrays in properties and fields, bug #60411).
23632 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23634 * reflection.c: fix start address when copying the public key token.
23636 2004-06-23 Martin Baulig <martin@ximian.com>
23638 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
23639 the `exc' object in a static object to put it into the GC's root set.
23641 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
23643 * reflection.c: make mono_reflection_setup_internal_class ()
23644 callable a second time to setup a new parent class.
23646 2004-06-23 Dick Porter <dick@ximian.com>
23648 * threads.c: Check for WAIT_IO_COMPLETION return values.
23650 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
23652 * appdomain.c: Removed the g_free on the public key token. Now copy
23653 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
23654 * assembly.c: Added public key token string value when loading
23655 assemblies. Fix bug #60439.
23656 * icall.c: Added missing informations (like public key) in
23657 GetReferencedAssemblies. Fix #60519.
23658 * image.h: Changed definition for public key token from const char*
23659 public_tok_value to guchar public_key_token [17];
23660 * reflection.c: Updated for changes to public key token.
23662 2004-06-22 Lluis Sanchez Gual
23664 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
23665 for the field in base classes.
23667 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23669 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
23670 mark headers as not supported, they are installed only for use by the
23673 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
23675 * *.c, *.h: avoid namespace pollution in public headers.
23677 2004-06-21 Martin Baulig <martin@ximian.com>
23679 * exception.c (mono_get_exception_security): It's in
23680 "System.Security", not in "System".
23682 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
23683 the exception classes.
23685 2004-06-21 Martin Baulig <martin@ximian.com>
23687 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
23688 Protect the exception object from being finalized.
23690 2004-06-21 Martin Baulig <martin@ximian.com>
23692 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
23695 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
23697 * reflection.c: Load the assembly in mono_reflection_type_from_name,
23698 if it was not loaded before. Fix parts of #60439.
23700 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
23702 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
23703 code that was broken since Ben's change: wrappers are now
23704 dependent on the method signature only again.
23706 2004-06-21 Martin Baulig <martin@ximian.com>
23708 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
23709 added interface support.
23711 2004-06-21 Martin Baulig <martin@ximian.com>
23713 * class.c (mono_vtable_get_static_field_data): New public method.
23715 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
23717 * filewatcher.c : Windows build fix to be compliant with API changes.
23719 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23721 * class.h, class.c: more accessors.
23722 * metadata.h, metadata.c: prepare for hiding MonoType and
23723 MonoMethodSignature: people should use the accessors from now on
23724 outside of the tree.
23726 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23728 * *.c, *.h: more API cleanups.
23730 2004-06-18 Jackson Harper <jackson@ximian.com>
23732 * assembly.c: Trace loading assemblies.
23733 * loader.c: Trace loading native libraries.
23734 * mono-config.c: Trace loading config files.
23736 2004-06-18 Dick Porter <dick@ximian.com>
23738 * locales.c: Tell ICU the lengths of strings, it can cope with
23739 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
23741 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
23743 * image.c: swapped name/filename;
23745 2004-06-18 Martin Baulig <martin@ximian.com>
23747 * mono-debug-debugger.c (write_class): Write the parent class at
23748 the end of the header.
23750 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23752 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
23754 2004-06-17 Raja R Harinath <rharinath@novell.com>
23756 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
23757 (bundle_obj): New conditional define.
23758 (BUILT_SOURCES): Remove.
23759 ($(bundle_srcs)): Make parallel-make safe.
23760 (libmonoruntime_la_LIBADD): Make unconditional.
23761 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
23762 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
23764 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
23766 * culture-info-tables.h: It was inconsistent with the latest
23769 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
23771 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
23774 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
23777 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23779 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
23780 cleaned up public header threads.h.
23782 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23784 * Makefile.am, *.c, *.h: more API cleanups.
23786 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23788 * Makefile.am: removed monosn from compilation.
23789 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
23790 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
23791 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
23792 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
23793 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
23794 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
23796 2004-06-15 Jackson Harper <jackson@ximian.com>
23798 * assembly.c: Make locales lower case when searching the GAC for
23799 assemblies. gacutil will always make locales lowercase when
23800 installing so this effectively makes them case insensitive.
23802 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
23804 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
23805 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
23806 parameter which allows to choose whether the wait can be interrupted or
23807 not. Also added the method mono_monitor_enter(), which locks the monitor
23808 using an infinite wait and without allowing interruption.
23809 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
23811 * object.h: Added new fields in MonoThread. suspend_event holds the event
23812 used to susped/resume the thread. synch_lock is the lock object to use for
23813 modifying the thread state.
23814 * threads.c: Use the new synch_lock object for locking, instead of "this",
23815 which can generate deadlocks.
23816 Moved thread state change in Thread.Sleep and Thread.Join from managed
23817 to unmanaged code. This avoids a deadlock when the thread was suspended
23818 just after acquiring the thread lock.
23819 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
23820 Implemented Thread.Suspend using an event instead of ThreadSuspend,
23821 which is not fully implemented in the io-layer.
23822 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
23824 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
23826 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
23827 threads-types.h: more API cleanups.
23829 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23831 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
23832 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
23833 threadpool.c, threads.c: first pass at the exported API cleanup.
23835 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23837 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
23839 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23841 * icall.c: added internalGetHome.
23843 2004-06-14 Dick Porter <dick@ximian.com>
23845 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
23846 possible to return successfully when '.' or '..' were the only
23847 entries in a directory, but were skipped. The MonoIOStat was not
23848 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
23851 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23853 * reflection.c: make binaries run on .Net 1.1 by default.
23855 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
23857 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
23859 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
23861 * marshal.c: keep track of struct size with explicit layout
23864 2004-06-12 Martin Baulig <martin@ximian.com>
23866 * mono-debug-debugger.c: Comment out a debugging g_message().
23868 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23870 * reflection.c, reflection.h: do not free custom attrs that are cached.
23871 * icall.c: use braces to make code clearer.
23873 2004-06-11 Martin Baulig <martin@ximian.com>
23875 * class.h (MonoInflatedField): New type.
23876 (MonoClassField): Replaced `MonoType *generic_type' with
23877 `MonoInflatedField *generic_info'.
23880 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
23882 2004-06-11 Martin Baulig <martin@ximian.com>
23884 * reflection.c (mono_image_create_method_token): Correctly encode
23887 2004-06-11 Martin Baulig <martin@ximian.com>
23889 * metadata.c (mono_metadata_parse_method_signature): When parsing
23890 a MethodDef which has VarArgs, also set sentinelpos if we don't
23891 have any parameters.
23893 2004-06-11 Martin Baulig <martin@ximian.com>
23895 * verify.c (mono_method_verify): In CEE_CALL, use
23896 mono_method_get_signature() to get the method's signature, unless
23897 we're a PInvoke method.
23899 2004-06-10 Jackson Harper <jackson@ximian.com>
23901 * assembly.c: Use <path>/lib/mono/gac for the extra paths
23902 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
23903 logical name as the supplied path is just a prefix to the gac not
23904 the direct path to it.
23906 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
23908 * reflection.c: make the token for a created method match
23909 the token of the MethodBuilder it was created from
23910 (IKVM requires this behaviour now).
23912 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
23914 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
23915 reflection.c, socket-io.c: leak fixes.
23917 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23919 * icall.c: handle sentinel pos in vararg methods in position different
23922 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23924 * culture-info-tables.h: freshly generated.
23926 2004-06-09 Martin Baulig <martin@ximian.com>
23928 * loader.c (mono_get_method_constrained): Call `mono_class_init
23929 (constrained_class)'.
23931 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
23933 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
23934 any methods. Fixes #59629.
23936 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23938 * culture-info-tables.h: reflecting locale-builder updates.
23940 2004-06-08 Dick Porter <dick@ximian.com>
23943 * locales.c: Fixed compile warnings, including a real bug in
23944 CompareInfo_internal_compare.
23946 2004-06-08 Dick Porter <dick@ximian.com>
23949 (ves_icall_System_Globalization_CompareInfo_internal_index):
23950 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23951 Double-check the resuls of usearches, because ICU currently
23952 ignores most of the collator settings here. Fixes bug 59720.
23954 2004-06-08 Dick Porter <dick@ximian.com>
23957 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23958 Fix memory leak and segfault-causing typo. No idea how this one
23959 lasted so long without being noticed.
23961 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
23963 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
23964 any methods. Fixes #59629.
23966 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23969 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
23970 own the critical section before). Removed dead code (that's done
23971 in the preload hook).
23973 (mono_assembly_load_with_partial_name): call the preload hook.
23975 2004-06-08 Martin Baulig <martin@ximian.com>
23977 * metadata.c (mono_metadata_signature_alloc): Default
23978 `sentinelpos' to -1.
23980 * reflection.c (mono_image_get_array_token): Likewise.
23982 2004-06-08 Martin Baulig <martin@ximian.com>
23984 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
23986 * metadata.c (mono_metadata_parse_method_signature): When parsing
23987 a MethodDef which has VarArgs, set sentinelpos.
23989 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
23990 `gint16' since we're using -1 for non-varargs methods.
23993 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
23994 (method_encode_signature): Added varargs support.
23995 (method_builder_encode_signature): Likewise.
23996 (mono_image_get_varargs_method_token): New static method.
23997 (mono_image_create_method_token): New public method; this is
23998 called via an icall instead of mono_image_create_token() when
23999 calling a varargs method.
24001 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
24003 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
24005 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
24007 * culture-info-tables.h : Reflecting the latest locale-builder that
24008 fixed empty array representation ({} to {0}).
24010 2004-06-07 Jackson Harper <jackson@ximian.com>
24012 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
24013 looking up extra gac paths. This allows MONO_GAC_PATH to act
24014 exactly like a prefix.
24016 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
24018 * reflection.c (mono_reflection_type_from_name): Make a copy of the
24019 type name before modifying it. Fixes #59405.
24021 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
24023 * culture-info.h: added fields for "all datetime patterns".
24024 * locales.c: ( ves_icall_System_Globalization_CultureInfo
24025 _construct_datetime_format ()): fill xxx_patterns fields.
24026 * object.h: added fields for "all datetime patterns" to
24027 MonoDateTimeFormatInfo.
24028 * culture-info-tables.h: reflecting locale-builder updates.
24030 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
24032 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
24033 the event has no add and remove methods. Fixes #59629.
24035 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
24037 * object.c: Fixed possible integer overflow when allocating large
24040 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
24042 * culture-info-tables.h: reflecting locale-builder updates.
24044 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
24046 * culture-info-tables.h: reflecting locale-builder updates.
24048 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
24050 * culture-info-tables.h: reflecting locale-builder updates.
24052 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
24054 * threads.c: Made Thread.Sleep abortable.
24056 2004-06-02 Martin Baulig <martin@ximian.com>
24058 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
24060 * debug-mono-symfile.h: Bumped symbol file version number to 37.
24062 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
24064 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
24066 2004-05-30 Jackson Harper <jackson@ximian.com>
24068 * reflection.c: Do not hardcode assembly versions or public key
24069 tokens anymore. All of this except the corlib section was dead
24072 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
24074 * object.c (mono_runtime_invoke_array): Automatically create boxed
24075 objects for byref valuetypes if needed. Fixes #59300.
24077 * object.c (mono_method_return_message_restore): Handle
24078 MONO_TYPE_OBJECT as well.
24080 2004-05-28 Jackson Harper <jackson@ximian.com>
24082 * reflection.c: The modified type encoding was causing build
24083 problems. Reverted for now.
24085 2004-05-28 Jackson Harper <jackson@ximian.com>
24087 * reflection.c/h: Take an assembly ref so that we dont create
24088 fully qualified names when encoding types in the same assembly as
24089 the custom attribute being emitted.
24090 * appdomain.c: Increment version number.
24092 2004-05-26 Duncan Mak <duncan@ximian.com>
24095 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
24096 Set the full version number (major, minor, build, revision).
24098 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
24100 * marshal.c (emit_struct_conv): increment src/dst after blit
24101 (mono_marshal_get_managed_wrapper,
24102 mono_marshal_get_native_wrapper): make sure we have marshalling
24103 info before marshalling params (info computation affects
24106 * class.c (class_compute_field_layout): correctly deal with
24108 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
24109 value types (as per what windows dows by default)
24110 (mono_class_setup_mono_type): System.ValueType is blittable
24111 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
24114 * marshal.c (mono_marshal_load_type_info): flag types as
24115 non-blittable if the native layout doesn't match the managed
24118 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24120 * appdomain.c: don't add stuff in the private search path that is
24121 above the application base. If application base is not set, there's
24122 no private search path.
24124 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
24126 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
24127 byref struct arguments in native->managed marshalling.
24129 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
24131 * marshal.c (mono_marshal_get_runtime_invoke): correctly
24132 cache methods using signature (special case for methods
24133 that are value type or string class)
24135 * image.c (mono_image_close): clean up allocated GSList's
24136 in runtime_invoke_cache.
24138 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24140 * mono-config.c: set the correct path for mono_cfg_dir on windows when
24141 there's no MONO_CFG_DIR environment variable defined.
24143 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24145 * threads.c: windows version must be >= 0x0500 to include OpenThread.
24147 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
24149 * threadpool.c: Really wait for 500ms after the async call, even if the wait
24151 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
24152 before waiting for it, and call CloseHandle after the wait to unref it.
24153 This will make sure that handles are not disposed too early.
24155 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24160 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
24163 * object.c: se the application_base only for the domain that runs
24164 Main. Fixes bug #59216,
24166 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24169 * object.c: only the domain in which Main is run have
24170 SetupInformation.ConfigurationFile set, so moved a few lines from
24171 appdomain.c to object.c.
24173 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24175 * appdomain.c: we tried to load [name].(dll|exe), but according
24176 to bug #57710, we must also try [culture]/[name].(dll|exe) and
24177 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
24178 There's a test case attached to bug #58922.
24180 2004-05-27 Dick Porter <dick@ximian.com>
24183 * file-io.c: Implemented icalls for locking and unlocking regions
24185 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
24186 FALSE on error (fixes both compiler warning and real bug.)
24188 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
24190 * culture-info-tables.h: reflecting locale-builder updates.
24192 (Added missing ChangeLog entry for 05/26)
24194 2004-05-27 Jackson Harper <jackson@ximian.com>
24196 * locales.c: Fix some cut and paste errors.
24198 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24200 * mono-config.c: set the correct path for config. directory on windows.
24202 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
24204 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
24207 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
24209 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
24210 from pinvoke functions.
24212 * marshal.c (mono_ftnptr_to_delegate): Implement this.
24214 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
24216 * culture-info-tables.h: reflecting locale-builder updates.
24218 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
24220 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
24223 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
24225 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
24226 * icall.c: Modified icalls for RNG.
24227 * rand.c|h: Changed RNG interface to allow thread-safe usage under
24228 Windows (CryptoAPI).
24230 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
24232 * locales.c: Fix build.
24234 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
24236 * culture-info-tables.h: reflecting locale-builder updates.
24238 2004-05-25 Jackson Harper <jackson@ximian.com>
24240 * locales.c: When creating the current culture use the $LANGs
24241 specific culture. So DateTimeFormat and NumberFormat entries are created.
24243 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
24245 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
24246 a char array as parameter.
24248 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
24250 * image.c: In mono_image_open(), always use an absolute path name to
24251 look for already loaded images.
24253 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
24255 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
24256 missing in the windows build (like older cygwin include files).
24258 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
24260 * icall.c: Fixed check for possible integer overflow in Buffer_
24261 BlockCopy icall. Replaced comments style // by /* */.
24263 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
24265 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
24267 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
24268 check after MONO_VTADDR. Fixes pinvoke2.exe.
24270 * marshal.h marshal.c metadata.h: Add beginnings of support for
24271 ftnptr -> delegate marshalling.
24273 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
24275 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
24276 * threads.c: Fix warnings.
24278 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
24280 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
24281 * icall.c: Registered icalls for Suspend and Resume.
24282 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
24284 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
24285 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
24286 * process.c: Use WaitForSingleObjectEx.
24287 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
24289 * threads.c, threads.h: Make use of new Ex wait methods. Improved
24290 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
24291 for Suspend and Resume. Added new mono_thread_stop, used for stoping
24292 background threads. Added basic support for Abort in Windows.
24293 Start new threads using a managed delegate invoke wrapper. This wrapper
24294 has an interruption checkpoint that is needed since an interruption
24295 can be requested before the thread leaves the unmanaged code that starts
24297 * marshal.c: Added interruption checkpoint after every native call, and
24298 also before managed calls for wrappers called from unmanaged code to
24299 go into managed code.
24300 * object.h: Added new field in MonoThread to keep track of interruption
24303 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
24305 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
24308 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24315 * rand.c: getenv -> g_getenv (windows!)
24317 * process.c: complete_path is also used on non-windows platforms.
24319 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24321 * icall.c: new signature for Process_Start.
24323 * process.[ch]: new signature for Process_Start. If we're on windows
24324 and UseShellExecute is false, we have to search for the program by
24325 ourselves if we don't get a full path.
24327 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
24329 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
24330 marshalling and call CleanUpNativeData if needed. Fixes #58646.
24332 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24334 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
24337 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24339 * process.c: use double quotes to quote program name and arguments on
24340 windows. Fixes bug #58575.
24342 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24344 * file-io.c: don't return "." and ".." when using windows Find*File.
24346 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
24348 * marshal.c: Don't pass wrappers to message init because method
24349 addressed used to lookup metadata. part of remoting[2|3] fix.
24351 2004-05-15 Jackson Harper <jackson@ximian.com>
24353 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
24354 path is essentially the same as MONO_PATH except that it points to
24355 GACs instead of lib directories.
24356 * loader.h: The user gac is gone so we dont need function to
24358 * mono-config.c: user gac option is now gone.
24360 2004-05-15 Jackson Harper <jackson@ximian.com>
24362 * culture-info.h: Make defines more consistent, add calendar data
24363 to the culture info table.
24364 * culture-info-tables.h: Add basic calendar data. Basically
24365 everyone gets default gregorian until all the data is
24367 * locales.c: Use the new consistent defines. Set calendar data for
24368 culture info objects.
24369 * object.h: add a field for calendar data to CultureInfo
24371 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
24373 * image.c: image->runtime_invoke_cache is keyed on signatures now.
24374 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
24376 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
24377 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
24378 an extra param that is the pointer of the method to invoke. The IL for
24379 the invoke method is no longer specific to the method, but to the
24380 signature of the method. Thus, we can share the same code for multiple
24381 methods. This reduces the number of methods that have to be compiled.
24383 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
24385 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
24387 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
24389 * icall.c: Optimize Buffer.BlockCopy.
24391 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24393 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
24394 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
24395 quote). Changed them to "MMMM yyyy".
24397 2004-05-12 Miguel de Icaza <miguel@ximian.com>
24400 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
24402 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
24404 * reflection.h: Updated after changes to managed structures.
24406 * appdomain.c: Bump corlib version.
24408 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24410 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
24413 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24415 * Makefile.am: link to ../os/libmonoos.la on windows.
24418 -If MONO_DEBUG, warn about non-existing directories in
24420 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
24421 compile time variable.
24422 -Removed init_default_path and call mono_set_rootdir from
24423 libmonoos.a instead (windows only).
24425 * assembly.h: declare mono_assembly_getrootdir().
24428 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
24430 * loader.c: s/getenv/g_getenv/
24432 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
24434 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
24436 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
24438 * metadata.h: Add new marshalling conversions.
24440 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
24443 * reflection.c (mono_reflection_get_type): Lookup the type in all
24444 modules of a multi-module assembly. Fixes #58291.
24446 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
24448 * threads.c: Before aborting a background, set the StopRequested
24449 state. This avoids throwing the Abort exception.
24450 In mono_thread_manage, don't continue with the shutdown until all
24451 aborted threads have actually stopped.
24453 2004-05-10 Jackson Harper <jackson@ximian.com>
24455 * locales.c: Remove the modifier from culture names.
24457 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24459 * Makefile.am: monosn is not installed any more. It has been deprecated
24462 2004-05-07 Jackson Harper <jackson@ximian.com>
24465 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
24466 Fix array construction, add bailout if the length is 0.
24468 2004-05-07 Dick Porter <dick@ximian.com>
24470 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
24471 machine doesn't have a DNS entry. Patch by Urs Muff
24472 (umuff@quark.com), fixes bug 57928.
24474 2004-05-06 Jackson Harper <jackson@ximian.com>
24476 * reflection.c: Handle null PublicTokens properly. alloc mem for
24477 assembly names culture so we dont crash when freeing it.
24479 2004-05-06 Jackson Harper <jackson@ximian.com>
24481 * assembly.c: Check the usergac when loading with partial names.
24483 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
24485 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
24486 does nothing for now (not required for Linux/Windows) but the class
24487 library can call it (and a newer or modified runtime could need it).
24488 * icall.c: Registred icall.
24490 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24492 * loader.c: prints a message on module loading error we set MONO_DEBUG
24493 environment variable.
24495 2004-05-05 Jackson Harper <jackson@ximian.com>
24497 * appdomain.c: Handle PublicKeyToken=null properly.
24499 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
24501 * environment.c|h: Added icall ves_icall_System_Environment_
24502 GetOSVersionString to get the current OS version as a string.
24503 * icall.c: Registred icall.
24505 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
24507 * object.c: in mono_object_get_virtual_method(), take into account that
24508 non-virtual methods don't have a slot in the vtable. Check needed when
24509 the object is a proxy.
24511 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
24513 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
24514 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
24516 * object.c (mono_class_compute_gc_descriptor): Fix warning.
24518 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
24519 passed when a valuetype is expected.
24521 * object.c (mono_unhandled_exception): Only set the exit code if the
24522 exception happens in the main thread. Fixes thread5.exe.
24524 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
24525 invalid names. Fixes #58047.
24527 2004-05-03 Jackson Harper <jackson@ximian.com>
24529 * assembly.c: This line was committed accidently and is unneeded.
24531 2004-05-03 Jackson Harper <jackson@ximian.com>
24533 * icall.c: Add new icall for Assembly::LoadWithPartialName
24534 * assembly.c/.h: new function that probes the GAC to load partial
24535 assembly names by Paolo Molaro.
24537 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24539 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
24540 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
24541 (type_get_fully_qualified_name): Added PublicKeyToken when building a
24544 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24546 * appdomain.c: fixed check for 'neutral' culture and removed warning.
24547 * reflection.c: fix bug when parsing a full type name and Version is not
24548 the last thing in the string.
24550 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
24552 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
24553 crashes when it is freed.
24555 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24557 * assembly.c: print the compat warning to stderr.
24559 2004-05-01 Miguel de Icaza <miguel@ximian.com>
24561 * assembly.c (mono_assembly_load_references): Add a compatibility
24562 hack to run old applications that might be still referencing the
24563 3300-based assemblies, only do this for System.xxx.
24565 2004-05-01 Jackson Harper <jackson@ximian.com>
24567 * appdomain.c: If the culture is neutral we set it to "".
24569 2004-04-29 Jackson Harper <jackson@ximian.com>
24571 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
24573 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
24575 * string-icalls.c: added low overhead function for copying chars
24576 * icall.c: added needed icall for the above function
24578 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24580 * icall.c: fix return value of get_global_assembly_cache. Implemented
24581 Environment.GetLogicalDrives.
24583 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
24585 * rand.c: try and talk to egd or prngd
24586 for random bytes if opening devices fail.
24588 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
24590 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
24591 alignment for the type using the native alignment of its members
24592 instead of using klass->min_align.
24594 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
24596 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24599 * socket-io.c: added check for sys/aio.h.
24601 2004-04-28 Dick Porter <dick@ximian.com>
24603 * threads.c: Don't abort a thread thats already aborting, when
24604 terminating everything.
24606 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24608 * icall.c: added 2 new async calls for Socket.
24610 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
24611 IO on *nix systems.
24613 * threadpool.c: removed unused variable.
24615 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
24617 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
24619 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
24621 * locales.c: put back string_invariant_tolower () and
24622 string_invariant_toupper ().
24624 2004-04-26 David Waite <mass@akuma.org>
24629 * unicode.h: remove comma from end of enumeration declarations
24631 2004-04-26 David Waite <mass@akuma.org>
24633 * debug-mono-symfile.h:
24636 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
24639 2004-04-26 Jackson Harper <jackson@ximian.com>
24641 * appdomain.c: Increment version number.
24643 2004-04-26 Jackson Harper <jackson@ximian.com>
24645 * appdomain.c: Set assembly references public token value when
24646 PublicKeyToken is specified, not the hash_value. Free public token
24647 values when free assembly name data. Previously the public key
24648 token was hex decoded, however we are using hex encoded public key
24649 tokens, so this is not neccasary.
24650 * assembly.c: Lookup assemblies in the gac if their public token
24651 value is set. Add function to allow enabling user gac
24652 lookups. Specify whether or not the assembly was loaded from the
24653 GAC. Compare full assembly names when checking the cache for
24654 assemblies (Temporarily disabled see comment in code). Remove
24655 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
24656 specifies trace-loader they get extra info to stdout on the
24657 loading of assemblies.
24658 * image.h: Add a field for an assembly references public token
24659 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
24660 whether an assembly has been loaded from the GAC.
24661 * image.c: Remove a corlib -> mscorlib name mapping.
24662 * loader.h: Add function to enable/disable the user gac.
24663 * mono-config.c: Check if the usergac is enabled in the config
24665 * icall.c: New icall to determine whether or not an assembly has
24666 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
24667 * tabldefs.h: Add constant for assemblyref flag that specifies a
24668 full public key is used instead of a public token.
24669 * reflection.c: Remove mscorlib -> corlib mappings. Set
24670 PublicTokenValue instead of hash value. This value is a hex
24671 string so it does not need to be expanded.
24673 2004-04-26 Martin Baulig <martin@ximian.com>
24675 * mono-debug-debugger.c (mono_debugger_initialize): Set
24676 `mono_debugger_initialized' before calling mono_debug_lock().
24678 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
24680 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
24681 InternalToUpper/InternalToLower.
24682 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
24683 removed invariant culture shortcut. This is now done in managed code.
24684 * locales.c: (string_invariant_toupper/tolower) removed.
24686 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24688 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
24689 Added Poll internal call.
24691 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
24692 call for Poll. Select was too heavy for polling a single socket.
24694 * threadpool.[ch]: added mono_threadpool_cleanup.
24695 * threads.c: use it. Don't use Thread_Abort on windows.
24697 2004-04-23 Martin Baulig <martin@ximian.com>
24699 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
24701 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
24703 * icall.c: Registred new icalls for key pair protection and added an
24704 icall for Environment.GetFolderPath on Windows.
24705 * security.c|h: Added new icalls for key pair protection.
24707 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24709 * socket-io.c: don't display the non-supported family warning for known
24710 families. Now this is not displayed on windows when checking support
24713 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24715 * class.c: don't display the layout warning for static fields.
24717 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
24719 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
24720 * locales.c, locales.h: Added new icalls for culture-specific
24721 Char.ToLower and Char.ToUpper.
24723 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24725 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
24728 2004-04-20 Martin Baulig <martin@ximian.com>
24730 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
24731 of the type name before passing it to mono_reflection_type_from_name().
24733 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
24735 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
24736 encodings here. Fixes #56965.
24738 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
24740 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24741 fix test on strstr result not that I can see anything that
24742 relies on the result.
24744 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
24746 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
24749 * marshal.c (mono_marshal_get_string_encoding): New helper function.
24751 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
24752 function to determine which marshalling to use for strings. Fixes
24755 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
24757 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
24759 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
24761 * icall.c: #include mono-config.h
24763 2004-04-15 Jackson Harper <jackson@ximian.com>
24765 * culture-info-tables.h: Fix date formats for en-US culture.
24767 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
24769 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
24770 ThreadPool.SetMinThreads.
24771 * threadpool.c: Implemented ThreadPool.GetMinThreads and
24772 ThreadPool.SetMinThreads.
24774 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
24776 * mono-config.c: also load the .config file in the directory
24777 where the assembly was found.
24779 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
24781 * assembly.c: load per-assembly config files.
24782 * icall.c: decrapified code to get the config dir and moved to
24784 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
24785 per-assembly config files. When doing a dll map lookup give precedence
24786 to the per-assembly data.
24788 2004-04-14 Martin Baulig <martin@ximian.com>
24790 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
24791 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
24792 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
24794 * mono-debugger-debugger.c: While the debugger is locked, remember
24795 whether the symbol tables have changes and send one single
24796 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
24798 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
24800 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
24802 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
24805 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
24806 account when marshalling string arrays. Fixes #56965.
24808 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
24810 * icall.c: Add new icalls mapping for security.
24811 * security.c|h: Add internal calls for WindowsIdentity,
24812 WindowsImpersonationContext and WindowsPrincipal.
24814 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
24816 * class.c: Added comment to ensure the System.MonoDummy class
24817 is removed when no longer necessary
24819 2004-04-13 Miguel de Icaza <miguel@ximian.com>
24821 * appdomain.c: Pass arguments to the bootstraping exceptions to
24822 minimize JITed methods at boot
24824 * metadata.c (mono_exception_from_name_two_strings): Allow for the
24825 second string to be null.
24827 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24828 Change the protocol to minimize the JIT methods at startup. Now
24829 it Returns the internal codepage, if the value of "int_code_page"
24830 is 1 at entry, and we can not compute a suitable code page
24831 number, returns the code page as a string.
24833 2004-04-13 Jackson Harper <jackson@ximian.com>
24835 * culture-info-tables.h: Fix number of decimal digits for all
24838 2004-04-13 Jackson Harper <jackson@ximian.com>
24840 * icall.c: Clairfy out of sync error message. It is not always
24841 your corlib that is out of sync.
24843 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
24845 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
24846 properties when only the set accessor is overriden. Fixes #55874.
24848 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
24850 * assembly.c (mono_assembly_load_references): Make this thread safe.
24853 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
24855 * monosn.c: Add missing initialization calls.
24857 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
24860 ves_icall_System_Globalization_CultureInfo_construct_number_format
24861 Fix g_assert so it compiles on fussier compilers re int/ptr
24864 2004-04-08 Dick Porter <dick@ximian.com>
24867 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
24868 53992. Also rearrange the code so that the internal calls return
24869 an error value and exceptions are thrown from managed code.
24871 * icall.c: Add type info to the socket icalls.
24873 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24875 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
24878 2004-04-07 Martin Baulig <martin@ximian.com>
24880 * class.c (mono_class_from_generic_parameter): Don't default
24881 `klass->parent' to `mono_defaults.object_type'.
24883 2004-04-07 Martin Baulig <martin@ximian.com>
24885 * reflection.c (mono_reflection_initialize_generic_parameter): Set
24886 `param->pklass->reflection_info'.
24888 2004-04-07 Jackson Harper <jackson@ximian.com>
24890 * culture-info-tables.h: Fix date separator symbol.
24892 2004-04-07 Martin Baulig <martin@ximian.com>
24894 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
24895 from System.Type to System.MonoType.
24897 2004-04-07 Martin Baulig <martin@ximian.com>
24900 (MonoReflectionGenericParam): Added `has_reference_type' and
24901 `has_value_type' fields.
24903 * reflection.c (mono_image_get_generic_param_info): Encode the
24904 correct flags if we have the `class' or `struct' constraint.
24906 2004-04-07 Martin Baulig <martin@ximian.com>
24909 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
24911 2004-04-07 Jackson Harper <jackson@ximian.com>
24913 * appdomain.c: Revert extra patches, just wanted to bump the
24916 2004-04-07 Jackson Harper <jackson@ximian.com>
24918 * Makefile.am: Add culture-info private headers.
24919 * icall.c: Add new icalls for contructing locales.
24920 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
24921 * locales.h: Declare new culture info construction methods.
24922 * object.h: Add new fields used to avoid the CultureMap to
24924 * culture-info.h: Definition of structs used in the culture info
24926 * culture-info-tables.h: Autogenerated tables that contain culture
24927 info data. This file was generated with the locale-builder tool.
24928 * appdomain.c: Incement corlib version number.
24930 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
24932 * appdomain.c: (mono_runtime_init) move mono_thread_init
24933 to before mono_object_new calls so critical sections
24934 are initialized before use.
24936 2004-04-07 Martin Baulig <martin@ximian.com>
24939 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
24940 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
24941 (ves_icall_MonoGenericParam_initialize): Removed.
24942 (monogenericparam_icalls): Removed.
24943 (generictypeparambuilder_icalls): Added new table for
24944 System.Reflection.Emit.GenericTypeParameterBuilder.
24947 (mono_reflection_define_generic_parameter): Removed.
24948 (mono_reflection_initialize_generic_parameter): This is now called
24949 from GenericTypeParameterBuilder's .ctor.
24951 2004-04-06 Martin Baulig <martin@ximian.com>
24953 * class.c (mono_class_init): Don't inflate nested classes in a
24955 (mono_type_get_name_recurse): Include the generic arguments for
24956 generic instances and generic type declarations.
24957 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
24958 (_mono_class_get_instantiation_name): Removed.
24959 (mono_class_create_generic): Always use `gklass->name' as our name.
24961 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
24963 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
24964 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
24965 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
24966 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
24967 closed generic methods here.
24970 (mono_reflection_generic_inst_get_nested_types): Removed.
24971 (inflate_mono_method): Copy the generic parameters from the
24972 MonoMethodHeader into out MonoGenericMethod.
24974 2004-04-06 Martin Baulig <martin@ximian.com>
24977 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
24979 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
24981 * reflection.c (build_compressed_metadata): If we have any entries
24982 in the GenericParam, MethodSpec or GenericParamConstraint tables,
24983 set the header version to 1.1.
24985 2004-04-06 Martin Baulig <martin@ximian.com>
24987 * class.c (mono_class_init): If we're a generic instance,
24988 initialize our nested classes, too.
24989 (_mono_class_get_instantiation_name): Deal with the new `!%d'
24992 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24994 * process.c: quote the argument passed to the shell on windows.
24996 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
24998 * threads.c (mono_alloc_special_static_data): Allow this to be
24999 called during startup.
25001 2004-04-02 Martin Baulig <martin@ximian.com>
25004 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
25006 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
25008 * icall.c: Fix build.
25010 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
25012 * Makefile.am: Added security.c|h.
25013 * icall.c: Added icall for get_UserName;
25014 * security.c: New file for security related icalls. Added function
25015 get_UserName for System.Environment (fix #56144).
25016 * security.h: New. Header file for security.c
25018 2004-04-02 Dick Porter <dick@ximian.com>
25020 * icall.c: Deleted the icalls that were obsoleted some time ago
25021 by the ICU string code, and which were mixed into the icall
25022 rearranging. Fixes bug 55969.
25025 * string-icalls.c: Deleted the code that those icalls reference.
25027 2004-04-01 Martin Baulig <martin@ximian.com>
25029 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
25031 * class.c (mono_class_from_generic_parameter): Don't set
25032 TYPE_ATTRIBUTE_INTERFACE.
25033 (my_mono_class_from_generic_parameter): Likewise.
25035 2004-04-01 Martin Baulig <martin@ximian.com>
25037 * loader.c (find_method): Added an optional `MonoClass *ic'
25038 argument to search in a specific interface.
25039 (mono_get_method_constrained): New public function.
25041 2004-04-01 Martin Baulig <martin@ximian.com>
25043 * reflection.c (mono_image_get_generic_field_token): Use the
25044 `handleref' cache here.
25046 2004-04-01 Martin Baulig <martin@ximian.com>
25048 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
25050 * reflection.c (create_generic_typespec): Use the `typespec' hash
25051 here, not the `typeref' one.
25053 2004-04-01 Martin Baulig <martin@ximian.com>
25055 * class.c (mono_class_inflate_generic_type): Moved the
25056 functionality into a new static inflate_generic_type() which
25057 returns NULL if it didn't do anything. Only increment the
25058 `mono_stats.inflated_type_count' if we actually inflated
25060 (mono_class_get_full): Check the classes type to see whether we
25061 need to inflate it; also inflate MONO_TYPE_(M)VAR.
25063 2004-04-01 Jackson Harper <jackson@ximian.com>
25065 * reflection.c: Set culture for assembly references.
25067 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
25069 * reflection.[ch], icall.[ch], Fix support for pinning variables.
25071 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25074 (do_mono_assembly_open): the critical section also covers
25075 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
25077 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25080 (mono_manage_threads): abort the background threads when finishing.
25083 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25085 * gc.c: only close the done_event handle if there was no timeout.
25088 2004-03-30 Martin Baulig <martin@ximian.com>
25090 * icall.c (icall_entries): It's called "System.Activator", not
25091 "System.Activation".
25093 2004-03-30 Martin Baulig <martin@ximian.com>
25095 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
25096 (mono_class_create_from_typespec): Likewise.
25098 2004-03-30 Martin Baulig <martin@ximian.com>
25100 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
25101 `has_ctor_constraint' and `initialized'.
25103 2004-03-30 Martin Baulig <martin@ximian.com>
25105 * reflection.c (encode_new_constraint): New static function to add
25106 the constructor constraint attribute to a type parameter.
25107 (encode_constraints): Call encode_new_constraint() if necessary.
25110 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
25112 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
25114 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
25116 * reflection.c, icall.c: add support for pinning variables.
25118 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
25120 * marshal.c (mono_marshal_get_managed_wrapper):
25121 init bool local with zero rather than null.
25123 2004-03-29 Martin Baulig <martin@ximian.com>
25125 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
25126 the "official" behavior here.
25127 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
25129 2004-03-29 Martin Baulig <martin@ximian.com>
25131 * icall.c: Reflect latest API changes.
25133 2004-03-29 Martin Baulig <martin@ximian.com>
25135 * loader.c (mono_get_method_from_token): Also call
25136 mono_metadata_load_generic_params () for abstract and interface
25137 methods; replace the type arguments in the method signature with
25138 the ones which are loaded from the metadata.
25140 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
25142 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
25143 of the lock is not the current thread. MS.NET don't do it, in spite of
25144 what the documentation says. See bug #56157.
25146 2004-03-28 Martin Baulig <martin@ximian.com>
25148 * class.c (mono_class_init): Don't call init_properties() and
25149 init_events() for generic instances; set `prop->parent' when
25150 inflating properties.
25152 * reflection.c (mono_generic_inst_get_object): Call
25153 `mono_class_init (ginst->klass)'.
25154 (mono_type_get_object): Only create a MonoGenericInst if your
25155 generic type is a TypeBuilder.
25156 (do_mono_reflection_bind_generic_parameters): Only set
25157 `ginst->is_dynamic' if our generic type is a TypeBuilder.
25159 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
25161 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
25164 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25166 * icall.c: added Kill_internal icall.
25167 * process.[ch]: added Kill_internal icall.
25169 2004-03-25 Martin Baulig <martin@ximian.com>
25171 * class.h (MonoStats): Added `generic_instance_count',
25172 `inflated_method_count', `inflated_type_count' and
25173 `generics_metadata_size'.
25175 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25177 * reflection.c: no warnings now.
25179 2004-03-25 Martin Baulig <martin@ximian.com>
25181 * class.c (mono_class_get_full): New public function; does a
25182 mono_class_get(), but also takes a `MonoGenericContext *'.
25184 * loader.c (mono_field_from_memberref): Renamed to
25185 `field_from_memberref', made static and added `MonoGenericContext *'
25187 (mono_field_from_token): Added `MonoGenericInst *' argument.
25188 (method_from_memberef): Likewise.
25189 (mono_get_method_from_token): Likewise.
25190 (mono_get_method_full): New public function; does a
25191 mono_get_method(), but also takes a `MonoGenericContext *'.
25193 * verify.c (mono_method_verify): Get the method's generic context
25194 and pass it to mono_field_from_token(), mono_get_method_full() and
25195 mono_class_get_full().
25197 2004-03-25 Martin Baulig <martin@ximian.com>
25199 * class.c (mono_class_inflate_generic_type): Take a
25200 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
25201 `MonoGenericMethod *'.
25203 2004-03-25 Martin Baulig <martin@ximian.com>
25205 * loader.h (MonoMethodInflated): Store the MonoGenericContext
25206 instead of the MonoGenericMethod here.
25208 2004-03-25 Martin Baulig <martin@ximian.com>
25210 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
25211 each time we create a new MonoGenericInst, we also create a new
25212 context which points back to us.
25214 * class.c (inflate_method): Use `ginst->context' instead of
25215 creating a new context.
25217 * loader.c (method_from_memberref): Use
25218 `klass->generic_inst->context' instead of creating a new context.
25220 2004-03-25 Martin Baulig <martin@ximian.com>
25222 * class.h (MonoGenericContext): New struct.
25223 (MonoGenericMethod): Removed `generic_inst'.
25225 * class.c (mono_class_inflate_generic_method): Take a
25226 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
25228 2004-03-25 Martin Baulig <martin@ximian.com>
25230 * loader.h (MonoMethodInflated): New typedef.
25232 * metadata.h (MonoMethodSignature): Removed `gen_method', make
25233 `generic_param_count' consume just 30 bits, added `is_inflated'
25234 and `has_type_parameters' flags (one bit each).
25236 * class.c (mono_class_inflate_generic_method): Create a
25237 MonoMethodInflated instead of a MonoMethodNormal and set
25238 `is_inflated' in the method signature.
25240 * class.h (MonoGenericMethod): Removed `generic_method'.
25242 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
25244 * image.c: Make sure the name of a MonoImage is always an absolute path.
25245 This fixes bug #54415.
25247 2004-03-24 Martin Baulig <martin@ximian.com>
25249 * class.c (mono_class_setup_vtable): If we're a generic instance,
25250 use our generic type's vtable size.
25252 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
25254 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
25255 MONO_NO_UNLOAD env var as a temporary workaround for unloading
25258 2004-03-23 Martin Baulig <martin@ximian.com>
25260 * class.h (MonoDynamicGenericInst): Added `int count_events' and
25261 `MonoEvent *events'.
25263 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
25264 (typebuilder_icalls): Added "get_event_info"; calls
25265 mono_reflection_event_builder_get_event_info().
25267 * reflection.c (mono_reflection_generic_inst_initialize): Added
25268 `MonoArray *events'.
25269 (mono_reflection_event_builder_get_event_info): New function.
25271 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
25273 * object.h: add mono_type_initialization_init
25275 * object.c (mono_runtime_class_init):
25276 implement class constructor synchronization rules
25277 to cope with threading issues.
25278 add mono_type_initialization_init
25280 * appdomain.c (mono_runtime_init): call
25281 mono_type_initialization_init
25283 * class.h: removing initializing field from MonoVTable
25285 2004-03-23 Martin Baulig <martin@ximian.com>
25287 * class.c (my_mono_class_from_generic_parameter): Use
25288 `param->name' if it's not NULL.
25290 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
25292 * class.c: do not insert non-virtual methods in the vtable.
25293 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
25294 that means the method is non-virtual. This never would have
25297 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
25299 * profiler.c: Added lock for accessing coverage_hash.
25301 2004-03-22 Martin Baulig <martin@ximian.com>
25303 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
25304 `method->method->signature->generic_param_count != 0' to make it
25305 work for interface methods.
25307 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25309 * process.c: quote the string passed to the shell using g_shell_quote.
25311 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25314 (mono_threads_manage): don't remove the finalizer thread and self
25315 from the threads hash table so that mono_thread_manage can be called
25318 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25320 * process.c: quote the arguments when UseShellExecute is true. Fixes
25323 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25325 * threads.c: set mono_thread_detach as a cleanup routine for every
25326 thread. This way it's always executed upon thread termination, either
25327 aborted or finished normally. No more xsp hangs!
25329 2004-03-17 Martin Baulig <martin@ximian.com>
25331 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
25332 `int count_nested' and a `MonoType **nested'.
25334 * reflection.c (mono_reflection_bind_generic_parameters): Moved
25335 most of the functionality into a new static
25336 do_mono_reflection_bind_generic_parameters() and don't take a
25337 `MonoType *nested_in' argument any more. Don't compute nested
25339 (mono_reflection_generic_inst_get_nested_types): New public method
25340 to get nested types.
25342 * class.c (mono_class_create_generic): Set `klass->nested_in' if
25343 we're a nested class.
25345 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
25346 mono_reflection_generic_inst_get_nested_types() to compute the
25349 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
25351 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
25352 descriptive error message under windows.
25354 2004-03-17 Martin Baulig <martin@ximian.com>
25356 * class.c (dup_type): Added `const MonoType *original' argument;
25357 copy the attrs from the original type.
25359 2004-03-17 Martin Baulig <martin@ximian.com>
25361 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
25362 `m->generic_inst_cache' here.
25364 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
25366 * exception.h exception.c: Add stack_overflow_exception.
25368 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25371 (overlapped_callback): call SetEvent *after* invoking the callback.
25372 No need to call CloseHandle.
25374 2004-03-16 Martin Baulig <martin@ximian.com>
25376 * reflection.c (mono_image_get_fieldref_token): Take a
25377 `MonoReflectionField *' instead of a `MonoClassField *' and a
25378 `MonoClass *'; store the `MonoReflectionField *' in the hash.
25380 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25382 * appdomain.c: don't add the culture to the filename we're looking for
25383 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
25385 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25387 * locales.c: don't ignore symbols when doing case insensitive compares.
25388 Thanks Dick! Fixes bug #54046.
25390 * threads.c: surround 'threads' usage with enter/leave in
25391 mono_thread_manage.
25393 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
25395 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
25396 implicitly marshalled as [Out]. Fixes #55450.
25398 (mono_marshal_get_runtime_invoke): Zero out the result if there is
25401 2004-03-16 Martin Baulig <martin@ximian.com>
25403 * class.c (mono_class_from_generic_parameter): Use the actual
25406 2004-03-16 Martin Baulig <martin@ximian.com>
25408 * reflection.c (type_get_signature_size): New static function.
25409 Compues the size of the type in a method signature.
25410 (method_get_signature_size): New static function; calls
25411 type_get_signature_size() to compute the actual size of the
25412 method's signature.
25413 (method_encode_signature): Use method_get_signature_size() to get
25414 the signature's size rather than using `nparams * 10'.
25416 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25418 * file-io.h: define here WapiOverlapped on windows. I don't want the
25419 regular OVERLAPPED one.
25422 * threadpool.c: somehow, BindIoCompletionCallback is not found.
25423 Disabling AIO on windows.
25425 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25427 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
25430 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25432 * appdomain.c: upgraded corlib version.
25434 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
25435 and BeginWrite. Allow opening files for asynchrnous operations.
25437 * file-io.h: new struct that maps FileStreamAsyncResult.
25438 * icall.c: added new icalls.
25439 * process.[ch]: support setting child process environment variables
25440 and use the SHELL or COMSPEC when UseShellExecute is true.
25442 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
25443 callback for async. IO is here and also BindHandle.
25445 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
25448 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
25450 * reflection.c (create_custom_attr): Allow len == 0.
25452 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
25453 computation on big-endian machines.
25455 2004-03-13 Martin Baulig <martin@ximian.com>
25457 * class.h (MonoGenericInst): Added `int count_ifaces'.
25459 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
25460 `ginst->count_ifaces' instead `klass->interface_count' since we
25461 may get called before the vtable is created.
25463 * loader.c (mono_method_get_param_names): If we're a generic
25464 instance, return and don't initialize the class.
25466 * reflection.c (mono_reflection_setup_generic_class): Don't call
25467 ensure_runtime_vtable().
25468 (mono_reflection_bind_generic_parameters): Set
25469 `ginst->count_ifaces'.
25471 2004-03-11 Jackson Harper <jackson@ximian.com>
25475 * unicode.h: Remove unused System.Char icalls.
25477 2004-03-11 Miguel de Icaza <miguel@ximian.com>
25479 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
25480 code when we P/Invoke the first library in Windows.Forms, instead
25481 of when we first open the assembly.
25483 * assembly.c: Drop the lookup from here.
25485 2004-03-10 Martin Baulig <martin@ximian.com>
25487 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
25488 class for properties, fields and events. Finally fixes #54945.
25490 2004-03-10 Martin Baulig <martin@ximian.com>
25492 * metadata.c (mono_metadata_class_equal): New static function;
25493 checks whether two generic instances or two generic parameters are
25495 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
25498 2004-03-10 Martin Baulig <martin@ximian.com>
25500 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
25502 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
25503 argument and write it into the `reflection_info' field.
25506 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
25507 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
25509 2004-03-09 Jackson Harper <jackson@ximian.com>
25511 * char-conversions.h: use 8 bits for numeric data its all we need
25512 * icall.c: numeric data is only 8 bits now.
25514 2004-03-09 Martin Baulig <martin@ximian.com>
25516 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
25518 * class.c (init_properties, init_events): Initialize the new
25521 * reflection.c (typebuilder_setup_properties): Likewise.
25522 (typebuilder_setup_events): Likewise.
25524 * reflection.h (MonoEventInfo): Replaced `parent with
25525 `declaring_type' and `reflected_type'.
25527 * icall.c (ves_icall_get_property_info): Distinguish between
25528 declaring and reflected type.
25529 (ves_icall_get_event_info): Likewise.
25531 2004-03-09 Martin Baulig <martin@ximian.com>
25533 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
25534 (ves_icall_Type_GetField): Correctly set field->klass.
25536 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
25538 * loader.h: Fix warning.
25540 2004-03-08 Miguel de Icaza <miguel@ximian.com>
25542 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
25543 library routine if present. Notice that it will still continue
25544 executing even if its missing, for those working on the Gtk#
25545 edition of Windows.Forms.
25547 * assembly.c (do_mono_assembly_open): If loading the
25548 System.Windows.Forms call mono_loader_wini_init.
25550 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
25552 * class.h: Added MonoRemoteClass struct.
25553 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
25554 function for MonoStrings.
25555 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
25556 Added internal call for getting the proxy type.
25557 * marshal.c: Get the type of transparent proxies from its remote_class.
25558 Added methods that generate the IL for type checks and casts:
25559 mono_marshal_get_isinst, mono_marshal_get_castclass,
25560 mono_marshal_get_proxy_cancast.
25561 * marshal.h: Declaration of the previous new methods.
25562 * object.c: Added new moethods for creating and updating MonoRemoteClass
25563 instances: mono_remote_class, mono_upgrade_remote_class,
25564 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
25565 * verify.c: FIx transparent_proxy_fields layout.
25566 * appdomain.c: Bump corlib version.
25568 2004-03-04 Jackson Harper <jackson@ximian.com>
25570 * icall.c: Add icall to access char conversion tables.
25571 * char-conversions.h: Character conversion tables.
25572 * Makefile.am: Add char-conversions.h private header file.
25574 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
25576 * appdomain.c (unload_thread_main): Increase unloading timeout to
25577 10 sec as a temporary workaround for Nant problems.
25579 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
25581 * gc.c: Add checks for GC_enable and GC_disable.
25583 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
25584 (jaak@zd.com.pl). Fix memory corruption in String.Replace
25587 2004-02-27 Martin Baulig <martin@ximian.com>
25589 * reflection.c (mono_reflection_bind_generic_parameters): Take a
25590 `MonoReflectionType *' instead of a `MonoType *'.
25592 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
25594 * gc.c (run_finalize): Avoid finalizing the object representing the
25596 (finalizer_thread): Fix warning.
25598 2004-02-25 Martin Baulig <martin@ximian.com>
25600 * class.c (_mono_class_get_instantiation_name): Added `int offset'
25601 argument for nested types.
25602 (mono_class_create_generic): Added support for nested generictypes.
25604 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
25607 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
25609 * reflection.c (method_encode_signature): Increase the minimum
25610 value of `size' from 10 to 11.
25611 (mono_reflection_bind_generic_parameters): Take `int type_argc'
25612 and `MonoType **types' arguments instead of the `MonoArray
25613 *types'; added `MonoType *nested_in'. Recursively instantiate
25616 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
25618 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
25619 stack_overflow_ex members which are used by exception handling.
25621 * appdomain.c (mono_runtime_init): Initialize the new members.
25623 * gc.c (mono_gc_enable): New helper function.
25624 * gc.c (mono_gc_disable): New helper function.
25626 2004-02-23 Martin Baulig <martin@ximian.com>
25628 * icall.c: I must have been really stupid - make it actually work
25631 2004-02-23 Martin Baulig <martin@ximian.com>
25633 * loader.c (method_from_memberref): Only inflate the method if
25634 it's in another klass.
25636 2004-02-23 Martin Baulig <martin@ximian.com>
25638 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
25639 (mono_class_init): If we're a generic instance and an interface,
25640 compute `class->interface_id'; also create `class->interfaces'
25641 here and inflate them.
25643 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
25645 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
25647 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
25649 2004-02-15 Miguel de Icaza <miguel@ximian.com>
25651 * reflection.c (method_encode_code): Improved the error message
25652 generated by the exception.
25654 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25656 * icall.c: Martin did not do what he said in the ChangeLog for
25657 2004-02-18, but put back the changes for properties and events.
25658 Commenting those changes out again and adding comment to bug #54518.
25660 * process.c: removed warning.
25662 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
25664 * marshal.c (emit_struct_conv): Print an error message instead of
25665 asserting when a type does not have the StructLayout attribute.
25667 2004-02-20 Martin Baulig <martin@ximian.com>
25669 * reflection.c (mono_type_get_object): Also use the cache for
25671 (mono_reflection_bind_generic_parameters): Always compute
25674 2004-02-20 Martin Baulig <martin@ximian.com>
25676 * class.h (MonoGenericMethod): Removed `klass'.
25678 * class.c (mono_class_inflate_generic_method): Added `MonoClass
25681 2004-02-20 Martin Baulig <martin@ximian.com>
25683 * reflection.c (method_encode_methodspec): Actually use the
25684 uninflated signature for the memberref.
25686 2004-02-20 Martin Baulig <martin@ximian.com>
25688 * class.h (MonoGenericMethod): Removed `declaring'.
25690 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
25691 is NULL, compute it here.
25693 2004-02-20 Martin Baulig <martin@ximian.com>
25695 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
25697 * metadata.c (mono_metadata_generic_inst_hash): New method.
25698 (mono_metadata_generic_inst_equal): New method.
25700 * reflection.c (mono_reflection_bind_generic_parameters): Use the
25701 `klass->image->generic_inst_cache' cache to avoid creating
25702 duplicate MonoGenericInst's.
25704 * class.c (mono_class_inflate_generic_type): Use the cache.
25706 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
25708 * object.c: fixed gc descriptor calculation for embedded valuetypes.
25710 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25712 * icall.c: added Socket.WSAIoctl icall.
25714 * socket-io.[ch]: implemented
25715 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
25717 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
25719 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
25721 2004-02-18 Urs C Muff <umuff@quark.com>
25723 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
25724 this work on PPC and other big-endian architectures.
25726 * debug-mono-symfile.h: Prepended the names of all the `guint32'
25727 fields with an underscore to make sure they're only accessed by
25728 the read32() macro.
25730 2004-02-18 Martin Baulig <martin@ximian.com>
25732 * icall.c: Put the klass->refclass changes back for methods and
25733 fields, but not for properties and events. We're currently not
25734 distinguishing between DeclaringType and ReflectedType for
25735 properties and events, that's what caused the regressions.
25737 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25740 (mono_async_result_new): the handle can be NULL.
25742 * threadpool.c: Use an event instead of a semaphore, don't initialize
25743 it until needed. This saves quite a few semaphores from being created
25744 when using the threadpool.
25746 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
25748 * object.c (mono_string_is_interned_lookup): Fix interning of long
25749 strings. Fixes #54473.
25751 * domain.c (ldstr_equal): Optimize if the two strings are equal.
25753 * icall.c: Revert the klass->refclass changes since they introduce
25754 regressions (bug #54518).
25756 2004-02-18 Martin Baulig <martin@ximian.com>
25758 * class.c (mono_class_init): If we're a generic instance and don't
25759 come from a TypeBuilder, inflate our members here.
25760 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
25761 (mono_class_create_generic): New public method.
25762 (mono_class_initialize_generic): Removed.
25763 (get_instantiation_name): Renamed to
25764 _mono_class_get_instantiation_name() and made it public.
25766 2004-02-18 Martin Baulig <martin@ximian.com>
25768 * class.c (mono_class_inflate_generic_type): Clear the new
25769 instance's `nginst->klass' when inflating a generic instance.
25770 (mono_class_is_subclass_of): Added (basic) support for generic
25773 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
25775 * appdomain.h, domain.c: use a MonoCodeManager instead of a
25776 MonoMempool to hold compiled native code.
25778 2004-02-17 Martin Baulig <martin@ximian.com>
25780 * class.h (MonoDynamicGenericInst): Added `count_properties' and
25783 * reflection.c (mono_reflection_generic_inst_initialize): Added
25784 `MonoArray *properties' argument.
25786 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
25788 2004-02-17 Martin Baulig <martin@ximian.com>
25790 * icall.c (ves_icall_Type_GetFields): Renamed to
25791 ves_icall_Type_GetFields_internal() and added a
25792 `MonoReflectionType *rtype' argument; pass it to
25793 mono_field_get_object() to set the field's "reflected" type.
25794 (ves_icall_Type_GetConstructors): Likewise.
25795 (ves_icall_Type_GetEvents): Likewise.
25796 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
25797 argument; pass it to mono_method_get_object() to set the method's
25800 2004-02-17 Martin Baulig <martin@ximian.com>
25802 * class.h (MonoDynamicGenericInst): New type.
25803 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
25805 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
25806 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
25807 (ves_icall_MonoGenericInst_GetFields): New interncall.
25809 * class.c (mono_class_from_generic): Don't call
25810 mono_class_initialize_generic() if this is a dynamic instance;
25811 ie. it's being created from a TypeBuilder.
25812 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
25813 `class->byval_arg.type'.
25815 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
25816 to `inflate_method' and made static.
25817 (mono_reflection_inflate_field): Removed.
25818 (mono_reflection_generic_inst_initialize): New public method.
25820 * reflection.h (MonoReflectionGenericInst): Removed `methods',
25821 `ctors' and `fields'; added `initialized'.
25823 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
25825 * debug-helpers.c (mono_method_full_name): Fix output for empty
25828 2004-02-12 Martin Baulig <martin@ximian.com>
25830 * class.h (MonoClassField): Added `MonoType *generic_type'.
25832 * reflection.c (mono_image_get_fieldref_token): Added support for
25833 instantiated generic types.
25834 (field_encode_inflated_field): Removed.
25835 (mono_image_get_inflated_field_token): Removed.
25836 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
25838 * reflection.h (MonoReflectionInflatedField): Removed.
25840 2004-02-12 Martin Baulig <martin@ximian.com>
25842 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
25843 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
25845 * reflection.c (mono_image_get_methodspec_token): Take a
25846 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
25847 (mono_image_create_token): Check whether we have a
25848 `method->signature->gen_method' and call
25849 mono_image_get_methodspec_token() if appropriate.
25850 (inflated_method_get_object): Removed.
25851 (mono_reflection_bind_generic_method_parameters): Return a
25852 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
25853 (mono_reflection_inflate_method_or_ctor): Likewise.
25855 * reflection.h (MonoReflectionInflatedMethod): Removed.
25857 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
25859 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
25860 for custom valuetype marshalling.
25862 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
25864 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25866 * icall.c: fixed WSAGetLastError_internal name.
25868 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
25870 * threads.c (mono_thread_attach): Allow this to be called multiple
25871 times for a thread.
25873 * threads.c (build_wait_tids): Do not wait for ourselves.
25875 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
25876 appdomain list is empty.
25878 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
25879 memory returned by mono_string_builder_to_utf16, since it points into
25880 managed memory. Thanks to Bernie Solomon for noticing this.
25882 * icall.c: Add AppDomainSetup icalls.
25884 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
25886 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
25889 * reflection.c (reflection_methodbuilder_to_mono_method): Save
25890 custom attributes to the method_aux struct. Also fix array indexes etc.
25892 * loader.c (mono_method_get_param_names): Make dynamic case work again.
25894 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
25896 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
25897 (both static and runtime) and reduce startup time.
25899 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
25901 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
25902 AsAny marshalling conversion instead of crashing.
25904 * marshal.c: Fix warnings.
25906 2004-02-09 Martin Baulig <martin@ximian.com>
25908 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
25910 * reflection.h (MonoReflectionInflatedMethod): Removed the
25911 `declaring' field, it's now in the unmanaged MonoGenericMethod.
25913 * reflection.c (method_encode_methodspec): Removed the `method'
25914 argument; we get it from `gmethod->declaring'.
25915 (inflated_method_get_object): Removed the `declaring' argument.
25917 2004-02-09 Martin Baulig <martin@ximian.com>
25919 * class.h (MonoGenericMethod): New type.
25920 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
25923 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
25924 a `MonoGenericMethod *gen_method' one.
25926 * class.c (mono_class_inflate_generic_type): Take an additional
25927 `MonoGenericMethod * argument. This is only non-NULL if we're
25928 inflating types for a generic method.
25929 (mono_class_inflate_generic_signature): Renamed to
25930 inflate_generic_signature() and made static; take a
25931 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25932 (inflate_generic_header): Take a `MonoGenericMethod *' argument
25933 instead of a `MonoGenericInst *' one.
25934 (mono_class_inflate_generic_method): Likewise.
25936 * reflection.c (encode_generic_method_sig): Take a
25937 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25938 (method_encode_methodspec): Likewise.
25939 (inflated_method_get_object): Likewise.
25941 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
25942 field with a `MonoGenericMethod *gmethod' one.
25944 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
25946 * class.h (mono_class_has_parent): add parens to expansion
25949 2004-02-08 Martin Baulig <martin@ximian.com>
25951 * image.h (MonoImage): Removed `generics_cache'.
25953 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
25954 instead of a `MonoType *' argument; removed the `inflate_methods'
25955 argument. Don't inflate methods here.
25957 * loader.c (find_method): If it's a generic instance, call
25958 mono_class_init() on the `sclass->generic_inst->generic_type'.
25960 * metadata.c (mono_type_size): Make this work on uninitialized
25961 generic instances; call it on the `ginst->generic_type's class.
25963 * reflection.c (mono_reflection_bind_generic_parameters): Call
25964 mono_class_from_generic() to create the `ginst->klass'.
25966 2004-02-08 Martin Baulig <martin@ximian.com>
25968 * class.h (MonoClass): Changed type of `generic_inst' from
25969 `MonoType *' to `MonoGenericInst *'.
25971 2004-02-08 Martin Baulig <martin@ximian.com>
25973 * icall.c (ves_icall_Type_BindGenericParameters): Just call
25974 mono_type_get_object(), this is now creating a `MonoGenericInst'
25975 for MONO_TYPE_GENERICINST.
25976 (ves_icall_MonoGenericInst_GetParentType): Likewise.
25977 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25979 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
25980 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
25981 (inflated_method_get_object): Added `MonoClass *refclass' argument.
25982 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
25983 and reflected type.
25985 * reflection.h (MonoReflectionInflatedMethod): Removed
25986 `declaring_type' and `reflected_type'.
25988 2004-02-08 Martin Baulig <martin@ximian.com>
25990 * class.h (MonoGenericInst): Added `MonoType *parent' and
25991 `MonoType **ifaces'.
25993 * reflection.h (MonoReflectionGenericInst): Removed `klass',
25994 `parent' and `interfaces'.
25996 * reflection.c (mono_reflection_bind_generic_parameters): Take a
25997 `MonoType *' argument and return a `MonoType *'.
26000 (ves_icall_MonoGenericInst_GetParentType): New interncall.
26001 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
26003 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
26005 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
26006 valuetype marshalling.
26008 2004-02-06 Martin Baulig <martin@ximian.com>
26011 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
26012 (my_mono_class_from_generic_parameter): Likewise.
26014 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
26016 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
26017 contents of the symbol files lazily.
26019 * object.h (MonoThread): Add 'name' and 'name_len' fields.
26021 * threads.h threads.c icall.c: New icalls for getting and setting the
26024 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
26026 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
26027 Raise an exception when the domain is not found.
26029 2004-02-03 Martin Baulig <martin@ximian.com>
26031 * reflection.c (mono_image_get_methodspec_token): Use the
26032 uninflated signature; fixes gen-33.
26034 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
26036 * gc.c threads.c: Make the finalizer thread a normal managed thread so
26037 the finalizer code can use thread functionality.
26039 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
26040 the finalizer thread.
26042 * threads.c: Make some functions more robust.
26044 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
26046 * metadata.h: Add new marshalling conventions.
26048 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
26049 stringbuilder marshalling. Fixes #53700.
26051 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
26053 * reflection.c (mono_image_get_type_info): Save declarative security
26056 * reflection.c (mono_image_get_field_info): Handle uninitialized
26057 unmanaged fields as well.
26059 * appdomain.c: Bump corlib version.
26061 2004-02-01 Martin Baulig <martin@ximian.com>
26063 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
26064 method type arguments.
26066 2004-01-30 Duncan Mak <duncan@ximian.com>
26068 * marshal.h: Add prototype for
26069 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
26071 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
26074 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
26076 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
26077 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
26079 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
26081 * marshal.c (mono_marshal_get_native_wrapper): Add support for
26082 custom marshalling of valuetypes.
26084 * marshal.c: Fix some warnings.
26086 2004-01-29 Martin Baulig <martin@ximian.com>
26088 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
26089 for generic method parameters.
26091 * reflection.c (method_encode_methodspec): Write the uninflated
26092 signature into the methodspec table.
26093 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
26094 is always the uninflated method.
26095 (reflection_methodbuilder_to_mono_method): Copy the generic
26096 parameters from the MethodBuilder into `header->gen_params'.
26098 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
26100 * class.c (mono_class_from_generic_parameter): Fix warning.
26102 2004-01-27 Martin Baulig <martin@ximian.com>
26104 * class.c (mono_class_from_generic_parameter): Don't create
26105 `klass->methods' here.
26107 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
26109 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
26110 extension since it does not work with libraries named lib<FOO>.dll.so.
26112 2004-01-25 Martin Baulig <martin@ximian.com>
26114 * class.c (mono_class_inflate_generic_type): Added support for
26115 MONO_TYPE_GENERICINST.
26117 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
26118 inflate methods on open constructed types.
26120 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26122 * object.c: fire ProcessExit event in the root AppDomain after running
26123 Main. Fixes bug #53299.
26125 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
26127 * socket-io.c: include the new socket-wrappers.h header.
26128 Use the wrappers instead of the unix socket functions to make the code
26131 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
26133 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
26135 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
26138 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
26140 * reflection.c (mono_image_create_pefile): Handle the case when the
26141 entry point is not a MethodBuilder.
26143 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
26144 field to ReflectionMethod since it is not allways a builder.
26146 * reflection.c (type_get_fully_qualified_name): New helper function to
26147 return the fully qualified name of a type.
26149 * reflection.c (encode_marshal_blob): Always emit the fully qualified
26150 type name for custom marshallers.
26152 * reflection.c (mono_marshal_spec_from_builder): Ditto.
26154 * class.c (mono_class_setup_vtable): If a parent class already
26155 implements an interface, use the implementing methods from that class.
26158 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26160 * threadpool.c: just return instead of ExitThread to allow for thread
26163 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
26165 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
26166 when closing resource modules.
26168 * reflection.c (mono_image_create_pefile): Handle the case when the
26169 entry point is not a MethodBuilder.
26171 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
26172 field to ReflectionMethod since it is not allways a builder.
26174 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
26176 * marshal.c (mono_marshal_get_managed_wrapper):
26177 mono_marshal_alloc takes native int so CONV_I
26178 the arg for 64bits.
26180 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
26182 * reflection.c (fixup_cattrs): New function to fixup the methoddef
26183 tokens in the cattr table. Fixes #53108.
26185 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26187 * loader.c: don't trim ".dll" before looking up in the config file.
26188 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
26190 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
26192 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
26193 Return the module which contains the resource as well.
26194 (ves_icall_System_Reflection_Module_Close): New icall.
26196 * appdomain.c: Bump corlib version number.
26198 * image.c (mono_image_addref): New public function.
26200 * assembly.c: Call mono_image_addref.
26202 * reflection.c (mono_module_get_object): Increase reference count of
26205 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
26208 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
26209 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
26210 proper exceptions on DllImport problems.
26212 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
26214 * class.c, metadata.c: eliminate CSIZE macro.
26216 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
26218 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
26219 * object.h: Added async_callback field in MonoAsyncResult.
26220 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
26221 * verify.c: Added async_callback in MonoAsyncResult layout.
26223 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
26225 * reflection.c (mono_reflection_get_custom_attrs): Add support
26228 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
26230 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
26232 (mono_marshal_method_from_wrapper): Add null pointer check.
26234 2004-01-16 Martin Baulig <martin@ximian.com>
26236 * debug-mono-symfile.h: Set version number to 36 and reflect
26237 latest symbol writer changes.
26239 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
26241 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
26242 multi-dimensional arrays.
26243 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
26244 (mono_class_from_mono_type): Use bounded_array_class_get.
26246 * class.c (mono_bounded_array_class_get): New function which takes
26247 a 'bounded' bool argument to distinguish vectors from one dimensional
26250 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
26251 bounded_array_class_get if the array has bounds.
26253 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26254 Search modules loaded using AssemblyBuilder:AddModule as well.
26256 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26258 * appdomain.c: increased corlib version.
26259 * filewatcher.c: removed g_print.
26261 (get_property_info): only allocate what is actually requested.
26262 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
26264 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26266 * Makefile.am: added filewatcher.[ch]
26267 * filewatcher.[ch]: FileSystemWatcher runtime support.
26268 * icall.c: added new FSW icalls.
26270 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
26272 * string-icalls.c: fix stringbuilder regression as suggested by
26273 Iain McCoy <iain@mccoy.id.au>.
26275 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
26277 * process.c (process_read_stringtable_block): Recognize '007f' as
26278 a language neutral stringtable block.
26280 2004-01-12 Patrik Torstensson
26282 * object.h (MonoStringBuilder) : Changed layout to support our
26283 new stringbuilder class.
26284 * marshal.c: Change marshalling to support the new layout of
26286 * appdomain.c: increased version number because new layout of
26289 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
26291 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
26292 assembly name as an string instead of an AssemblyName, since it is
26293 easier to extract info from it.
26295 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
26296 the culture subdirectories too. Fixes #52231.
26298 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26300 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
26301 It takes 2 new parameters with an optional name for the method to look
26302 for and case ignoring info.
26304 * threadpool.c: removed unused variable.
26306 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26308 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
26309 It takes 2 new parameters with an optional name for the property to look
26310 for and case ignoring info.
26313 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
26315 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
26318 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26321 * assembly.c: escape the uri before passing it to g_filename_from_uri.
26324 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
26326 * reflection.c: Add support for more than one unmanaged resource.
26328 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
26329 in field->def_value, as done in all other cases.
26331 * reflection.c (mono_reflection_get_custom_attrs): Add support for
26334 * reflection.c (mono_reflection_create_runtime_class): Remove
26335 errorneous assignment to klass->element_class, since it is already
26336 done in mono_reflection_setup_internal_class.
26338 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26340 * gc.c: added missing LeaveCriticalSection.
26341 * icall.c: indented a couple of lines.
26342 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
26343 if we call EndInvoke inside a callback. Fixes bug #52601.
26345 2004-01-07 Martin Baulig <martin@ximian.com>
26347 * mono-debug-debugger.h
26348 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
26350 2004-01-06 Miguel de Icaza <miguel@ximian.com>
26352 * appdomain.c: Use messages in NotImplementedException.
26354 * exception.c (mono_get_exception_not_implemented): Now this takes
26355 a message argument.
26357 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
26358 exception instead of g_asserting an aborting when something is not
26361 Add some inline docs.
26363 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
26365 * reflection.h: Update after changes to object layout.
26367 * reflection.c: Implement saving of unmanaged aka win32 resources.
26369 * appdomain.c: Bump version number.
26371 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
26372 Handle missing domains gracefully.
26374 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
26376 * file-io.c : On Windows, there are much more invalid_path_chars.
26378 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
26380 * class.h, object.c: prepare for GetType () speedup.
26382 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
26384 * profiler.c: workaround for --profile null reference exception on
26385 cygwin. Patch by Patrik Torstensson.
26387 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
26389 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
26390 make work for unaligned access.
26392 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
26394 * class.c: small cleanup (class->fields [i] -> field).
26395 * image.c: check address of metadata is valid.
26397 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
26399 * assembly.h assembly.c (mono_assembly_loaded): New public function to
26400 search the list of loaded assemblies.
26402 * reflection.c (mono_reflection_type_from_name): Use
26403 mono_assembly_loaded instead of mono_image_loaded.
26405 * reflection.c: Fix warnings.
26407 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
26409 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
26410 is dynamic. This is needed since an assembly can contain both dynamic and
26411 non-dynamic images.
26413 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
26416 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
26418 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
26419 to store modules loaded using AddModule.
26421 * reflection.c (mono_image_fill_file_table): Generalize this so it works
26424 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
26426 * reflection.c (mono_image_fill_export_table_from_module): New function to
26427 fill out the EXPORTEDTYPES table from a module.
26429 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
26430 into a separate function. Also handle loaded non-dynamic modules.
26432 * reflection.c (mono_image_basic_init): Fix memory allocation.
26434 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26436 * assembly.c (mono_assembly_load_references): Make this public.
26438 2003-12-19 Martin Baulig <martin@ximian.com>
26440 * class.c (mono_class_initialize_generic): Made this static, take
26441 a `MonoGenericInst *' instead of a `MonoClass *'.
26442 (mono_class_from_generic): Call mono_class_initialize_generic()
26443 unless we're already initialized or being called from
26444 do_mono_metadata_parse_generic_inst().
26446 * class.h (MonoGenericInst): Added `initialized' and
26447 `init_pending' flags.
26449 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
26450 `mono_class_init (gklass)' or mono_class_initialize_generic()
26451 here; set `generic_inst->init_pending' while parsing the
26454 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
26456 * locales.c: include string.h for memxxx prototypes
26458 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
26460 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
26461 constructor when accessing literal fields.
26463 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
26465 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26467 * reflection.c (assembly_add_resource_manifest): New function to fill
26468 the MANIFESTRESOURCE table.
26470 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
26472 * reflection.h: Update to changes in class layout.
26474 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
26475 Reenable call to mono_runtime_is_shutting_down ().
26477 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
26478 determine if the runtime is shutting down.
26480 2003-12-16 Jackson Harper <jackson@ximian.com>
26482 * icall.c: comment out call to mono_runtime_is_shutting_down to
26485 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
26487 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
26488 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
26490 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
26492 * reflection.c: move definition of swap_with_size
26493 to before its first call
26495 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
26497 * appdomain.c (mono_runtime_is_shutting_down): New public function.
26499 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
26502 * object.c: Fix warnings.
26504 * icall.c (ves_icall_Type_Get...): Only consider inherited static
26505 members if FlattenHierarchy is set.
26507 * reflection.c (mono_image_add_decl_security): New function to emit
26508 declarative security.
26510 * reflection.h reflection.c: Add support for declarative security.
26512 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
26514 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
26516 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
26518 * appdomain.c verify.c: Moved corlib version checking into its own
26519 function in appdomain.c since it needs to create vtables etc.
26521 2003-12-13 Patrik Torstensson <p@rxc.se>
26523 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
26524 instead of unwrapped server.
26526 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
26528 * verify.c (check_corlib): Fix field index.
26530 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
26532 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
26535 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
26537 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
26538 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
26539 cope with sizeof(size_t) != sizeof(guint32).
26541 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26543 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
26544 in case of failure.
26546 2003-12-10 Mark Crichton <crichton@gimp.org>
26548 * icall.c: removed the GetNonZeroBytes. We now handle this case
26551 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
26553 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
26555 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
26558 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
26560 * verify.c (check_corlib): Handle the case when the version field is
26561 initialized by a static constructor.
26563 2003-12-08 Patrik Torstensson <p@rxc.se>
26565 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
26567 2003-12-08 Martin Baulig <martin@ximian.com>
26569 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
26570 a MonoReflectionGenericParameter, also take the parameter index
26571 and name as arguments.
26572 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
26573 (ves_icall_MonoGenericParam_initialize): New interncall.
26574 (ves_icall_Type_make_byref_type): New interncall.
26576 * reflection.h (MonoReflectionGenericParam): Derive from
26577 MonoReflectionType, not just from MonoObject. Added `refobj' and
26580 * reflection.c (mono_reflection_define_generic_parameter): Create
26581 and return a new MonoReflectionGenericParam; don't initialize the
26583 (mono_reflection_initialize_generic_parameter): New public method;
26584 initializes the constraints and creates the `param->pklass'.
26586 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
26588 * reflection.h reflection.c: Use the new fields 'num_types',
26589 'num_fields' and 'num_methods' to track the number of types etc.
26591 * verify.c (check_corlib): Check corlib version number.
26593 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
26595 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
26596 function works on all methods.
26598 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
26600 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
26601 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
26602 the custom_type_info flag of the transparent proxy.
26603 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
26604 objects that supports IRemotingTypeInfo.
26605 * object.h: Added custom_type_info field in transparent proxy.
26607 2003-12-06 Martin Baulig <martin@ximian.com>
26609 * class.c (mono_class_create_from_generic): Removed.
26610 (mono_class_from_generic): Check `ginst->klass' before doing
26611 anything else. This is important to fully support "recursive"
26614 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
26615 empty `generic_inst->klass' before doing anything else.
26617 2003-12-06 Dick Porter <dick@ximian.com>
26622 * locales.c: Use C structs to access class fields. Don't do a
26623 conversion between MonoString and UChar because both are
26624 platform-endian UTF-16. Compare now takes startindex and count
26625 parameters. Add a char overload for IndexOf. Speed up the
26626 invariant string IndexOf.
26628 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
26630 * Makefile.am (monosn_LDADD): Fix parallel build.
26632 2003-12-04 Martin Baulig <martin@ximian.com>
26635 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26636 (ves_icall_Type_make_array_type): New interncall.
26638 2003-12-04 Martin Baulig <martin@ximian.com>
26640 * locales.c: also change it in the !HAVE_ICU case.
26642 2003-12-04 Dick Porter <dick@ximian.com>
26645 * locales.c: construct_compareinfo is now in CompareInfo, not
26648 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
26650 * image.c (mono_image_load_file_for_image): Cache loaded images in the
26651 image->files array.
26653 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
26656 * assembly.c (mono_assembly_load_references): Only load references
26659 * class.c (mono_class_from_name): Avoid linear search of the
26660 EXPORTEDTYPE table.
26662 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
26664 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
26666 * image.h (MonoImage): Add 'field_cache' field.
26668 * loader.c (mono_field_from_token): Cache field lookups.
26670 * reflection.c (mono_module_get_object): Fix name property.
26672 * icall.c (ves_icall_get_enum_info): Update after changes to
26673 mono_metadata_get_constant_index ().
26675 * icall.c: Get rid of get_type_info icall, use a separate icall for
26676 each type property to avoid needless memory allocations. Fixes #51514.
26678 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
26679 to avoid needless binary searches.
26681 * class.c (class_compute_field_layout): Move the initialization of
26682 field->def_value to mono_class_vtable ().
26684 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
26687 * object.c (mono_object_allocate): Make it inline.
26689 * object.c (mono_object_allocate_spec): Make it inline.
26691 2003-12-02 Dick Porter <dick@ximian.com>
26693 * locales.c (create_NumberFormat): NumberFormatInfo construction.
26694 Patch by Mohammad DAMT (mdamt@cdl2000.com).
26696 2003-12-01 Dick Porter <dick@ximian.com>
26698 * threads.c: Fix signature and call in CreateMutex and
26701 2003-12-01 Dick Porter <dick@ximian.com>
26704 * locales.c: Implement string compares and searching
26706 * object.h: Add extra Thread field
26708 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
26710 * reflection.c (fixup_method): Add support for MonoCMethod.
26712 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
26714 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
26716 * reflection.c (assembly_name_to_aname): Allow extra characters in
26717 assembly names. Fixes #51468.
26719 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
26721 * exception.c (mono_exception_from_name_domain): New helper function.
26723 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
26724 exception object in the correct domain.
26726 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
26727 formatting + make a copy a the input data.
26729 * loader.c (mono_get_method_from_token): Methods which contain
26730 native code do not have entries in the ImplMap.
26732 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
26733 Thanks to Gonzalo for spotting this.
26735 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
26736 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
26738 * assembly.h (mono_assembly_load_from): Split the second part of
26739 assembly loading into a new public function.
26741 * exception.h (mono_get_exception_bad_image_format): New function.
26743 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
26745 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26746 Enumerate all modules inside a dynamic assembly. Fixes #51293.
26748 * icall.c: Add new icall for creating dynamic methods.
26750 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
26752 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
26754 * reflection.c (mono_reflection_create_dynamic_method): New icall to
26755 create a dynamic method.
26757 * reflection.c (resolve_object): New helper function.
26759 * reflection.c: Generalize ReflectionMethodBuilder and the functions
26760 which manipulate it so they can also work on dynamic methods.
26762 * reflection.c (reflection_method_builder_to_mono_method): Avoid
26763 creating the MonoReflectionMethodAux structure if it is not needed.
26765 * reflection.h verify.c: Update after changes to object layout.
26767 * reflection.c (method_builder_encode_signature): Fix compilation on
26770 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
26772 * appdomain.h: Added support for context static fields. Added static_data
26773 field to MonoAppContext and renamed thread_static_fields to a more
26774 generic special_static_fields in MonoAppDomain, since it can now contain
26775 context static fields.
26776 * domain.c: Updated hashtable name.
26777 * object.c: Replaced field_is_thread_static() for a more generic
26778 field_is_special_static() which also checks for context static attribute.
26779 In mono_class_vtable(), added support for static context fields.
26780 * threads.c: Changed methods that manage thread static fields to more
26781 generic methods so they can be reused both for thread and context static
26783 * threads.h: Declared some new methods.
26785 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
26787 * reflection.h: Update after changes to the managed types.
26789 * reflection.c (encode_custom_modifiers): New helper function.
26791 * reflection.c (method_encode_signature): Emit custom modifiers.
26793 * reflection.c (field_encode_signature): Emit custom modifiers.
26795 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
26797 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
26799 * icall.c (ves_icall_System_ValueType_Equals): New optimized
26802 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
26805 * object.c (mono_field_get_value_object): New function.
26807 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
26810 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
26812 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
26813 return a preallocated out-of-memory exception instance.
26815 * object.c (out_of_memory): Use the new function.
26817 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
26818 flag is before the custom modifiers. Fixes #49802.
26820 2003-11-16 Martin Baulig <martin@ximian.com>
26822 * class.c (mono_class_is_open_constructed_type): Implemented the
26823 MONO_TYPE_GENERICINST case.
26825 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
26827 * assembly.c (mono_assembly_fill_assembly_name): New function to
26828 fill out the MonoAssemblyName structure.
26829 (mono_assembly_open): Use the new function.
26831 * icall.c (fill_reflection_assembly_name): New helper function.
26833 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
26836 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
26838 2003-11-15 Martin Baulig <martin@ximian.com>
26840 * class.c (mono_class_is_open_constructed_type): New public
26841 function; checks whether a type is an open constructed type,
26842 ie. whether it still contains type parameters.
26843 (mono_class_inflate_generic_type): If we're a type parameter and
26844 the inflated type is also a MONO_TYPE_(M)VAR, return the original
26847 * class.h (MonoGenericInst): Added `guint32 is_open'.
26849 * loader.c (method_from_methodspec): Check whether we're an open
26850 or closed constructed type and set `ginst->is_open'.
26852 * reflection.c (mono_reflection_bind_generic_parameters): Check
26853 whether we're an open or closed constructed type and set
26855 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
26856 from open constructed types.
26858 2003-11-15 Martin Baulig <martin@ximian.com>
26860 * reflection.c (mono_reflection_bind_generic_parameters): If we're
26861 a generic instance (instead of a generic type declaration) with
26862 unbound generic parameters, bind them to our actual types.
26864 2003-11-14 Martin Baulig <martin@ximian.com>
26866 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
26868 * reflection.c (mono_reflection_bind_generic_parameters): If we're
26869 an interface type, populate `res->interfaces' with instantiated
26870 versions of all the interfaces we inherit.
26872 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
26874 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
26875 when MONO_PATH is set but doesn't contain the install dir.
26877 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26880 (ves_icall_Type_GetInterfaces): don't return an interface twice when
26881 it's also implemented in base classes. Fixes bug #50927.
26883 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
26885 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
26886 if this method is called from a finalizer. Fixes #50913.
26888 2003-11-12 Miguel de Icaza <miguel@ximian.com>
26890 * threads.c: Implement VolatileRead/VolatileWrite
26892 * icall.c: Add new icalls for VolatileRead/VolatileWrite
26894 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26896 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
26897 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
26900 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
26901 from Peter Ross (pro@missioncriticalit.com).
26903 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
26905 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
26907 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26909 * assembly.c (mono_assembly_load_references): Disable check because it
26910 triggers on older corlibs which lots of people have.
26912 2003-11-12 Jackson Harper <jackson@ximian.com>
26914 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
26915 load corlib.dll if mscorlib.dll is not found.
26916 * assembly.h: Remove corlib name define.
26919 * image.c: Change corlib name to mscorlib.
26921 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26923 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
26925 2003-11-11 Miguel de Icaza <miguel@ximian.com>
26927 * appdomain.h: Added loader_optimization here to sync with the C#
26928 code, and add disallow_binding_redirects field.
26930 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26932 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
26934 * reflection.c (mono_image_build_metadata): Fix crash on modules
26937 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
26939 * icall.c (ves_icall_get_method_info): Return callingConvention as
26942 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
26943 namespaces from the EXPORTEDTYPE table as well.
26945 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
26946 from all modules inside the assembly.
26948 2003-11-11 Martin Baulig <martin@ximian.com>
26950 * reflection.c (mono_reflection_bind_generic_parameters): Make
26951 this work for interfaces.
26953 2003-11-11 Martin Baulig <martin@ximian.com>
26955 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
26957 2003-11-11 Martin Baulig <martin@ximian.com>
26959 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
26960 "MonoInflatedMethod" and "MonoInflatedCtor".
26962 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26964 * reflection.c (resolution_scope_from_image): Use the assembly table
26965 from the manifest module, since other modules don't have it.
26967 * debug-helpers.c (mono_type_full_name): New helper function.
26969 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
26971 * image.c (mono_image_load_file_for_image): New public function which
26972 is a replacement for the load_file_for_image in class.c.
26974 * assembly.c (mono_assembly_load_module): A wrapper for the function
26975 above which does assembly association and reference loading too.
26977 * class.c (mono_class_from_name): Call mono_assembly_load_module.
26979 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26981 * appdomain.c: not all of the attributes for the full assembly name
26982 are required and the order doesn't matter. Fixes bug #50787.
26984 2003-11-10 Dick Porter <dick@ximian.com>
26986 * locales.c: Use platform-endian UTF16
26988 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
26990 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26992 2003-11-10 Martin Baulig <martin@ximian.com>
26995 (mono_metadata_load_generic_params): Make this actually work.
26997 * reflection.c (mono_reflection_bind_generic_parameters): If our
26998 parent is a generic instance, pass all the `types' to it, no
26999 matter whether it has the same number of type parameters or not.
27001 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
27003 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
27005 * assembly.c (mono_assembly_load_references): Move the image<->assembly
27006 assignment code to this function so it gets called recursively for all
27009 * image.c (load_modules): Remove the assembly assignment since it is
27010 now done by mono_assembly_load_references.
27012 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
27013 Add 'module' argument.
27014 (mono_module_get_types): New helper function.
27015 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
27017 2003-11-08 Martin Baulig <martin@ximian.com>
27019 * class.c (mono_class_inflate_generic_method): Interface method
27020 don't have a header.
27022 * reflection.c (mono_image_get_methodspec_token): Take an
27023 additional `MonoGenericInst *' argument instead of reading it from
27024 the header; this is necessary to support interfaces.
27025 (mono_image_create_token): Pass the `MonoGenericInst *' from the
27026 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
27027 (inflated_method_get_object): Take an additional `MonoGenericInst *'
27030 * reflection.h (MonoReflectionInflatedMethod): Added
27031 `MonoGenericInst *ginst'.
27033 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
27035 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
27037 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
27039 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
27041 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
27044 (reflection_methodbuilder_from_method_builder):
27045 (reflection_methodbuilder_from_ctor_builder): New helper functions to
27046 initialize a ReflectionMethodBuilder structure.
27047 (mono_image_get_methodbuilder_token):
27048 (mono_image_get_ctorbuilder_token): New functions to emit memberref
27049 tokens which point to types in another module inside the same assembly.
27051 * reflection.c: Use the new helper functions.
27053 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
27055 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
27056 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
27058 * reflection.c (resolution_scope_from_image): Emit a moduleref if
27061 * reflection.c (mono_image_build_metadata): Emit metadata only for the
27062 current module. Emit the manifest only for the main module.
27064 * reflection.c (mono_image_create_token): Add assertion when a
27065 memberref needs to be created.
27067 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
27069 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
27070 larger buffer for the custom attribute blob. Fixes #50637.
27072 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27074 * threadpool.c: notify listener on async processing handles after
27075 invoking the async callback. Thanks to Zoltan.
27077 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
27079 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
27080 avoid code duplication.
27082 * reflection.h (MonoDynamicImage): New type which is currently unused,
27083 but will be used through the ref.emit code in place of
27084 MonoDynamicAssembly.
27086 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
27089 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
27090 a MonoDynamicImage instead of just a MonoImage.
27092 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
27093 icalls to ModuleBuilder but keep their semantics, so they will work
27094 with moduleb->assemblyb. This will change later.
27096 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
27098 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
27101 * reflection.c (mono_image_build_metadata): Avoid creation of a default
27102 main module, since it is now done by the managed code.
27104 2003-11-03 Martin Baulig <martin@ximian.com>
27106 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
27107 `ginst->klass' here.
27108 (method_encode_methodspec): Don't use the `ginst->generic_method's
27109 klass if it's a generic instance, use `ginst->klass' in this case.
27111 2003-11-03 Martin Baulig <martin@ximian.com>
27113 * reflection.c (mono_image_get_generic_method_param_info):
27114 Removed, use mono_image_get_generic_param_info() instead.
27115 (mono_image_get_type_info): Write the GenericParam table before
27116 the Method table. This is neccessary because in the GenericParam
27117 table, type parameters of the class (ie. '!0' etc.) must come
27118 before the ones from its generic methods (ie. '!!0' etc).
27120 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
27122 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
27124 2003-11-02 Martin Baulig <martin@ximian.com>
27126 * reflection.c (create_generic_typespec): Take a
27127 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
27128 the generic parameters from it.
27130 2003-11-02 Martin Baulig <martin@ximian.com>
27132 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
27133 instead of a `MonoClassField *' since we just need the type.
27134 (create_generic_typespec): New static function. Creates a
27135 TypeSpec token for a generic type declaration.
27136 (mono_image_get_generic_field_token): New static function.
27137 (mono_image_create_token): If we're a FieldBuilder in a generic
27138 type declaration, call mono_image_get_generic_field_token() to get
27141 2003-11-02 Martin Baulig <martin@ximian.com>
27144 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
27145 `MonoReflectionGenericInst *declaring_type' and
27146 `MonoReflectionGenericInst *reflected_type' fields.
27148 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
27149 `MonoReflectionGenericInst *declaring_type' and a
27150 `MonoReflectionGenericInst *reflected_type' argument instead of a
27151 single `MonoReflectionGenericInst *type' one. Set
27152 `res->declaring_type' and `res->reflected_type' from them.
27153 (mono_reflection_inflate_field): Likewise.
27155 2003-11-02 Martin Baulig <martin@ximian.com>
27157 * class.c (mono_class_setup_vtable): Don't store generic methods
27160 2003-11-02 Martin Baulig <martin@ximian.com>
27162 * reflection.h (MonoReflectionGenericInst): Added
27163 `MonoReflectionType *declaring_type'.
27165 * reflection.c (mono_reflection_bind_generic_parameters): Use
27166 `if (tb->parent)' instead of `klass->parent'.
27168 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
27170 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
27171 with an empty ASSEMBLY table.
27173 * reflection.c (mono_image_build_metadata): Avoid using the same loop
27174 variable in the inner and outer loops.
27176 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
27178 * metadata.h (mono_metadata_make_token): Put parentheses around macro
27181 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
27183 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
27184 icalls. Instead, do everything in managed code. This is needed since
27185 it is hard to restore the original domain etc. in unmanaged code in the
27186 presence of undeniable exceptions.
27188 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
27189 New icalls to push and pop appdomain refs.
27191 2003-10-31 Martin Baulig <martin@ximian.com>
27193 * class.c (inflate_generic_type): Renamed to
27194 mono_class_inflate_generic_type() and made it public.
27196 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
27199 * loader.c (mono_field_from_memberref): Also set the retklass for
27202 * fielder.c (mono_image_get_inflated_field_token): New static
27203 method; creates a metadata token for an inflated field.
27204 (mono_image_create_token, fixup_method): Added support for
27205 "MonoInflatedField".
27206 (fieldbuilder_to_mono_class_field): New static function.
27207 (mono_reflection_inflate_field): New public function.
27210 (MonoReflectionGenericInst): Added `MonoArray *fields'.
27211 (MonoReflectionInflatedField): New typedef.
27213 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
27215 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
27216 for Solaris and other platforms without s6_addr16
27218 2003-10-30 Martin Baulig <martin@ximian.com>
27220 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
27221 argument instead of two.
27222 (mono_class_inflate_generic_signature): Likewise.
27223 (inflate_generic_header): Likewise.
27224 (mono_class_inflate_generic_method): Likewise. In addition, if
27225 `ginst->klass' is set, it becomes the new `method->klass'.
27227 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
27230 * reflection.c (encode_generic_method_sig): Write a 0xa as the
27231 first byte. [FIXME]
27232 (method_encode_methodspec): If we have generic parameters, create
27233 a MethodSpec instead of a MethodRef.
27234 (fixup_method): Added support for "MonoInflatedMethod" and
27235 "MonoInflatedCtor".
27236 (mono_image_create_token): Added support for "MonoInflatedMethod"
27237 and "MonoInflatedCtor".
27238 (inflated_method_get_object): New static function; returns a
27239 managed "System.Reflection.MonoInflatedMethod" object.
27240 (mono_reflection_bind_generic_method_parameters): Return a
27241 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
27242 (mono_reflection_inflate_method_or_ctor): Likewise.
27243 (mono_image_get_generic_method_param_info): Initialize unused
27245 (mono_image_get_generic_param_info): Likewise.
27247 * reflection.h (MonoReflectionInflatedMethod): New public
27248 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
27249 "S.R.MonoInflatedCtor" classes.
27251 * loader.c (method_from_memberref): If we're a TypeSpec and it
27252 resolves to a generic instance, inflate the method.
27254 2003-10-28 Dick Porter <dick@ximian.com>
27256 * object.c (mono_runtime_run_main): Convert command-line arguments
27257 into utf8, falling back to the user's locale encoding to do so.
27259 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
27261 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
27264 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
27266 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
27267 up icalls at method definition time. Partially fixes #33569.
27269 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
27271 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
27272 marshalling of arrays. Fixes #50116.
27274 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
27276 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
27277 points to a vtable in the dying appdomain.
27279 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
27280 listeners into unmanaged code inside the lock.
27282 * object.c (mono_class_vtable): Turn off typed allocation in non-root
27283 domains and add some comments.
27285 2003-10-25 Martin Baulig <martin@ximian.com>
27287 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
27289 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
27291 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
27292 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
27293 currently parsing. Create the generic class and store it in
27294 `generic_inst->klass' before parsing the type arguments. This is
27295 required to support "recursive" definitions; see mcs/tests/gen-23.cs
27297 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
27298 to support recursive typespec entries.
27300 * class.c (mono_class_setup_parent): If our parent is a generic
27301 instance, we may get called before it has its name set.
27302 (mono_class_from_generic): Splitted into
27303 mono_class_create_from_generic() and mono_class_initialize_generic().
27305 2003-10-25 Martin Baulig <martin@ximian.com>
27307 * icall.c (ves_icall_Type_BindGenericParameters): Return a
27308 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
27309 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
27310 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
27312 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
27313 (create_typespec): Likewise.
27314 (mono_reflection_bind_generic_parameters): Return a
27315 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
27316 (mono_reflection_inflate_method_or_ctor): New public function.
27318 * reflection.h (MonoReflectionGenericInst): New typedef.
27320 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
27322 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
27323 inside the domain lock. Fixes #49993.
27325 * object.c (mono_class_vtable): When typed allocation is used,
27326 allocate vtables in the GC heap instead of in the mempool, since the
27327 vtables contain GC descriptors which are used by the collector even
27328 after the domain owning the mempool is unloaded.
27330 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
27332 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
27333 reflect what it does. Also invalidate mempools instead of freeing
27334 them if a define is set.
27336 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
27339 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
27340 hold the finalizable objects in this domain.
27342 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
27345 * appdomain.c (mono_domain_set): New function to set the current
27346 appdomain, but only if it is not being unloaded.
27348 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
27349 appdomain which is being unloaded.
27351 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
27352 unloading of the root appdomain.
27354 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
27355 icall to execute a method in another appdomain. Intended as a
27356 replacement for InternalSetDomain, which can confuse the code
27357 generation in the JIT.
27359 * appdomain.c (mono_domain_is_unloading): New function to determine
27360 whenever an appdomain is unloading.
27362 * appdomain.c (mono_domain_unload): New function to correctly unload
27365 * assembly.c (mono_assembly_load_references): Check that an assembly
27366 does not references itself.
27368 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
27369 domain manually, it asks the finalizer thread to do it, then waits for
27370 the result. Also added a timeout.
27372 * icall.c: Register the new icalls.
27374 * threads.h threads.c: Export the mono_gc_stop_world and
27375 mono_gc_start_world functions.
27377 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
27378 function to fill out the mempool with 0x2a.
27380 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
27382 * reflection.h (MonoReflectionMethodAux): New structure to store
27383 information which is rarely used, thus is not in the MonoMethod
27386 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
27387 store the aux info.
27389 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
27390 and marshalling info into the aux structure.
27392 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
27393 from the aux structure.
27395 * loader.c (mono_method_get_param_names): Retrieve the param names from
27398 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
27400 * exception.h exception.c: Add AppDomainUnloadedException && fix
27403 2003-10-21 Dick Porter <dick@ximian.com>
27406 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
27407 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
27409 2003-10-21 Martin Baulig <martin@ximian.com>
27411 * reflection.c (mono_reflection_bind_generic_parameters):
27412 `klass->parent' is NULL for interfaces.
27414 2003-10-21 Martin Baulig <martin@ximian.com>
27416 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27418 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
27420 * exception.c (mono_exception_from_name_msg): New helper function for
27421 creating exceptions and initializing their message field.
27423 * exception.c: Simplify functions using the new helper.
27425 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
27428 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
27429 mono_raise_exception, since otherwise gcc doesn't generate the function
27430 epilog for raise_exception, confusing the stack unwinding in the JIT.
27433 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
27434 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
27437 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27439 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
27442 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
27444 * icall.c: Removed GetUninitializedObject method because
27445 AllocateUninitializedClassInstance does the same.
27447 2003-10-18 Martin Baulig <martin@ximian.com>
27449 * class.c (inflate_generic_signature): Renamed to
27450 mono_class_inflate_generic_signature() and made it public.
27451 (my_mono_class_from_generic_parameter): New static function; if we
27452 don't already have the generic parameter's MonoClass, create a
27453 very simple one which is just used internally in the runtime and
27454 not passed back to managed code.
27456 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
27458 * metadata.h (MonoMethodSignature): Moved the
27459 `MonoGenericParam *gen_params' to the MonoMethodHeader.
27460 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
27462 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
27463 ves_icall_MonoMethod_GetGenericArguments(); this is now an
27464 interncall on the MonoMethod class, not on MethodInfo.
27465 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
27466 calling mono_reflection_bind_generic_method_parameters() directly.
27468 * loader.c (mono_method_get_signature): If this is a MethodSpec;
27469 return the already computed `method->signature'.
27470 (method_from_methodspec): New static function to load a method
27471 from a MethodSpec entry.
27472 (mono_get_method_from_token): Call the new method_from_methodspec()
27473 for MethodSpec tokens.
27474 (mono_get_method_from_token): If we're a generic method, load the
27477 * reflection.c (mono_image_get_memberref_token): Allow
27478 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
27480 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
27481 (mono_image_create_token): First check whether it's a generic
27482 method (so we'd need to create a MethodSpec), then do the other
27484 (mono_reflection_bind_generic_method_parameters): Return a
27485 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
27486 called directly from the interncall.
27488 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
27490 * reflection.c (load_public_key): Move loading of the public key
27493 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
27495 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
27498 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
27499 culture, hash_alg and public_key. Fixes #49555.
27501 2003-10-17 Martin Baulig <martin@ximian.com>
27503 * class.h (MonoGenericInst): Moved this declaration here and added
27504 `MonoMethod *generic_method'.
27507 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
27508 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
27510 * metadata.c (mono_metadata_type_equal): Two types of
27511 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
27512 index; ie. don't compare the address of the `MonoGenericParam'
27514 (mono_metadata_load_generic_params): Removed the `MonoMethod
27517 * metadata.h (MonoGenericInst): Moved declaration to class.h.
27518 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
27520 * reflection.c (method_encode_signature): Encode the number of
27521 generic parameters.
27522 (encode_generic_method_sig): New static function.
27523 (method_encode_methodspec): New static function; creates an entry
27524 in the MethodSpec table for a generic method.
27525 (mono_image_get_methodspec_token): New static function.
27526 (mono_image_create_token): Call mono_image_get_methodspec_token()
27527 for generic methods.
27528 (mono_reflection_bind_generic_method_parameters): New public
27529 function. Instantiates a generic method.
27531 2003-10-16 Martin Baulig <martin@ximian.com>
27533 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
27534 *gen_params' here from MonoMethodHeader.
27536 * metadata.c (mono_metadata_parse_method_signature): If we have
27537 generic parameters, initialize `method->gen_params' and then set
27538 the correct `type->data.generic_param' in all the parameters.
27540 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
27542 * threads.c (mono_threads_get_default_stacksize): New function to
27543 return the default stacksize.
27545 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
27546 termination of the finalizer thread, since the previous method had
27547 race conditions. Fixes #49628.
27549 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
27550 as for the other managed threads.
27552 2003-10-16 Martin Baulig <martin@ximian.com>
27554 * class.c (inflate_generic_signature): Copy `generic_param_count'
27557 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
27560 * metadata.c (mono_metadata_parse_method_signature): Actually set
27561 the `method->generic_param_count' here.
27562 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
27564 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
27566 * object.h: Add a new field to TypedRef to simplify the implementation
27567 of the REFANY opcodes in the JIT.
27569 * icall.c: Make use of the new field.
27571 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
27574 2003-10-15 Martin Baulig <martin@ximian.com>
27576 * class.c (mono_class_from_gen_param): Renamed to
27577 mono_class_from_generic_parameter() and moved most of the
27578 functionality from mono_reflection_define_generic_parameter()
27579 here; ie. we create a "real" class here.
27580 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
27581 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
27582 previously been called.
27584 * class.h (MonoGenericParam): Moved the declaration of this struct
27585 here from metadata.h and added `MonoMethod *method'.
27587 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
27590 * loader.c (mono_get_method_from_token): If we have any generic
27591 parameters, call mono_metadata_load_generic_params() to read them
27592 from the MONO_TABLE_GENERICPAR.
27594 * metadata.c (mono_metadata_load_generic_params): Added
27595 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
27597 * metadata.h (MonoMethodSignature): Replaced
27598 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
27599 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
27601 * reflection.c (mono_reflection_define_generic_parameter): Moved
27602 most of the functionality into the new
27603 mono_class_from_generic_parameter(); set the `method' field if
27604 we're a method parameter.
27606 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
27608 * marshal.c (emit_struct_conv): if native size is 0
27611 2003-10-14 Martin Baulig <martin@ximian.com>
27613 * icall.c: The generics API has changed in the spec since it was
27614 added to System.Type; these modifications make it match the spec
27616 (ves_icall_Type_GetGenericParameters): Renamed to
27617 `ves_icall_Type_GetGenericArguments'.
27618 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
27619 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
27620 `ves_icall_MonoType_get_HasGenericArguments'.
27621 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
27622 `ves_icall_MonoType_get_IsGenericParameter'.
27623 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
27624 this is no interncall anymore.
27625 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
27626 `ves_icall_TypeBuilder_get_IsGenericParameter'.
27628 2003-10-14 Martin Baulig <martin@ximian.com>
27630 * reflection.c (mono_reflection_bind_generic_parameters): Also
27631 inflate generic methods if we're reading the class from IL.
27633 2003-10-13 Martin Baulig <martin@ximian.com>
27635 * reflection.c (mono_reflection_define_generic_parameter): This
27636 method isn't called directly from the icall anymore; take a
27637 `MonoReflectionAssemblyBuilder *' so we can use this for type and
27638 method generic parameters.
27639 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
27640 (method_builder_encode_signature): Encode generic parameters.
27641 (mono_image_get_method_info): Write generic params to the
27642 MONO_TABLE_GENERICPARAM table.
27644 * reflection.h (MonoReflectionMethodBuilder): Added
27645 `MonoArray *generic_params'.
27647 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
27649 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
27650 wrapper for mono_reflection_define_generic_parameter().
27651 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
27653 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
27655 * marshal.h: Add missing function to fix build.
27657 * marshal.c (mono_marshal_get_native_wrapper): Add support for
27658 the SetLastError pinvoke attribute.
27660 * marshal.c (mono_marshal_set_last_error): New helper function called
27661 by the generated code.
27663 * marshal.c (mono_mb_emit_branch): New helper function.
27665 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
27667 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
27668 classes as parameters and return values of delegates. Fixes #29256.
27670 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
27672 * locales.c: use gint32 in non HAVE_ICU case
27674 2003-10-11 Martin Baulig <martin@ximian.com>
27676 * mono-debug.c (mono_debug_add_method): Added a workaround for
27679 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
27681 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
27682 delegates passed to native code must use the STDCALL calling
27683 convention. Fixes #35987.
27685 2003-10-10 Martin Baulig <martin@ximian.com>
27687 * class.c (inflate_generic_type): If we're inflating for a generic
27688 type instance (and not for a generic method), return
27689 MONO_TYPE_MVAR unchanged.
27691 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27693 * string-icalls.c: Join ignores null strings in the source array.
27694 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
27695 * threads.c: GetAvailableTheads is slightly more accurate.
27697 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
27699 * threads.h threads.c : add mono_threads_set_default_stacksize
27700 and pass default to CreateThread calls.
27702 2003-10-09 Dick Porter <dick@ximian.com>
27706 * locales.c: Internal calls for constructing CultureInfo and
27707 related objects from libicu (if its available.)
27709 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
27711 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
27713 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27715 * threadpool.c: added an argument to async_invoke_thread that is the
27716 item to process, pass the MonoAsyncResult to the thread start function
27717 when creating a new thread. This way we don't need to acquire any lock
27718 when we're creating a new thread. Readded a semaphore for faster
27719 response times (instead of that Sleep i added).
27721 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
27723 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
27724 get daylight change dates better on Windows, fix handling
27725 of platforms without tm_gmtoff.
27727 2003-10-06 Martin Baulig <martin@ximian.com>
27729 * class.c (inflate_generic_method): Renamed to
27730 mono_class_inflate_generic_method() and made public.
27731 (mono_class_init): Don't inflate the generic methods here.
27732 (mono_class_from_generic): Added `gboolean inflate_methods'
27733 argument. Inflate the methods here.
27735 * loader.c (mono_method_get_param_names): Ignore instances of
27736 generic types for the moment.
27738 * reflection.c (fixup_method): Added support for inflated methods.
27739 (mono_image_create_token): Use mono_image_get_methodref_token()
27740 for inflated methods.
27741 (mono_custom_attrs_from_param): Ignore instances of generic types
27743 (mono_reflection_bind_generic_parameters): New public function.
27744 Moved all the functionality from
27745 ves_icall_Type_BindGenericParameters() here and added support for
27747 (mono_reflection_define_generic_parameter): Initialize
27748 `klass->methods' here.
27750 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
27751 functionality into mono_reflection_define_generic_parameter().
27752 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
27753 TypeBuilder, return that TypeBuilder.
27755 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27757 * appdomain.c: removed mono_delegate_semaphore.
27760 (mono_thread_pool_add): moved hash table creation inside and the thread
27761 creation outside of the critical region.
27762 (mono_thread_pool_finish): removed obsolete code.
27763 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
27764 continue or exit the thread depending on the queue.
27766 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
27768 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
27769 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
27770 handle more bool marshalling options
27772 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
27774 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
27775 arrays of structs. Also add a more descriptive error message when
27776 a structure member is marshalled as LPArray.
27778 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
27780 * marshal.c (mono_marshal_get_native_wrapper): Add support for
27781 marshalling arrays of complex types. Fixes #29098. Also remove an
27782 usused and incomplete function.
27784 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27786 * gc.c: report heap_size - free_bytes as total memory allocated
27789 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
27791 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
27792 fix timezone handling problems on Windows.
27794 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
27795 asserts when the year is outside the range handled by ms the functions.
27797 * class.c (setup_interface_offsets): If the class is an interface,
27798 fill out its interface_offsets slot.
27800 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27802 * threadpool.c: mark threadpool threads as background.
27804 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
27806 * decimal.c - define DECINLINE to nothing if not using GCC
27808 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
27810 * assembly.c: More refcount fixes.
27812 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27814 * string-icalls.c: if we're not trimming, return the same string.
27815 When not splitting, don't create a new string.
27817 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27820 (mono_image_open): increment the ref_count inside the critical section.
27822 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
27824 * image.c (mono_image_open): Fix reference counting bug.
27826 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
27828 * marshal.c (mono_marshal_type_size) struct alignment changed for
27829 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
27830 64bits. Avoid leak in mono_marshal_get_native_wrapper when
27831 mono_lookup_pinvoke_call throws.
27833 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
27835 * reflection.c (mono_reflection_parse_type): Fix #49114.
27837 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
27838 temporary workaround for cygwin header problem.
27840 * object.c (mono_object_isinst): Synchronize this with the code
27841 generated by the JIT for casts.
27843 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
27845 * reflection.c (encode_type): Fix #38332.
27847 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
27849 * marshal.c (mono_marshal_method_from_wrapper): New function to return
27850 the original method from the wrapper method.
27852 2003-09-25 Martin Baulig <martin@ximian.com>
27854 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
27855 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
27856 (ves_icall_Type_get_IsGenericInstance): New interncall.
27858 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
27860 * object.c: fix cast warning in big endian code.
27862 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
27864 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
27866 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27868 * assembly.c: don't call check_env from mono_assembly_load. It's
27869 already done once in mono_assemblies_init and may cause headaches when
27870 multiple threads are loading assemblies.
27872 2003-09-19 Martin Baulig <martin@ximian.com>
27874 * reflection.c (mono_reflection_define_generic_parameter): Don't
27875 allocate `klass->methods', set `klass->flags' to
27876 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
27878 2003-09-18 Martin Baulig <martin@ximian.com>
27880 * class.c (mono_class_init): Don't create `class->methods' if it's
27881 already initialized.
27883 * metadata.c (mono_metadata_load_generic_params): Make this
27886 * reflection.c (mono_reflection_define_generic_parameter): Set
27887 parent class and interfaces from the constraints.
27889 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
27890 to keep this struct in sync with the declaration in TypeBuilder.cs.
27892 2003-09-17 Martin Baulig <martin@ximian.com>
27894 * metadata.h (MonoType): Replaced the data's `int type_param'
27895 field with `MonoGenericParam *generic_param'.
27896 (MonoGenericParam): Added `MonoClass *klass'.
27898 * class.c (mono_class_from_gen_param): Removed the
27899 `MonoImage *image' and `int type_num' arguments.
27901 * metadata.c (mono_metadata_parse_generic_param): New static
27902 method; creates a MonoGenericParam which just contains the index.
27903 (do_mono_metadata_parse_type): Call
27904 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
27907 * reflection.c (mono_image_typedef_or_ref): Generic type
27908 parameters may be in the same assembly, but never use a typedef
27910 (mono_reflection_define_generic_parameter): We're now creating a
27911 "real" class for the type parameter; it's now safe to call
27912 mono_class_from_mono_type() on the class'es type, it'll do the
27915 2003-09-16 Martin Baulig <martin@ximian.com>
27917 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
27918 `symfile->range_entry_size' and `symfile->class_entry_size' here;
27919 the `symfile' data structure must be fully initialized before it
27920 gets added to the table.
27922 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
27924 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
27926 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
27927 class init trampolines.
27929 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
27931 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
27932 to the built-in profiler to turn off time and allocation profiling
27935 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
27937 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
27940 * debug-helpers.c (mono_method_full_name): Print the wrapper type
27941 in human readable form.
27943 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
27945 * reflection.c icall.c: Fixed warnings.
27947 * image.c (load_class_names): Use a temporary hash table to hold the
27948 namespaces in order to avoid doing many string comparisons.
27950 * image.h: Fix typo.
27952 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
27953 Pass NULL instead of g_direct_equal to the GHashTable constructor
27954 since the NULL case is short-circuited inside g_hash_table_lookup,
27955 leading to better performance.
27957 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
27958 obtain the first custom attribute for a given index. Depends on the
27959 CustomAttribute table being sorted by the parent field.
27961 * reflection.c (mono_custom_attrs_from_index): Use the new function
27962 for better performance.
27964 2003-09-07 Martin Baulig <martin@ximian.com>
27966 * class.c (mono_class_init): If we're a generic instance, inflate
27967 all our methods instead of loading them from the image.
27968 (mono_class_from_generic): Set `class->methods = gklass->methods'.
27970 2003-09-07 Martin Baulig <martin@ximian.com>
27972 * mono-debug-debugger.c: Added support for constructors.
27974 2003-09-06 Martin Baulig <martin@ximian.com>
27976 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
27979 * reflection.c (mono_reflection_setup_generic_class): Call
27980 ensure_runtime_vtable() to create the vtable.
27982 2003-09-05 Martin Baulig <martin@ximian.com>
27984 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
27987 2003-09-04 Martin Baulig <martin@ximian.com>
27989 * reflection.c (mono_reflection_define_generic_parameter): Generic
27990 parameters start with zero.
27992 2003-09-04 Martin Baulig <martin@ximian.com>
27994 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27996 * reflection.h (MonoReflectionGenericParam): New typedef.
27997 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
27998 the generic parameters from the managed TypeBuilder.
28000 * reflection.c (mono_reflection_define_generic_parameter): New function.
28001 (mono_reflection_create_runtime_class): Encode generic parameters.
28002 (mono_reflection_setup_generic_class): New function; this is
28003 called after adding adding all generic params to the TypeBuilder.
28004 (encode_type): Added MONO_TYPE_VAR.
28006 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
28008 * class.h class.c (mono_class_needs_cctor_run): Moved this method
28011 * assembly.h assembly.c: Moved the AOT loading code into an assembly
28014 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
28016 * reflection.h reflection.c class.h class.c: Delete duplicate
28017 definition of mono_type_get_name () from reflection.c and export the
28020 * class.c: Class loading fixes from Bernie Solomon
28021 (bernard@ugsolutions.com).
28023 * reflection.c: Endianness fixes from Bernie Solomon
28024 (bernard@ugsolutions.com).
28026 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
28028 * assembly.h assembly.c: Define a file format version for AOT
28031 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
28033 * appdomain.h (MonoJitInfo): New field to determine whenever the
28034 code is domain neutral.
28036 2003-08-31 Miguel de Icaza <miguel@ximian.com>
28038 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
28040 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
28042 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
28043 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
28044 Avoid caching the result since strings must be domain specific. Fixes
28047 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
28049 * marshal.c (mono_marshal_init): Make this callable multiple times
28050 since it is hard to find a correct place to call it.
28052 * object.c (mono_runtime_class_init): Execute static constructors in
28053 the correct appdomain.
28055 * image.c (build_guid_table): Handle the case when multiple images have
28058 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28060 * icall.c: added a couple of icalls for System.Web.
28062 2003-08-28 Martin Baulig <martin@ximian.com>
28064 * icall.c (ves_icall_Type_BindGenericParameters): Use
28065 `klass->generic_inst' instead of `&klass->byval_arg' in the
28066 mono_type_get_object() call. The returned type must be
28067 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
28069 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
28073 * object.c (mono_class_proxy_vtable): Make it thread safe.
28075 * pedump.c: Fix warning.
28077 * object.c appdomain.h: Get rid of metadata_section.
28078 It is no longer needed and it was causing deadlocks with domain->lock.
28080 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
28082 2003-08-26 Martin Baulig <martin@ximian.com>
28084 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
28086 2003-08-26 Martin Baulig <martin@ximian.com>
28088 * pedump.c (main): Call mono_metadata_init(),
28089 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
28090 and mono_loader_init().
28092 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
28094 * loader.h: Add missing include to fix build.
28096 * image.h: mono_image_load_references is no more.
28098 * assembly.c: Reworked assembly loading to make it really thread safe.
28099 After these changes, the assembly returned by mono_assembly_open is
28100 fully initialized, i.e. all its references assemblies are loaded.
28102 * assembly.c (mono_image_load_references): Renamed to
28103 mono_assembly_load_references, and made private, since clients no
28104 longer need to call it.
28106 * class.c: Removed calls to mono_assembly_load_references, since it was
28107 a source of deadlocks.
28109 * loader.h loader.c class.h class.c: Protect data structures using a
28110 new lock, the loader lock.
28112 * class.c (mono_class_setup_vtable): Create temporary hash tables and
28113 GPtrArrays only when needed.
28115 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
28116 into empty structures by mcs. Fixes pinvoke7.cs.
28118 * domain.c (mono_init): Call a new initialization function.
28120 * appdomain.c (mono_runtime_init): Call the new initializer function
28121 of the marshal module.
28123 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
28124 inserted into empty structures by mcs. Fixes pinvoke7.cs.
28126 * marshal.h marshal.c: Added locks around the wrapper caches to make
28127 this module thread safe.
28129 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
28130 this argument. Fixes pinvoke1.exe.
28132 2003-08-25 Lluis Sanchez <lluis@ximian.com>
28134 * object.h: Added call_type field to MonoMethodMessage and the corresponding
28135 enumeration of values. Removed fields to store remote call output values in
28136 MonoAsyncResult. Not needed any more.
28137 * object.c: Initialize call_type and async_result fields in mono_message_init.
28138 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
28139 dispatching the message.
28140 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
28141 async call to finish. To do it use a message with EndInvoke call type.
28143 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
28145 * loader.h loader.c (mono_method_hash_marhal_info): New function which
28146 determines whenever a method has marshalling info.
28148 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28150 * assembly.c: fix the build on windows.
28152 2003-08-22 Lluis Sanchez <lluis@ximian.com>
28154 * object.cs: Fixed bug #47785.
28156 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
28158 * string-icalls.c (StringReplace): If their are no occurances of
28159 the old string found return a reference to the supplied
28160 string. This saves some memory and matches MS behavoir.
28162 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28164 * socket-io.c: fixed compilation for systems that define AF_INET6
28165 and don't define SOL_IP/SOL_IPV6.
28167 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
28169 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
28170 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
28172 * rawbuffer.c rawbuffer.h: Make this module thread safe.
28174 * domain.c: Make this module thread safe.
28176 * domain.c (mono_init): Call new initialization function.
28178 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
28179 reference types too. Fixes #38812.
28181 * image.c (mono_image_init): Fixed warnings.
28183 * class.c (mono_class_from_typeref): Handle assembly load failure
28186 * appdomain.c (add_assemblies_to_domain): Handle the case when
28187 the references of an assembly are not yet loaded.
28189 * metadata.c image.c assembly.c: Moved initialization of global
28190 variables to a separate function called at startup since lazy
28191 initialization of these variables is not thread safe.
28193 * image.c assembly.c: Made this module thread safe by adding locks in
28194 the appropriate places.
28196 * domain.c (mono_init): Call the new initialization functions of the
28199 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
28201 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
28202 make a direct call. It is proxy's work to make the call asynchronous.
28203 mono_delegate_end_invoke(): If the targe is a proxy, just collect
28205 * object.cs: mono_method_call_message_new(): read AsyncResult and
28206 state object from parameters list, if this info is requested.
28207 * object.h: Added fields to store remote call output values in
28208 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
28210 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28212 * object.h: add needed fields to MonoThread.
28213 * threads.c, threads.h: allow registering a function to cleanup data
28214 allocated per thread by the JIT.
28216 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28218 * loader.h: portability fix by Bernie Solomon
28219 * <bernard@ugsolutions.com>.
28221 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
28223 * reflection.h reflection.c (mono_param_get_objects): Changed this to
28224 return a MonoArray. This simplifies the code and also ensures that
28225 the cache allways contains an object reference as a value.
28227 * icall.c (ves_icall_get_parameter_info): Simplified using the new
28230 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28232 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
28233 fixes a problem with byte ordering when getting the address family for
28236 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
28238 * .cvsignore: Added monosn.
28240 * reflection.h reflection.c loader.c: Added support for parameter
28241 marshalling to dynamically created types. Fixes #47295.
28243 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
28245 * rand.c: remove useless warnings.
28247 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
28249 * class.c: implemented ldtoken for methods and fieldrefs.
28251 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28253 * threadpool.c: when mono_async_invoke was called, no one took care of
28254 monitoring the queue. So if the method invoked took some time and we
28255 got new async invoke requests after 500 ms (the thread created waited
28256 that long in WaitForSingleObject), the new async invoke was not called
28257 until the previous one finished.
28259 This is fixed now. Thanks to Totte for helping with it.
28261 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28263 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
28265 2003-08-11 Martin Baulig <martin@ximian.com>
28267 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
28269 2003-08-06 Martin Baulig <martin@ximian.com>
28271 * mono-debug-debugger.c: Added support for static fields,
28272 properties and methods.
28274 2003-08-06 Martin Baulig <martin@ximian.com>
28276 * mono-debug-debugger.c: Don't store the MonoString's vtable to
28277 make this work for applications with multiple application domains.
28279 2003-08-04 Martin Baulig <martin@ximian.com>
28281 * mono-debug-debugger.c: Completely reworked the type support; the
28282 most important thing is that we're now just using one single
28283 `MonoType' instance per type.
28285 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
28287 * mono-endian.h, mono-endian.c, icall.c: Added icall
28288 ves_icall_System_Double_AssertEndianity to assert double word endianity
28289 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
28291 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28293 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
28294 support, icalls and fixes.
28296 2003-07-31 Miguel de Icaza <miguel@ximian.com>
28298 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
28299 classes that are a punctuation character in .NET is not the same a
28302 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28304 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
28306 2003-07-29 Miguel de Icaza <miguel@ximian.com>
28308 * icall.c: Add new MemCopy internalcall.
28309 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
28310 Simplified code; It is not necessary to handle all the cases here,
28311 as the C# code takes care of it. Only handle the case of the name
28312 resource embedded into the assembly.
28314 Changed signature to return the data pointer and the size of the
28317 2003-07-26 Miguel de Icaza <miguel@ximian.com>
28319 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
28320 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
28322 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
28324 * socket-io.c: ignore EINTR error in select.
28326 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28328 * class.h, class.c: removed unused subclasses field in MonoClass.
28330 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
28332 * icall.c: improve fix of get_base_definition(). If the parent class
28333 doesn't have the mehod, look at the parent of the parent.
28334 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
28335 to check if a parameter is an in or out parameter
28336 (PARAM_ATTRIBUTE_IN is not set by default).
28337 mono_method_return_message_restore(): Use mono_class_value_size to
28338 get the size of a value type. mono_type_stack_size (parameterType)
28339 does not return the correct value if parameterType is byRef.
28340 mono_load_remote_field(), mono_load_remote_field_new(),
28341 mono_store_remote_field(), mono_store_remote_field_new():
28342 raise exception if the remote call returns an exception.
28344 2003-07-28 Martin Baulig <martin@ximian.com>
28346 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
28347 method. This is a wrapper around mono_runtime_invoke() which
28348 boxes the instance object if neccessary.
28350 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28352 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
28353 metadata.h, row-indexes.h, verify.c: first cut of generics support.
28355 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28357 * icall.c: disable mcs bug workaround.
28359 2003-07-21 Miguel de Icaza <miguel@ximian.com>
28361 * object.c (mono_runtime_class_init): Take the metadata_section
28362 mutex before obtaining the domain mutex.
28364 * appdomain.h: Added definition of metadata_section mutex here.
28366 * object.c: define metadata_mutex here.
28368 2003-07-24 Ravi Pratap <ravi@ximian.com>
28370 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
28373 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
28375 * reflection.c: Fix bug #46669
28377 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28382 * object.h: fill in the type name for TypeLoadException.
28384 2003-07-23 Ravi Pratap <ravi@ximian.com>
28386 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
28387 relationship between TypeBuilders while compiling corlib) and bug
28388 45993 (Array types returned from the runtime while compiling
28389 corlib were from the loaded corlib).
28391 2003-07-22 Martin Baulig <martin@ximian.com>
28393 * mono-debug-debugger.c: Reworked the type support a bit more;
28394 distinguish between types and classes.
28396 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
28398 * icall.c: add IsArrayImpl icall.
28400 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
28402 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
28403 initializing real_size only once. Also fix bug #46602.
28405 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
28407 * object.c: Renamed mono_metadata_section to metadata_section.
28409 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
28411 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
28412 empty array if the type is an array. Fixed.
28413 ves_icall_MonoMethod_get_base_definition: if the base method
28414 is abstract, get the MethodInfo from the list of methods of
28416 * reflection.c: ParameterInfo.PositionImpl should be zero-based
28417 and it was 1-based. Fixed in mono_param_get_objects.
28419 2003-07-20 Martin Baulig <martin@ximian.com>
28421 * mono-debug.h: Set version number to 31.
28422 (mono_debug_init): Added `MonoDomain *' argument.
28424 * mono-debug-debugger.c: Reworked the type support; explicitly
28425 tell the debugger about builtin types; pass the `klass' address to
28428 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
28430 * image.c: Allow new metadata tables to be loaded without a
28431 warning. Also update the warning message to give the new constant value.
28433 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
28435 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
28436 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
28437 array type representation changes.
28439 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28441 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
28442 on Environment.Exit () call.
28444 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
28446 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
28447 requires a matching corlib.
28449 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
28451 * Changelog: My editor decided to add a CR to each line. Sorry about that.
28452 Committed again without the CRs.
28454 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
28456 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
28457 getting it from the "this" socket instance. Did not work
28458 if the socket is a subclass of Socket.
28459 Also fixed bug #35371.
28461 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28463 * metadata.c: fixed size for TypedByRef.
28464 * loader.c: when searching for a method, consider the vararg amrker.
28465 * unicode.c, decimal.c: constify some arrays.
28467 2003-07-15 Dick Porter <dick@ximian.com>
28469 * socket-io.c: Fixed compilation for gcc < 3.2.
28471 Fixed compilation for machines that don't have AF_INET6 (thanks to
28472 Bernie Solomon <bernard@ugsolutions.com> for that part.)
28474 Fixed compile warnings.
28476 Fixed formatting and line endings.
28478 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
28481 * socket-io.c: Added IPv6 support.
28483 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
28485 * class.c (mono_class_is_assignable_from): New function to implement
28486 the is_assignable_from logic. Used by mono_object_isinst,
28487 Type::IsAssignableFrom () and the interpreter.
28489 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
28490 Object, even interfaces.
28492 * object.c (mono_object_isinst): Implement in terms of
28493 is_assignable_from.
28495 * icall.c (ves_icall_type_is_assignable_from): New icall.
28497 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
28499 * domain.c (foreach_domain): fix compiler warning.
28501 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
28503 * image.c (load_metadata_ptrs): use g_strndup because strndup is
28504 not available on all plattforms
28506 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
28508 * image.h image.c: Store the metadata version string in MonoImage.
28509 * icall.c: New icall to retrieve the image version.
28510 * reflection.c (create_dynamic_image): Fill in the image version field
28511 * reflection.c (build_compressed_metadata): Use the image version
28512 from the image structure.
28514 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28516 * appdomain.c: modified comment.
28517 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
28518 That will be its last iteration when mono_gc_cleanup is called from
28519 mono_runtime_cleanup and before the domain is unloaded.
28523 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
28525 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
28528 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28530 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
28531 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
28532 Bernie Solomon <bernard@ugsolutions.com>.
28534 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28536 * object.c, object.h: provide mono_object_new_fast() for faster
28537 allocation in some special cases.
28539 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
28541 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
28542 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
28544 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
28546 * threadpool.c: fix leaks.
28548 2003-07-01 Dick Porter <dick@ximian.com>
28550 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
28551 using MonoGHashTables. Fixes threadpool bug posted to list.
28553 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
28555 * image.h, image.c: added support to load an assembly from a byte array.
28556 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
28557 assembly bundle support.
28559 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
28561 * threadpool.c (mono_thread_pool_add): keep a reference to the
28562 AsyncResult to prevent GC
28564 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28566 * class.c: leak fix.
28568 2003-06-25 Dick Porter <dick@ximian.com>
28570 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
28571 for the async object, the WaitHandle object will close the handle.
28574 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28576 * class.c: in mono_array_class_get (), lookup from the hash with the
28577 same type we insert: this works around a bug in
28578 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
28579 lluis. The real fix will have to wait for after the release.
28581 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28583 * icall.c: fix memory leak when getting type members.
28585 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28587 * reflection.c: added more pubtoken special cases.
28589 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
28591 * class.c: handle field offset correctly when class size
28592 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
28594 2003-06-20 Martin Baulig <martin@ximian.com>
28596 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
28599 2003-06-20 Martin Baulig <martin@ximian.com>
28601 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
28603 2003-06-20 Martin Baulig <martin@ximian.com>
28605 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
28606 just distinguish between variables in registers and variables at
28607 an offset relative to a register.
28609 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28611 * icall.c: #ifdef out latest changes until mcs is fixed.
28613 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28615 * icall.c: return members in metadata order.
28617 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28619 * icall.c: avoid infinite loop in GetTimeZoneData.
28621 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
28623 * icall.c: added Marshal.Prelink/All icalls.
28625 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28627 * object.c, object.h: fix warnings and do some overflow checking
28628 when creating arrays.
28630 2003-06-17 Dick Porter <dick@ximian.com>
28633 * file-io.c: File attributes need to be tweaked slightly when
28634 passed from the managed to the w32 world.
28636 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
28637 * profiler.h profiler-private.h profiler.c: Rework last patch
28638 based on suggestion by Paolo.
28640 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
28642 * profiler.h profiler-private.h profiler.c: Added infrastructure for
28643 instruction level coverage data collection.
28644 * profiler.h profiler.c (: Added new callback function which can be
28645 used by the profiler to limit which functions should have coverage
28647 * profiler.c (mono_profiler_load): Call g_module_build_path to
28648 generate the file name of the profiler library.
28650 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28652 * profiler.c, profiler.h, profiler-private.h: added basic block
28653 coverage profiling API.
28655 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
28657 * reflection.c (mono_reflection_create_runtime_class): Add support
28658 for events in dynamically generated code.
28660 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
28663 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28665 * icall.c: when getting timezone info, return reasonable values if we
28666 can't get the actual data.
28668 2003-06-14 Dick Porter <dick@ximian.com>
28670 * threads.c (start_wrapper): Remove the reference to the thread
28671 object in the TLS data, so the thread object can be finalized.
28672 This won't be reached if the thread threw an uncaught exception,
28673 so those thread handles will stay referenced :-( (This is due to
28674 missing support for scanning thread-specific data in the Boehm GC
28675 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
28677 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
28679 * reflection.c: ensure streams and tables are first allocated with
28680 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
28682 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28684 * icall.c: fixed GetElementType for byrefs (bug# 44792).
28686 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
28688 * reflection.c (mono_reflection_create_runtime_class): Add support for
28689 properties to dynamically created classes.
28690 * reflection.c: Fix a few places where non-MonoObjects were inserted
28691 into the tokens hashtable.
28693 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28695 * object.c: some support to handle out of memory exceptions.
28697 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
28699 * marshal.c (mono_marshal_get_native_wrapper): support reference
28702 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28704 * object.h, object.c: more portability stuff from Bernie Solomon.
28705 Unexport mono_object_allocate(). Added mono_object_unbox ().
28706 Set exitcode when an unhandled exception is thrown.
28708 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
28710 * marshal.c (mono_marshal_get_native_wrapper): use custom
28711 marshaler for return types.
28713 2003-06-10 Dick Porter <dick@ximian.com>
28715 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
28716 ip_mreq is available
28718 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
28720 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
28721 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
28722 by Bernie Solomon <bernard@ugsolutions.com>.
28724 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
28726 * gc.c (mono_gc_init): Avoid error message on shutdown when
28727 GC_DONT_GC=1 is used.
28729 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
28730 New icall to return the GUID of a module.
28732 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28734 * class.c: ensure instance size always includes the parent's size
28735 even whem class size is set explicitly (fixes bug#44294).
28737 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28739 * profiler.h, profiler.c: made the simple profiler thread-safe,
28740 get more accurate timing info. Allow the loading of an
28741 externally-developed profiler module.
28743 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
28745 * marshal.c (mono_marshal_get_native_wrapper): improved
28746 class/byref arguments.
28747 (mono_marshal_get_native_wrapper): better string marshaling support.
28749 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
28751 * class.c: ensure .pack and .size are handled correctly and
28752 simplified layout of static fields.
28754 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
28757 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
28759 * loader.c (mono_lookup_pinvoke_call): look for modules in the
28760 current directory (fix bug 44008)
28762 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
28764 * marshal.c (mono_marshal_get_native_wrapper): started support for
28766 (mono_delegate_to_ftnptr): consider marshalling specifications
28768 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
28770 * reflection.c, reflection.h: emit custom marshal info.
28772 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28774 * object.c: free the GError.
28775 * icall.c: added CloseEvent_internal.
28777 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
28780 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
28782 * loader.c (mono_method_get_signature): Add support for dynamic
28785 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
28787 * reflection.c: fixed bug #43905.
28789 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28791 * class.c, domain.c, icall.c, metadata.h, object.h: support for
28792 handling TypedReference and ArgIterator.
28793 * loader.c, loader.h: added function to get signature at call site.
28795 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28797 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
28798 data readonly. Buglets and warning fixes. Some MethodSpec support.
28800 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28802 * class.h, class.c, object.c: remove relative numbering support.
28804 2003-05-26 Miguel de Icaza <miguel@ximian.com>
28806 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
28807 free the string, until we get a chance to fix Gtk#
28809 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28811 * marshal.c: revert last patch.
28813 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
28815 * icall.c: updates for new mono_class_vtable() not calling
28816 the type constructor anymore.
28818 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28820 * object.h, object.c: separate vtable creation from type
28821 initialization. Make running the .cctor thread safe.
28823 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
28825 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
28827 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
28829 * loader.c (mono_get_method): consider calling convention
28831 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
28833 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
28834 to return the invisible global type for a module.
28836 * reflection.c (mono_image_build_metadata): Emit global fields too.
28838 2003-05-20 Peter Williams <peterw@ximian.com>
28840 * loader.c (mono_lookup_internal_call): Add a few newlines.
28842 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
28844 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
28847 * appdomain.c (set_domain_search_path): Recalculate search path when
28848 AppDomainSetup.PrivateBinPath changes.
28850 * object.c (mono_class_compute_gc_descriptor): It turns out some
28851 parts of the class libs (like System.Thread) holds pointers to
28852 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
28853 to treat native int a pointer type here.
28855 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
28857 * appdomain.h, domain.c: add hashtable for jump target resolution.
28859 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
28861 * reflection.h reflection.c icall.c: Added new icalls
28862 GetManifestResourceInfoInternal, GetModulesInternal and support
28865 2003-05-16 Dick Porter <dick@ximian.com>
28869 * file-io.c: Implement System.IO.MonoIO::GetTempPath
28871 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
28873 * object.c: mono_store_remote_field: little fix to previous patch.
28875 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28877 * class.c: add constructors to array classes.
28878 * icall.c: special case array construction for InternalInvoke (),
28880 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
28882 * class.h class.c reflection.c object.c: Added support for field
28883 defaults in dynamically generated classes.
28885 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
28887 * reflection.c: properly encode charset for ddlimport.
28889 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
28891 * threads.c: allow compiling without GC.
28893 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28895 * appdomain.h, object.c, object.h, threads.c, threads.h: added
28896 handling of thread static data.
28898 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28900 * reflection.h, reflection.c: added mono_custom_attrs_free ().
28902 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
28904 * class.c (mono_array_class_get): always set the serializable flags
28905 (mono_array_class_get): always set the SEALED attribute for array types
28907 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
28909 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
28910 attributes (fix for bug 42021).
28912 2003-05-12 Dick Porter <dick@ximian.com>
28914 * gc.c: Don't run finalizers when the finalizer thread is
28915 finishing up, because the default domain has already been
28918 2003-05-11 Miguel de Icaza <miguel@ximian.com>
28920 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
28921 value is null, we should throw an exception. This is slightly
28922 different than the other conventions used for the constructor.
28924 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28926 * socket-io.c: fixed windows build.
28928 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28930 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
28932 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
28934 * object.c (mono_string_new_wrapper): Compatibility fix for MS
28937 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
28939 * class.c (mono_class_layout_fields): Add experimental GC aware
28940 auto layout facility. Requires class library changes to work correctly.
28942 (mono_class_setup_vtable): Avoid overriding explicit interface
28943 method implementations. Fixes iface3.exe test.
28945 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
28947 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
28948 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
28950 * metadata.h: Add new type classification macro which determines
28951 whenever the type holds an object reference.
28953 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
28955 * marshal.c (mono_marshal_get_native_wrapper): cleanups
28957 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
28959 * gc.c (finalizer_thread): Work around a GC bug.
28961 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
28963 * marshal.c (emit_struct_conv): allow unions
28965 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
28967 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
28969 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
28971 2003-05-06 Martin Baulig <martin@ximian.com>
28973 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
28975 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28978 (Select_internal): allow NULLs, don't create arrays if not needed.
28979 Coupled with Socket.cs changes.
28982 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
28983 register a finalizer for it that will close the semaphore handle. This
28984 fixes the leak and make Lupus' test run with > 4080 loops.
28986 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
28988 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
28989 Jerome Laban (bug #42287)
28991 2003-05-02 Martin Baulig <martin@ximian.com>
28993 * debug-mono-symfile.h
28994 (MonoSymbolFile): Moved declaration into mono-debug.h.
28995 (MonoDebugMethodJitInfo): Likewise.
28996 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
28998 (_mono_debug_address_from_il_offset): Take a
28999 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
29002 (MonoDebugDomainData): New struct.
29003 (mono_debug_get_domain_data): New function.
29004 (mono_debug_add_method): Take an additional `MonoDomain *'
29006 (mono_debug_source_location_from_address): Likewise.
29007 (mono_debug_il_offset_from_address): Likewise.
29008 (mono_debug_address_from_il_offset): Likewise.
29010 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
29012 * reflection.c: one more check for null type in custom attrs.
29014 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29016 * reflection.c: avoid warning (comparison is always false due to limited
29017 range of data type).
29019 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29021 * icall.c: throw an exception in Type.GetField if the argument 'name'
29024 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
29026 * reflection.c: fixed handling of enums in named arguments to custom
29027 attributes (bug #42123).
29029 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
29031 * reflection.c: use the right array element type and handle
29032 a null for a Type argument, too.
29034 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
29036 * reflection.c: handle arrays as arguments to custom attributes.
29038 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
29040 * reflection.c: handle a string value in a custom attr
29041 ctor that takes an object.
29043 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
29045 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
29048 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
29050 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
29052 2003-04-27 Martin Baulig <martin@ximian.com>
29054 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
29055 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
29056 MONO_DEBUGGER_EVENT_BREAKPOINT.
29057 (mono_breakpoint_trampoline_code): Removed.
29058 (mono_debugger_event_handler): The last argument is now a
29060 (mono_debugger_insert_breakpoint_full): Removed the
29061 `use_trampoline' argument.
29062 (mono_debugger_method_has_breakpoint): Likewise.
29063 (mono_debugger_trampoline_breakpoint_callback): Renamed to
29064 mono_debugger_breakpoint_callback(); take the method and
29065 breakpoint number as arguments.
29067 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
29069 * metadata.c: fix off by one when loading parameters attributes.
29071 2003-04-24 Martin Baulig <martin@ximian.com>
29073 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
29075 2003-04-24 Martin Baulig <martin@ximian.com>
29077 * mono-debug-debugger.c: Moved all code which interacts with the
29078 Mono Debugger here.
29080 * debug-mono-symfile.c: This code now just deals with the symbol
29081 file itself, the debugger code is now in mono-debug-debugger.c.
29083 2003-04-23 Martin Baulig <martin@ximian.com>
29085 * mono-debug.c (mono_debug_source_location_from_il_offset):
29086 New method; like mono_debug_source_location_from_address(), but
29087 takes an IL offset instead of a machine address.
29089 2003-04-23 Martin Baulig <martin@ximian.com>
29091 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
29092 `line' field; this is now computed by the debugger.
29094 2003-04-23 Martin Baulig <martin@ximian.com>
29096 * mono-debug.[ch]: New files. This is the new debugging interface.
29098 * mono-debug-debugger.[ch]: New files. Moved all code which
29099 interacts with the Mono Debugger here.
29101 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
29103 * domain.c (mono_init): initialize mono_defaults.monitor_class
29105 2003-04-21 Miguel de Icaza <miguel@ximian.com>
29107 * reflection.c (method_encode_code): Add a spicy exception to help
29108 future compiler authors.
29110 2003-04-21 Martin Baulig <martin@ximian.com>
29113 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29114 Make this work with relative pathnames; g_filename_to_uri() needs
29115 an absolute filename.
29117 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
29119 * icall.c: Track name changes in Object and ValueType.
29121 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
29123 * metadata.c (mono_type_stack_size): size should be a multiple of
29126 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29129 (internal_domain_finalize): moved into mono_domain_finalize. No need
29130 to create another thread because the finalizers will be run in the
29133 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
29134 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
29135 to be run (MS does this too).
29137 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
29139 * object.c (mono_class_compute_gc_descriptor): Update comment.
29141 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
29143 * image.h: Add synchronized wrapper cache.
29145 * image.c (do_mono_image_open): Initialize cache.
29147 * reflection.c (create_dynamic_mono_image): Initialize cache.
29149 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29151 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
29152 ves_icall_System_Buffer_ByteLengthInternal.
29154 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
29156 * reflection.c: setup klass->nested_in earlier. Allow
29157 a dash in the assembly name.
29159 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
29161 * metadata.c (mono_type_to_unmanaged): dont access
29162 type->data.klass for MONO_TYPE_OBJECT
29163 (mono_type_to_unmanaged): consider System.Delegate class
29165 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
29167 * class.c: just setup supertypes in the proper place instead of
29168 initializing the full element class for arrays.
29170 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
29172 * class.c: ensure the element class of arrays is initialized.
29173 Setup the supertype info for array classes, too.
29175 2003-04-14 Miguel de Icaza <miguel@ximian.com>
29177 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
29179 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29181 * Makefile.am: re-added -m option when running cygpath. This way,
29182 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
29184 * mono-config.c: same codepath for locating mono config file for WIN32
29186 * assembly.c: if mono_assembly_setrootdir is called, don't override
29189 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29191 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
29192 MONO_ASSEMBLIES variable.
29194 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
29196 * icall.c: added Assembly::GetNamespaces() icall.
29198 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29200 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
29202 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
29204 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
29205 * object.c: fixed bug in the construction of vtable for proxies
29207 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
29209 * object.c (mono_array_new): Mark mono_array_new as an icall.
29211 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29213 * class.c: fixed test for public method when overriding interfaces.
29216 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
29218 * appdomain.h, domain.c: added mono_domain_foreach() to
29219 be able to access the currently loaded appdomains.
29220 * object.c: make string interning work across sppdomains.
29221 Mark some functions for use as icalls.
29223 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
29225 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
29227 * reflection.h reflection.c: Allocate long living data using
29228 GC_MALLOC_ATOMIC so the collector does not need to scan it.
29230 * reflection.c: Double the allocation size in streams instead of
29231 increasing it, to prevent unneccesary copying on large assemblies.
29233 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
29234 creation if the assembly does not have the Run flag set.
29236 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
29238 * class.h: avoid the C++ keywords in header files (Jerome Laban
29239 spotted and fixed this).
29241 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29244 (mono_unhandled_exception): fill in the arguments for the
29245 UnhandledException event. Only trigger that event for the default
29246 domain (as MS does).
29248 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
29250 * object.c: Improve typed allocation stuff based on suggestions from
29251 Paolo. Also turn it on if the GC library supports it.
29253 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
29255 * object.c object.h class.h: Added experimental typed allocation
29256 facility using the interfaces in gc_gcj.h.
29258 * os/gc_wrapper.h: Added new include files.
29260 2003-04-03 Martin Baulig <martin@ximian.com>
29262 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
29263 which is not yet enabled by default.
29265 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
29267 (mono_gc_lock, mono_gc_unlock): New static functions.
29269 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
29270 functions; stop/start the world for the garbage collector. This
29271 is using the windows API; we need to complete the SuspendThread()/
29272 ResumeThread() implementation in the io-layer to make this work on Unix.
29273 (mono_gc_push_all_stacks): New public function; tells the garbage
29274 collector about the stack pointers from all managed threads.
29276 2003-04-03 Martin Baulig <martin@ximian.com>
29278 * object.h (MonoThread): Added `gpointer stack_ptr'.
29280 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
29282 2003-04-03 Martin Baulig <martin@ximian.com>
29284 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
29286 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
29288 * reflection.c (typebuilder_setup_fields): Initialize field.first and
29291 2003-04-02 Miguel de Icaza <miguel@ximian.com>
29293 * loader.c (mono_lookup_internal_call): Report the corlib that is
29296 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
29298 * icall.c (ves_icall_type_GetTypeCode): fixed check for
29299 System.DBNull (it's class not valuetype).
29301 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
29303 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
29304 if the array method was already assigned a token (fixes bug#40646).
29306 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
29308 * reflection.c (mono_reflection_get_type): Attempt type resolve even
29309 if no assembly is given.
29311 2003-04-01 Miguel de Icaza <miguel@ximian.com>
29313 * metadata.h: Added the new tables.
29315 * row-indexes.h: Added definitions for new tables.
29317 * metadata.c: Add schemas for new tables, and add support for
29318 computing the sizes of them.
29320 * class.c: Update for handling the new type cases.
29322 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
29324 * metadata.h (MONO_TYPE_IS_VOID): new macro
29326 2003-03-31 Martin Baulig <martin@ximian.com>
29328 * threads.h (MonoThreadCallbacks): Added `thread_created'.
29330 * threads.c (mono_thread_new_init): Call `thread_created' in the
29331 mono_thread_callbacks.
29333 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
29335 * loader.h: added marshalbyrefobject_class to mono_defaults
29336 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
29337 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
29338 generation of output parameters.
29339 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
29340 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
29341 contextbound and the target object belongs to the context of the caller.
29342 * object.h: added context and unwrapped_server variables in MonoRealProxy.
29343 * object.c: Implemented support for interfaces and abstract classes
29344 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
29345 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
29347 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
29349 * class.h class.c (mono_class_is_subclass_of): New function.
29351 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
29352 routines for most common case (calls from ArrayList::ToArray).
29354 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
29355 routine so programs which call Environment::Exit() can be profiled.
29357 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
29358 Added MONO_ARCH_SAVE_REGS.
29360 * icall.c (ves_icall_type_is_subtype_of): Use new function.
29362 2003-03-29 Miguel de Icaza <miguel@ximian.com>
29364 * blob.h: Add a couple of new MonoType types definitions.
29366 * tabledefs.h: Add a couple of new call convs.
29368 2003-03-27 Zoltan Varga <vargaz@freemail.h>
29370 * reflection.h (MonoReflectionDynamicAssembly): track changes in
29371 the layout of the class.
29373 * reflection.c (alloc_table): double the size on overflow to avoid
29374 unnecessary copying.
29376 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
29377 avoid filling out metadata tables and blobs. Also set mb->ilgen to
29378 null so it can be garbage collected.
29380 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
29382 * reflection.c (mono_reflection_get_type): Return the resolved type
29383 only if it is in the assembly we searched.
29385 * reflection.c (ensure_runtime_vtable): Initialize method slots.
29387 * class.c (mono_class_setup_vtable): Set the slot of the overriding
29390 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29393 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
29394 the right one is 'file:///blah', but MS allows it.
29396 (mono_assembly_open): allow 'file://blah'
29398 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
29400 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
29402 * socket-io.c: fixes bug #40310.
29404 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
29406 * reflection.c (mono_reflection_parse_type): handle deeply nested
29409 * reflection.c (mono_image_create_token): Use unique token values
29410 since they will be put into a hash table.
29412 * class.c (mono_class_setup_vtable): If a method occurs in more than
29413 one place in the vtable, and it gets overriden, then change the
29414 other occurances too.
29416 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
29417 object as return type.
29419 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29421 * icall.c: Deleted "ToString" implementation for double and float
29422 because they are full implemented in managed code.
29424 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29426 * reflection.c, reflection.h: implemented and exported functions
29427 to retrieve info about custom attributes.
29429 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29431 * appdomain.c: moved Uri handling to assembly.c
29432 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
29433 work when using a file Uri in *nix and windows.
29435 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
29436 GetReferencedAssemblies.
29438 2003-03-18 Dick Porter <dick@ximian.com>
29440 * icall.c: Rename a couple of internal calls
29442 * threads.c: Set the thread state to Stopped when a thread exits.
29445 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
29447 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
29450 * object.c (mono_class_vtable): fix warning.
29452 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
29454 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
29456 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
29458 (method_encode_clauses): Create exception info structures in the right
29460 (mono_reflection_setup_internal_class): Initialize supertypes field.
29462 * class.c object.c: Handle interfaces which implement other interfaces
29465 * class.h class.c: Move the supertypes array initialization code into
29466 a separate function so it can be used for dynamic types too. Also call
29467 it earlier, in mono_class_init(), since it can be used before the
29468 type is initialized.
29470 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29474 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
29479 * object.c: remove warnings.
29481 2003-03-13 Martin Baulig <martin@ximian.com>
29483 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
29484 (MonoDebugLexicalBlockEntry): New types.
29486 * debug-mono-symfile.c
29487 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
29489 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29491 * process.c: ret can be any non-zero value accroding to MS doc.
29493 2003-03-07 Miguel de Icaza <miguel@ximian.com>
29495 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
29496 fixing a warning for a miss-used prototype, would have cause
29497 random memory corruption.
29499 2003-03-07 Martin Baulig <martin@ximian.com>
29501 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
29502 getting really annoying ....
29504 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
29506 * reflection.c (fixup_method): added support for array methods.
29508 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
29510 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
29511 (pointed out by Michael Adams).
29513 2003-03-04 Dick Porter <dick@ximian.com>
29515 * icall.c: Temporarily reverted the Double and Single ToString()
29516 change, because it broke nunit.
29518 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
29520 * object.h, threads.h: make include files compatible with C++
29521 (patch by Jerome Laban <jlaban@wanadoo.fr>).
29523 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29525 * icall.c: Erased ToString helper functions for Double and Single.
29526 Now, that implementations ar all in managed code (Double and Single
29529 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
29531 * appdomain.c: Added method for initializing the default context of
29532 a domain. Added internal call for getting the default context.
29533 * appdomain.h: Added context variable in MonoDomain struct.
29534 * domain.c: mono_domain_set also sets the default context of the domain
29535 * icall.c: Mapped internal method InternalGetDefaultContext.
29536 * object.c: mono_object_get_virtual_method returns always a remoting
29537 wrapper if the object is a transparent proxy.
29538 mono_runtime_invoke_array: when creating an object by calling the
29539 constructor, if the created object is a proxy, then the constructor should
29540 be called using the a remoting wrapper.
29542 2003-03-03 Dick Porter <dick@ximian.com>
29544 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
29545 variable so it compiles on solaris. Problem spotted by
29546 Christopher Taylor <ct@cs.clemson.edu>
29548 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29551 (get_info_from_assembly_name): don't leak value.
29554 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
29557 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
29559 * assembly.c: export mono_image_load_references ().
29560 * class.c: handle function pointers. mono_class_from_name() now
29561 supports nested type names directly.
29563 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
29565 * reflection.h reflection.c: Encode already created dynamic methods
29566 and fields correctly as a DEF instead of a REF.
29568 * reflection.c: Get rid of the force_ref argument to
29569 mono_image_typedef_or_ref since it was wrong in the first place.
29571 * string-icalls.c: add error checking to string constructors according
29574 * reflection.c: Emit types in the order their TypeBuilders were
29575 created. Previously, a new table index was assigned to each type before
29576 the tables were emitted. This was wrong because the signature blob
29577 might already refer to a type by its original table index.
29579 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
29581 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
29584 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29586 * Makefile.am: make assemblies dir have \ instead of / on windows.
29588 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
29590 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
29591 iterate over the NESTEDCLASS table using a linear search since the
29592 table is not guaranteed to be sorted by the secondary key.
29594 * class.c (mono_class_create_from_typedef): fixed up call to
29595 mono_metadata_nesting_typedef.
29597 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
29599 * marshal.c (mono_string_to_byvalstr): clear the memory as
29600 suggested by Jerome Laban <jlaban@wanadoo.fr>
29602 2003-02-26 Dick Porter <dick@ximian.com>
29604 * process.c: Cope with padding in .rsrc blocks
29606 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
29608 * metadata.h: reverted the filter_len change, it breaks reflection
29610 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
29612 * metadata.h: added a new field to store the filter_len
29615 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
29617 * reflection.c: handle custom attributes for types and members
29618 created with Reflection.Emit (bug#38422).
29620 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
29622 * reflection.c: define RTSpecialName automatically for constructors for
29623 compatibility with MS.NET.
29625 * reflection.c (mono_reflection_create_runtime_class): initialize
29626 nested_in field of dynamically created classes.
29628 2003-02-22 Martin Baulig <martin@ximian.com>
29630 * debug-mono-symfile.h: Incremented version number.
29632 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
29634 * object.h icall.c process.c: fix warnings.
29636 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
29638 * appdomain.h appdomain.c:
29639 (mono_domain_try_type_resolve): split the
29640 name_or_tb argument into a name and a tb argument.
29641 (mono_domain_has_type_resolve): new function to check whenever the
29642 application has registered a TypeResolve event handler.
29644 * icall.c reflection.h reflection.c: move the type resolve logic into
29645 mono_reflection_get_type () so it will be invoked when
29646 Assembly::GetType () is called.
29649 (mono_reflection_get_type): renamed to get_type_internal.
29650 (mono_reflection_get_type): fixed type name generation so it works
29651 for nested types too.
29652 (mono_reflection_get_type): call has_type_resolve () to avoid the
29653 costly type name generation if there is no resolve event handler.
29655 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29657 * class.c, image.c: load exported types from file references.
29659 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
29661 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
29662 used to cache the managed methods used to create proxies and make
29663 remote invocation of methods.
29664 * class.h: Added in MonoVTable a flag to indicate that a class needs
29665 to be remotely created.
29666 * object.c: Modified the method mono_class_vtable(). It now initializes
29667 the remote flag of the vtable. Modified mono_object_new_specific(),
29668 so now it checks the remote flag.
29669 * icall.c: Added a couple of internal methods, one for enabling instance
29670 creation interception for a type, and one for creating objects bypassing
29673 2003-02-18 Martin Baulig <martin@ximian.com>
29675 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
29676 New interncall to get a method's metadata token.
29678 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
29679 New interncall for the debugger.
29681 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
29683 * class.c (mono_class_setup_vtable): allocate supertype array
29685 2003-02-18 Martin Baulig <martin@ximian.com>
29687 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
29689 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29692 (assembly_name_to_aname): jump over unknown properties (i've found
29693 something like: 'type, assembly, version=xxx, custom=null, public...',
29694 so now will ignore custom=null and still get the rest of the values).
29696 2003-02-17 Dick Porter <dick@ximian.com>
29698 * threads.c: Have Thread.Start() wait for a semaphore to signal
29699 that the thread has set up all its local data. This fixes bug
29700 34323, where Abort() raced the new thread's TLS data.
29702 Also removes the handle_store() call from start_wrapper, because
29703 threads are now always created suspended and there is no longer a
29704 race between the parent and child threads to store the info.
29706 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
29708 * image.c: explain the #- heap issue in a message, hopefully
29709 avoiding FAQs on mono-list.
29711 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29714 (GetEntryAssembly): if the domain has not invoked
29715 AppDomain.ExecuteAssembly yet, return the assembly of the default
29718 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
29720 * class.c (mono_ldtoken): make it work in dynamic assemblies.
29722 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
29724 * metadata.c, reflection.c: simple speedup to type hash
29727 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
29729 * image.c, image.h, class.c, assembly.c: move module loading
29730 to MonoImage. When loading metadata, consider alignemnet from
29731 the start of metadata, not from the metadata address in memory.
29733 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
29735 * reflection.c (mono_reflection_get_custom_attrs): Added support for
29736 AssemblyBuilder objects. Factored out custom attribute creation into
29737 a separate function.
29738 (create_custom_attr): new function to create custom attributes.
29740 2003-02-12 Miguel de Icaza <miguel@ximian.com>
29742 * Makefile.am: Got tired of typing the full pathname to pedump.
29743 Until there is another option, am installing this.
29745 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
29747 * class.c (class_compute_field_layout): always set field->parent
29748 (mono_ldtoken): use mono_defaults.fieldhandle_class;
29750 2003-02-11 Dick Porter <dick@ximian.com>
29753 * monitor.c: Rewrote Monitor, making lock much faster and
29754 Pulse/Wait work as specified. Also uses much fewer handles, and only
29755 creates them as needed.
29757 * exception.c: Added SynchronizationLockException
29759 * threads.c: Deleted old Monitor implementation. The new one is
29762 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
29764 * class.c: handled TypedReference type code. Set the correct size for
29765 class data. Setup interface_offsets for interface classes, too.
29767 2003-02-09 Martin Baulig <martin@ximian.com>
29769 * debug-mono-symfile.h: Reflect latest symbol writer changes.
29771 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
29773 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
29774 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
29775 * object.c: fixed mono_object_get_virtual_method () for interfaces.
29776 * verify.c: check for code that runs after the end of the method.
29778 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29780 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
29781 "System.Math::Round2".
29782 * sysmath.h: Added Floor, Round and Round2 definitions.
29783 * sysmath.c: Modified certain functions that were not 100% compliant
29784 with MS.NET (math precision) and added the implementation of Floor,
29787 2003-02-07 Martin Baulig <martin@ximian.com>
29789 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
29791 2003-02-07 Martin Baulig <martin@ximian.com>
29793 * debug-mono-symfile.c: Reflected latest symwriter changes.
29794 (mono_debug_create_mono_symbol_file): Removed.
29795 (mono_debug_open_mono_symbol_file): Take an argument which
29796 specifies whether to create a dynamic symbol file.
29798 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
29800 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
29802 2003-02-05 Martin Baulig <martin@ximian.com>
29804 * reflection.c (mono_image_build_metadata): Make this public,
29805 protect it against being called multiple times, don't create
29806 resources and don't build the compressed metadata here.
29807 (mono_image_create_pefile): Do this here.
29810 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
29812 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29814 * socket-io.c: fixed bug #36322.
29816 2003-02-06 Piers Haken <piersh@friskit.com>
29820 * debug-mono-symfile.c:
29826 * socket-io.c: warning cleanups
29828 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
29830 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
29831 function. works like remoting invoke, but does a check for the Proxy first.
29833 2003-02-05 Miguel de Icaza <miguel@ximian.com>
29835 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
29837 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
29839 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
29841 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
29842 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
29844 * object.c (mono_store_remote_field_new): used by the new jit
29845 instead of mono_store_remote_field
29846 (mono_load_remote_field_new): used by the new jit
29847 instead of mono_load_remote_field
29849 2003-02-05 Patrik Torstensson
29851 * appdomain.c: changed unload to take the domain id instead
29854 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
29857 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29859 * appdomain.c: don't look for assemblies in ApplicationBase if
29860 PrivateBinPathProbe is set.
29862 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29864 * object.c: make the first argument in main_args contain the absolute
29865 path to the assembly. Fixes bug #37511.
29867 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29869 * icall.c: get correct UTC offset for countries not using daylight
29870 time saving. Fixes bug #30030.
29872 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29874 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
29875 and 1 are the family).
29877 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
29879 * icall.c (ves_icall_InternalExecute): removed wrong assertion
29881 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
29883 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
29885 * reflection.c: added support for SignatureHelper tokens, which is
29886 needed by the Calli opcode.
29888 * reflection.h: track changes to SignatureHelper class.
29890 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
29892 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29894 * appdomain.c: fixed loading assemblies from PrivateBinPath.
29896 2003-02-03 Patrik Torstensson
29897 * appdomain.[c|h], domain.c :
29898 - Added support for getting a domain via domain id
29899 - Support for setting and getting domain from System.AppDomain
29900 (used in cross appdomain channel)
29901 - Added support for get/set for a MonoAppContext on a thread
29902 (Context class in System.Runtime.Remoting.Contexts),
29903 - Removed hack in Get/SetData and ExecuteAssembly.
29905 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
29906 the managed world to get control when a proxy is created.
29908 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
29910 2003-02-03 Miguel de Icaza <miguel@ximian.com>
29913 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29914 Populate the codebase field as well.
29916 2003-02-02 Martin Baulig <martin@ximian.com>
29918 * debug-mono-symfile.c
29919 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
29920 (mono_debug_symfile_add_method): Allow interncalls.
29922 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29924 * icall.c: throw parse exception if strtod fails or the string is empty.
29926 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
29928 * marshal.c: handle object type separately from defined
29931 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
29933 * marshal.c: handle NATIVE_LPSTR for strings when it's
29934 explicitly specified.
29936 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
29938 * reflection.c, reflection.h, icall.c: setup the reflection
29939 handle cache for ModuleBuilders and AssemblyBuilders.
29941 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
29943 * reflection.c (reflection_methodbuilder_to_mono_method): set
29946 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29948 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
29950 2003-01-29 Dick Porter <dick@ximian.com>
29952 * threads.c: No need for the fake_thread kludge now that Thread
29953 doesn't run a class constructor
29955 2003-01-29 Dick Porter <dick@ximian.com>
29957 * threads.c: Use g_direct_hash instead of the rather bogus
29960 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
29962 * marshal.c (mono_marshal_get_native_wrapper): add check for null
29963 (fix pinvoke12.exe)
29964 (mono_marshal_get_struct_to_ptr): generate valid IL code
29965 (mono_marshal_get_ptr_to_struct): generate valid IL code
29966 (*): correctly set sig->pinvoke, we need to memdup the signature
29969 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29971 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
29972 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
29974 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29976 * profiler.c: provide more callers information.
29978 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
29980 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
29982 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
29984 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
29986 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29988 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
29989 exception instead of going into an infinite loop on dates which it
29992 * string-icalls.c (ves_icall_System_String_get_Chars): raise
29993 out-of-range exception if needed.
29995 * class.c (mono_class_setup_vtable): allow a virtual method to provide
29996 an implementation for an interface method and to override an inherited
29997 method at the same time.
29998 Imagine a scenario when a virtual method is used to override a
29999 virtual abstract method in a parent class, and this same method
30000 provides an implementation for an method inherited from an interface.
30001 In this case, the interface resolution code will set im->slot, which
30002 means that the virtual method override pass will skip this method
30003 which means a pointer to the abstract method inherited from the parent
30004 will remain in the vtable of this non-abstract class.
30006 * class.c: (mono_class_setup_vtable): continue search for a real
30007 method if only an abstract method is found.
30009 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
30011 * reflection.c: add size to encoding for ByValStr and ByValArray
30012 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
30014 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30016 * class.c (mono_class_setup_vtable): pass the override info as an
30019 * class.c (mono_class_setup_vtable): set the slot of overriding methods
30022 * reflection.c (ensure_runtime_vtable); add support for method
30025 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30027 * reflection.c (resolution_scope_from_image): Hack to work to work with
30028 dynamic assemblies.
30030 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
30031 added a 'force_ref' argument to force this function to allways return
30032 a TypeRef. This is needed by mono_image_get_memberref_token ().
30034 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30036 * reflection.c (mono_image_get_type_info): interfaces really don't have
30039 * reflection.c (mono_image_basic_init): fill out missing fields of
30042 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
30043 dynamic assemblies. This is required so dynamic assemblies show up in
30044 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
30045 Type::GetType() etc. This is consistent with MS behaviour.
30047 * image.c image.h reflection.c: add newly created classes to the name
30048 cache so mono_class_get () will find them.
30050 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
30052 First part of changes to get IKVM.NET running under mono.
30054 * appdomain.h, appdomain.c: added new function
30055 mono_domain_try_type_resolve() which will emit TypeResolve events.
30056 This function will call AppDomain::DoTypeResolve to do the actual work.
30058 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
30059 moved existing code dealing with dynamic tokens to a new function
30060 called mono_reflection_lookup_dynamic_token (). This function will
30061 raise TypeResolve events when appropriate. Since reflection.c is not
30062 part of libmetadata, a new hook function called
30063 mono_lookup_dynamic_token() is added to class.c which will call this.
30065 * assembly.h assembly.c: make the invoke_load_hook function public,
30066 so it can be called for dynamic assemblies.
30068 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
30070 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
30073 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
30074 MonoGHashTable, since it contains pointers to objects which the GC
30077 * assembly.c (search_loaded): remove unused variable.
30079 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
30081 * object.c: fixed issue exposed by gcc-generated IL programs
30082 that use RVA data for pointers.
30084 2003-01-25 Martin Baulig <martin@ximian.com>
30086 * threads.c (start_wrapper): Moved the initialization of
30087 `start_func' above the mono_new_thread_init() call to which we
30088 pass it as argument.
30090 2003-01-24 Martin Baulig <martin@ximian.com>
30092 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
30093 the MonoThread pointer.
30095 2003-01-21 Miguel de Icaza <miguel@ximian.com>
30097 * icall.c: Rename `PowImpl' to Pow.
30099 2003-01-23 Dick Porter <dick@ximian.com>
30101 * threads.c (start_wrapper): Create a Thread object if needed, so
30102 the Main() thread can do the class initialisation in a subthread
30103 that has been set up to allow managed code execution.
30105 Pass the thread ID instead of the MonoThread pointer to the thread
30106 start and attach callbacks. This change is required, because the
30107 jit thread start callback must be called _before_ the Thread
30108 object can be created.
30110 (mono_thread_init): Removed much object creation code that is no
30111 longer needed. No managed code is called from here now.
30113 * object.c (mono_runtime_exec_managed_code): Create a subthread
30114 for Main, and call back to the runtime to use it.
30115 Set the exit code when Main exits.
30117 * gc.c: Make sure domain finalisation happens in a subthread.
30118 Re-enable threaded GC, fixing bug 31333 (again).
30120 * environment.c: System.Environment internall calls (so far just
30121 ExitCode is here, the others are still in icall.c)
30123 * appdomain.c (mono_runtime_cleanup): All threads running managed
30124 code should have finished before mono_runtime_cleanup() is
30125 reached, so no need to clean up threads.
30127 2003-01-22 Martin Baulig <martin@ximian.com>
30129 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
30130 `gpointer func' arguments.
30131 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
30132 but added `MonoThread *thread' argument.
30133 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
30135 * threads.c (mono_new_thread_init): Added `gpointer func' argument
30136 and pass it to the mono_thread_start_cb callback.
30137 (mono_install_thread_callbacks): New public function to install a
30138 set of callbacks which are set by the debugger.
30139 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
30141 2003-01-22 Martin Baulig <martin@ximian.com>
30143 * Makefile.am: Install debug-mono-symfile.h.
30145 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
30147 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
30149 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
30151 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
30152 * class.c (mono_ptr_class_get): correctly set access levels of pointers
30153 (mono_array_class_get): correctly set access levels of arrays
30155 2003-01-20 Patrik Torstensson
30156 * image.h (MonoAssemblyName): changed major, minor, build, revision
30157 from signed to unsigned.
30159 2003-01-20 sean kasun <skasun@azstarnet.com>
30161 * reflection.c (load_cattr_value): Now this handles
30162 MONO_TYPE_SZARRAY. Fixes bug #35629
30164 2003-01-20 Miguel de Icaza <miguel@ximian.com>
30166 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
30169 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30171 * decimal.c: fixed bug #26056.
30173 2003-01-17 Martin Baulig <martin@ximian.com>
30175 * gc.c: Raise an ExecutionEngineException instead of using g_error().
30177 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30180 (mono_get_exception_type_initialization): new function.
30182 * object.c: throw a TypeInitializationException when an exception is
30183 thrown invoking the class constructor.
30185 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30187 * reflection.c: fixed attribute reading.
30189 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30192 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
30193 provided, look for the type in the calling assembly and then in
30194 mscorlib; if the assembly name is provided, only try that one.
30196 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
30198 * object.c: register the vtable before there is a chance it's
30199 queried again recursively.
30201 2003-01-13 Duncan Mak <duncan@ximian.com>
30203 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
30206 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
30208 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
30210 2003-01-11 Martin Baulig <martin@ximian.com>
30212 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
30213 this to 20 for the release.
30215 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
30217 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
30219 * loader.c (mono_method_get_marshal_info): bug fix
30221 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
30222 structures with explicit layout
30224 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
30226 * profiler.c: made the output more readable (and sorted).
30227 Added caller information for the allocation profiler.
30229 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
30231 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
30233 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30235 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
30236 to get value types.
30238 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
30240 * object.c, profiler.h, profiler.c, profiler-private.h:
30241 Added object allocation profiler.
30243 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
30245 * reflection.h, reflection.c: handle global methods.
30246 Compress blob entries.
30248 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
30250 * marshal.c: fix compilation.
30252 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
30254 * loader.c (mono_method_get_marshal_info): impl.
30256 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
30258 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30260 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
30261 for reference types.
30263 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
30265 * loader.c: fixed off by one error in loaded parameter names.
30267 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
30269 * marshal.c (mono_marshal_get_icall_wrapper): like
30270 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
30271 instead of a MonoMethod.
30273 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30275 * decimal.c: fixed bug #36537.
30277 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
30279 * marshal.c: throw a missing method exception if a
30280 P/Invoke method is not found.
30282 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
30284 * icall.c: allow a null this for constructors.
30286 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
30288 * icall.c: raise the proper exceptions if the arguments to the
30289 internal Invoke are incorrect.
30291 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
30293 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
30295 2003-01-03 Martin Baulig <martin@ximian.com>
30297 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
30299 2002-12-31 Martin Baulig <martin@ximian.com>
30301 * debug-mono-symfile.c: Completely rewrote the type section.
30302 Instead of using individual malloc()ed fields, we use one big
30303 continuous memory area and offsets into this area.
30304 See the comments in the source code for details.
30306 2002-12-30 Martin Baulig <martin@ximian.com>
30308 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
30310 2002-12-30 Martin Baulig <martin@ximian.com>
30312 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
30313 line number table in this data blob instead of using an external
30316 2002-12-28 Martin Baulig <martin@ximian.com>
30318 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
30320 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
30322 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
30323 as a boxed return type.
30325 2002-12-21 Miguel de Icaza <miguel@ximian.com>
30328 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
30329 g_build_filename to properly get separators on the filename created.
30331 * object.h: Small change, introduce MonoMarshalByRefObject to
30332 track the layout of that structure in the C# universe as we make
30335 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
30337 * object.c: removed assert to allow static fields on interfaces.
30338 * loader.c: a TypeSpec may be used for any type, not just arrays.
30340 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
30342 * class.c, class.h: added mono_class_array_element_size ().
30343 Ignore static methods in interfaces.
30345 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30347 * threads.c: fixed the build under cygwin.
30349 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
30351 * reflection.c: handle nullref constants. Allocate keys for
30352 reflection handles with the GC.
30354 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
30356 * threads.c, threads.h: added mono_thread_get_abort_signal()
30357 to get a suitable signal for thread abort.
30359 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
30361 * metadata.c: fix handling of ExportedType table.
30363 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30365 * icall.c: added WriteWindowsDebugString internal call.
30367 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30369 * reflection.h: added fields to match C# implementation.
30371 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30373 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
30375 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
30377 * gc.h, gc-internal.h: Rename header for GC internal calls to
30378 gc-internal.h from gc.h as to not clash with Boehm GC having its
30379 header installed as <gc.h> in outside include paths.
30380 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
30381 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
30383 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30385 * icall.c: assign minor, build and revision in FillName.
30387 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
30389 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
30390 Added support for running code generated by Reflection.Emit.
30392 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30394 * appdomain.c: check for NULL argument in LoadFrom.
30396 2002-12-10 Dick Porter <dick@ximian.com>
30398 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
30400 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30402 * appdomain.c: fix buglet when building exe file name. Handle full
30403 assembly name (needed after latest changes to AssemblyName).
30405 (mono_image_close): free some hashtables.
30407 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
30409 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
30410 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
30411 on some systems (redhat 7.3)
30413 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
30415 * threads.c: delete the critical section of a sync block,
30416 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
30418 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
30420 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
30422 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30424 * appdomain.[ch]: handle the assembly preload event to try loading the
30425 assemblies using the paths we have in the current domain.
30427 * assembly.[ch]: created an assembly preload hook that is called to try
30428 loading the assembly by other means that the ones provided here.
30430 * domain.c: initialize the domain search path.
30432 From now on, assemblies (TODO: except corlib and System) are loaded
30433 according to these rules when using mono_assembly_load ():
30435 1. It tries to load the assembly from the ApplicationBase
30436 of the current domain appending .dll and .exe (TODO: have to
30437 try loading from name/name.dll and name/name.exe).
30439 2. It tries the search path specified in PrivateBinPath for the
30440 current domain (if any).
30442 3. Previous behavior.
30444 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
30446 * icall.c: implemented GetInterfaceMap() related icall.
30447 * domain.c, loader.h: load MethodInfo in mono_defaults.
30449 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
30451 * gc.c: disable the finalizer thread for now, untill all the issues
30452 with it are resolved.
30454 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
30456 * string-icalls.c: handle embedded nulls in string ctor when the
30457 length is specified.
30459 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
30461 * class.c: look for explicit interface implementation in parent
30464 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
30466 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
30468 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
30470 * gc.c: protect handles with a critical section.
30472 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30475 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
30476 parameters. If no assembly specified, try getting the type from all
30477 the assemblies in the current domain, else, load the assembly and get
30480 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30482 * marshal.c: applied patch from Aleksey Demakov that fixes
30483 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
30485 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30487 * icall.c: fixed get_location.
30489 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
30491 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
30492 declarations to make it work with older gcc.
30494 * loader.c (mono_get_method): set signature->pinvoke for native calls
30496 2002-11-20 Dick Porter <dick@ximian.com>
30498 * threads.c (mono_thread_init): Set the main thread's handle
30500 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
30502 * gc.c: allow compilation without GC support. Changed to match the
30505 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
30507 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
30509 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
30511 * reflection.c: set a public key token on the core assemblies.
30513 2002-11-18 Dick Porter <dick@ximian.com>
30515 * threads.c: Split out some thread initialisation so that other
30516 files can set the start callback function.
30518 * gc.c: Run finalisers in a separate thread, to avoid stack
30519 overflow. Fixes bug 31333.
30521 * appdomain.c: Set up GC finalisation thread.
30525 * domain.c: Use gc.h macros for GC_malloc
30527 2002-11-15 Dick Porter <dick@ximian.com>
30531 * appdomain.c: Removed mono_runtime_init_with_attach(),
30532 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
30533 merging the extra parameter with the existing function. Removed
30534 unneeded code in mono_thread_attach().
30536 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
30538 * image.c (mono_image_loaded_by_guid): a method to get loaded
30540 (load_metadata_ptrs): we store the guid as string.
30542 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
30544 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
30546 * metadata.c (mono_guid_to_string): imported method form Zoltan
30547 Varga (slightly modified)
30549 * assembly.c (mono_assembly_open): load precompiled code
30551 * loader.h (MonoMethod): we store the method token for use in the
30554 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30556 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
30557 the hook function called when an assembly is loaded.
30559 * domain.c: Modified file.
30560 (mono_domain_assembly_load): removed hash table insertion of assemblies.
30564 2002-11-07 Miguel de Icaza <miguel@ximian.com>
30566 * reflection.c: Map PEFileKind to the value expected by the WinNT
30569 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30571 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
30572 Read until the buffer is filled completely.
30574 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30576 * icall.c: implemented MonoType.InternalGetEvent ().
30578 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30580 * appdomain.c: implemented InitAppDomainSetup. Delayed
30581 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
30582 the entry_assembly.
30584 * assembly.c: base_dir is now an absolute path ending with
30587 * icall.c: modified get_location according to the above changes.
30589 * object.c: init AppDomain.SetupInformation for the default domain after
30590 we have the entry assembly.
30592 * domain.c: when unloading a domain, setup = NULL.
30594 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
30596 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
30598 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
30600 * object.h, object.c: introduced mono_object_get_virtual_method ()
30601 to lookup the method invoked on an object when a callvirt is done on
30603 * icall.c: make MethodInfo::Invoke() always do a virtual call.
30605 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30607 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
30608 current domain when loaded an assembly and failed to load it.
30610 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
30612 2002-10-31 Dick Porter <dick@ximian.com>
30616 * file-io.c: Return the error status in a parameter, as the
30617 GetLastError() value has long since been blown away if we try and
30618 look it up in a subsequent internal call invocation. Delete the
30619 GetLastError() internal call, because it's useless.
30621 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
30623 * class.[ch]: added cast_class to fix bug 29517
30625 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
30627 * marshal.c: create valid IL code in the filter clause:
30628 the new JIT is less forgiving:-)
30630 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30632 * icall.c: removed get_property internal call.
30634 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
30636 * appdomain.h domain.c: Added an ID to appdomains.
30638 * threads.c threads.h icall.c: Implement icall
30639 Thread:GetDomainID(), and remove unused icall
30640 CurrentThreadDomain_internal.
30642 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30644 * icall.c: Don't recurse through the base types in GetConstructor.
30647 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
30649 * mempool.h, mempool.c: added mono_mempool_empty() and
30650 mono_mempool_stats().
30652 2002-10-23 Dick Porter <dick@ximian.com>
30656 * icall.c: Added MonoIO.GetFileType internal call
30658 2002-10-17 Dick Porter <dick@ximian.com>
30660 * appdomain.c (mono_runtime_cleanup): Don't signal the async
30661 delegate semaphore before waiting for all threads to finish,
30662 because new threads can also call async delegates. Fixes bug
30665 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
30666 of 3 seconds, in case another async job is queued. (This part is
30667 needed because the bug fix reintroduced the 3s exit lag.) This
30668 makes the mono_runtime_shutdown flag superfluous.
30670 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
30672 * reflection.c: include ehader size in method section headers.
30673 Really check for suplicated modules entries.
30675 2002-10-17 Martin Baulig <martin@gnome.org>
30677 * debug-mono-symfile.c: Added back support for locals.
30679 2002-10-14 Martin Baulig <martin@gnome.org>
30681 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
30684 2002-10-14 Martin Baulig <martin@gnome.org>
30686 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
30687 mono_class_get() instead of looking in the class cache.
30689 2002-10-13 Martin Baulig <martin@gnome.org>
30691 * debug-mono-symfile.c: Set version number to 28, include the
30692 signature in method names.
30694 2002-10-13 Martin Baulig <martin@gnome.org>
30696 * debug-mono-symfile.h: Set version number to 27.
30698 2002-10-11 Martin Baulig <martin@gnome.org>
30700 * gc.c: Don't register/unregister NULL pointers as disappearing links.
30702 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30704 * metadata.c, metadata.h: added helper function to allocate signatures.
30706 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30708 * icall.c: added internal call to get the location of machine.config.
30710 2002-10-08 Martin Baulig <martin@gnome.org>
30712 * debug-mono-symfile.c: Ignore classes with a pending init for the
30715 2002-10-03 Dick Porter <dick@ximian.com>
30717 * threads.c: Freebsd pthread_t is a pointer
30719 2002-10-03 Dick Porter <dick@ximian.com>
30721 * socket-io.c: Implemented GetHostName_internal
30723 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30726 (mono_config_parse_file): don't leak the text.
30728 2002-10-02 Martin Baulig <martin@gnome.org>
30730 * debug-mono-symfile.c: Added support for methods.
30732 2002-10-01 Martin Baulig <martin@gnome.org>
30734 * debug-mono-symfile.c: Don't emit methods and line numbers for
30735 the dynamic symbol file, just write the type table. We can easily
30736 have an external helper program which creates a symbol file for an
30739 2002-10-01 Dick Porter <dick@ximian.com>
30741 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
30742 Only add the handle to the cleanup array when we're about to
30743 launch the thread. Bug 31425 deadlocked when the test was run on
30746 2002-10-01 Martin Baulig <martin@gnome.org>
30748 * debug-mono-symfile.c: Added support for properties.
30750 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30752 * reflection.c: unaligned store fix from Mark Crichton
30753 <crichton@gimp.org>.
30755 2002-09-27 Martin Baulig <martin@gnome.org>
30757 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
30760 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
30762 * assembly.h, assembly.c: use a sane API to hook into the assembly
30763 loading process instead of a useless special-purpouse hack
30764 (ngen needs a hook, too, for example).
30766 2002-09-27 Dick Porter <dick@ximian.com>
30768 * threads.c (mono_thread_init): Call GetCurrentProcess() so
30769 io-layer can set up some process handle info. Not needed on w32,
30770 but doesn't hurt either.
30772 * process.c: Pass the program name in the second parameter to
30773 CreateProcess, so the path is searched. Include the working
30774 directory. Implemented process name, process enumeration, and some
30775 process detail internal calls.
30777 * icall.c: Added internal calls for process lookup, and some
30780 2002-09-26 Martin Baulig <martin@gnome.org>
30782 * assembly.c (mono_install_open_assembly_hook): New global
30783 function to install a function to be invoked each time a new
30784 assembly is loaded.
30785 (mono_assembly_open): Run this callback function if set.
30787 * debug-mono-symfile.c: Put back line numbers for the dynamic
30788 symbol file and also record the .il file as source file. This
30789 allows us to install the temporary symbol file as `file.dbg' just
30790 like a compiler-generated one.
30792 2002-09-26 Nick Zigarovich <nick@chemlab.org>
30794 * Corrected typo in gc.c (BOHEM vs BOEHM).
30796 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30798 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
30799 GetProperties. Also avoid calling g_slist_length in GetProperties and
30802 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30804 * reflection.c: avoid unaligned stores (bug spotted by
30805 Mark Crichton <crichton@gimp.org>).
30807 2002-09-25 Martin Baulig <martin@gnome.org>
30809 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
30810 instead of guint64 for addresses and added prologue/epilogue info.
30812 2002-09-25 Martin Baulig <martin@gnome.org>
30814 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
30815 store line number info. For the dynamic symbol file, we only need
30816 to provide the JIT generated dynamic line number info for the dynamic
30819 2002-09-25 Martin Baulig <martin@gnome.org>
30821 * debug-mono-symfile.h: Incremented version number.
30823 2002-09-24 Martin Baulig <martin@gnome.org>
30825 * class.c (mono_debugger_class_init_func): New global function
30827 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
30830 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
30831 function. This is called via the mono_debugger_class_init_func
30832 hook to add all types to the dynamic type table.
30833 (ves_icall_MonoDebugger_GetType): New interncall to get a class
30834 from its metadata token.
30836 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
30837 New interncall for the debugger.
30839 2002-09-24 Nick Drochak <ndrochak@gol.com>
30841 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
30842 before using it in case it is null.
30844 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30846 * metadata.c: allow custom modifiers in local var signatures
30847 (bug spotted by Zoltan Varga).
30849 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
30851 * class.c: deal with the <Module> class that may have a NULL vtable.
30852 Eliminate warnings.
30854 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30856 * image.c, image.h: more strong name helpers.
30857 * monosn.c: more work: convert pem keys to cryptoapi format.
30859 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30861 * string-icalls.c: speedup IndexOf.
30863 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30865 * icall.c: updates from Zoltan.2.Varga@nokia.com.
30867 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30869 * icall.c: cleanup: use mono_object_domain ().
30871 2002-09-23 Martin Baulig <martin@gnome.org>
30873 * debug-mono-symfile.c: Improved type support.
30875 2002-09-22 Martin Baulig <martin@gnome.org>
30877 * debug-mono-symfile.c: Added support for reference types and strings.
30879 2002-09-22 Martin Baulig <martin@gnome.org>
30881 * debug-mono-symfile.c: Started to work on the type table.
30883 2002-09-21 Martin Baulig <martin@gnome.org>
30885 * debug-mono-symfile.c: Largely reworked the symbol table format.
30886 The symbol table is now incrementally updated each time a new
30887 method is added. We're now also using our own magic and version
30888 so that you don't need to recompile all your classes if the
30889 dynamic table changes.
30890 (mono_debug_update_mono_symbol_file): Removed.
30891 (mono_debug_symfile_add_method): New function to add a method.
30893 2002-09-21 Martin Baulig <martin@gnome.org>
30896 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
30899 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
30900 New interncall to get a method from its metadata token.
30902 2002-09-21 Martin Baulig <martin@gnome.org>
30904 * debug-mono-symfile.c: Create type table.
30906 2002-09-20 Martin Baulig <martin@gnome.org>
30908 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
30910 2002-09-20 Martin Baulig <martin@gnome.org>
30912 * debug-mono-symfile.c: Provide information about params and locals.
30914 2002-09-20 Martin Baulig <martin@gnome.org>
30916 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
30919 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
30920 interncall to get a method from its metadata token.
30922 2002-09-20 Martin Baulig <martin@gnome.org>
30924 * debug-mono-symfile.c: Added a few checks for method->header
30925 being non-NULL. This should never happen, but for the moment
30926 let's use a g_warning() rather than a g_assert().
30928 2002-09-19 Mark Crichton <crichton@gimp.org>
30930 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
30931 even if support for it isn't present. Added an #ifdef to fix this.
30933 * socket-io.c: Added checks back for Solaris support.
30935 2002-09-19 Martin Baulig <martin@gnome.org>
30937 * debug-mono-symfile.c (read_string, write_string): Reflect latest
30938 changes in the symbol file format.
30940 2002-09-18 Martin Baulig <martin@gnome.org>
30942 * debug-mono-symfile.c: Set version number to 21.
30944 2002-09-18 Dick Porter <dick@ximian.com>
30946 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
30947 on netbsd. Fixes bug 30051.
30949 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30952 (set_version_from_string): little fix.
30954 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30956 * monosn.c, Makefile.am: added strong name utility.
30957 * reflection.h, reflection.c: implemented delayed signing,
30958 locale, version and hash id assembly attributes.
30960 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30962 * loader.c, metadata.c: load param attributes in signatures.
30964 2002-09-16 Martin Baulig <martin@gnome.org>
30966 * debug-mono-symfile.c: Added string table with all method names.
30968 2002-09-14 Martin Baulig <martin@gnome.org>
30970 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
30971 fast method lookup.
30973 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30975 * reflection.c: record the public key token of referenced assemblies.
30977 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30979 * image.c, image.h: added functions to get the strong name and the
30980 public key of an assembly.
30981 * pedump.c: use them.
30983 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
30985 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
30987 2002-09-12 Miguel de Icaza <miguel@ximian.com>
30989 * marshal.c (mono_marshal_get_managed_wrapper): Added
30992 2002-09-11 Martin Baulig <martin@gnome.org>
30994 * gc.c: Call GC_unregister_disappearing_link() on all links when
30995 finalizing them, this is necessary to aviod a crash in boehm's
30998 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31000 * gc.c: handle GetTarget for finalized objects spotted and fixed by
31003 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31005 * icall.c: implemented MonoType::Module.
31006 * reflection.c, reflection.h: mono_module_get_object () from
31007 Tomi Pakarinen <tomi.pakarinen@welho.com>.
31009 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31011 * icall.c: ignore overridden methods in GetMethods ().
31012 Fix for FieldInfo::SetValue().
31013 * object.c: handle float/double in runtime invoke.
31015 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31017 * object.c: allow a constructor to be called again on an object.
31019 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31021 * class.h, class.c: move field layout code to it's own function and
31022 export it. Get an interface id earlier. Move fields in MonoClass
31023 so they are more cache friendly and align the bitfields.
31024 * loader.c: temporary handle get_param_names() for a runtime method.
31025 * reflection.c, reflection.h: more code to handle runtime creation of
31028 2002-09-09 Martin Baulig <martin@gnome.org>
31030 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
31031 signature with the pinvoke field being set for the actual call.
31033 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31035 * icall.c: removed some unused icalls. Start of map of glib charsets
31036 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
31038 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31040 * debug-helpers.c: break infinite loop (found and fixed by
31041 Holger Arnold <harnold@gmx.de>).
31043 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31045 * icall.c: target may be null in create_delegate.
31047 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31049 * marshal.c: handle a boolean return type.
31051 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31053 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
31055 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31057 * gc.c: fix weakreferences.
31059 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31061 * icall.c: added icall to get default codepage.
31063 2002-09-03 Dick Porter <dick@ximian.com>
31066 * threads.c: Use MonoThread instead of MonoObject where
31069 Store running thread objects in a hash table, so that we have all
31070 the info to hand when waiting for them to finish
31071 (means we don't need OpenThread() any more, so mingw builds should
31072 be fully functional again.)
31075 * object.h: Added thread ID to MonoThread
31077 2002-09-03 Martin Baulig <martin@gnome.org>
31079 * icall.c (System.Reflection.Assembly::get_location): New interncall.
31081 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31083 * icall.c: fixed leak in get_temp_path. Thanks lupus.
31085 2002-09-03 Martin Baulig <martin@gnome.org>
31087 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
31088 argument to store the end address of the disassembled instruction.
31090 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
31091 here from debug-symfile.h.
31092 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
31093 JIT into this struct.
31094 (MonoSymbolFile): Added `char *image_file' field.
31095 (MonoDebugGetMethodFunc): Removed.
31096 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
31097 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
31098 (mono_debug_find_method): New method.
31100 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
31101 create a full symbol file.
31102 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
31103 and static symbol files.
31104 (mono_debug_find_method): The symbol file keeps an internal method hash,
31105 call this to get a MonoDebugMethodInfo from a MonoMethod.
31107 * debug-symfile.[ch]: Removed.
31109 2002-08-29 Miguel de Icaza <miguel@ximian.com>
31111 * image.c (do_mono_image_open): Remove linker version check.
31113 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
31115 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
31116 wrappers for instance methods.
31118 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31120 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
31122 2002-08-28 Dick Porter <dick@ximian.com>
31124 * Makefile.am: Export HOST_CC for w32 builds
31126 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31128 * file-io.c process.c: MonoString are null terminated, no
31129 need for mono_string_to_utf16() anymore.
31131 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31133 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
31135 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
31137 * icall.c, reflection.h: speedup System.MonoType.
31139 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31141 * reflection.c: allow null as the value of a string argument in
31142 custom attributes constructors.
31144 2002-08-27 Martin Baulig <martin@gnome.org>
31146 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
31147 `trampoline_address' field.
31149 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
31151 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
31152 check (fixes bug #29486)
31154 2002-08-27 Martin Baulig <martin@gnome.org>
31156 * debug-mono-symfile.c: Changed the file format in a way that allows us
31157 open it read-only and to use a specially malloced area for all the
31158 dynamic data. We can now also generate a symbol file on-the-fly if we're
31159 debugging IL code and there is no MCS generated symbol file for it.
31161 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31163 * object.c: added a define for a good string and array
31164 creation speedup (not enabled by default because we need to deal with
31167 2002-08-26 Martin Baulig <martin@gnome.org>
31169 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
31170 function to create a dynamic symbol file. This is used by the
31171 debugger to create a symbol file for IL code on-the-fly.
31173 2002-08-26 Martin Baulig <martin@gnome.org>
31175 * loader.c (mono_lookup_pinvoke_call): Include the error message
31176 from g_module_error() in the error message.
31178 2002-08-24 Martin Baulig <martin@gnome.org>
31180 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
31181 function to update the symbol file. The symbol file is mmap()ed
31182 writable, but private. This allows us to install the symbol file
31183 together with the assembly.
31185 2002-08-24 Martin Baulig <martin@gnome.org>
31187 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
31188 but they can read the new symbol file format which mcs is now creating.
31190 * debug-symfile.c (mono_debug_find_source_location): Moved to
31191 debug-mono-symfile.c; this is now operating on the new symbol file.
31193 2002-08-23 Martin Baulig <martin@gnome.org>
31195 * debug-helpers.c (mono_method_desc_from_method): New function to get
31196 a MonoMethodDesc from a MonoMethod.
31198 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31200 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
31201 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
31203 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31205 * string-icalls.[ch]: make helper methods static.
31207 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31209 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
31210 types to it and to SetValueInternal.
31212 * object.c: Moved handle_enum label to its proper place. This was the
31215 This time i compiled mcs and gtk-sharp and they both work.
31217 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31219 * icall.c: reverted partially my previous patch until
31220 object.c:set_value handles enums correcly.
31222 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31225 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
31226 (ves_icall_System_Environment_get_MachineName): removed warning when
31227 compiling under cygwin.
31229 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31231 * object.c: fixed field_get_value() for reference types.
31233 2002-08-22 Dick Porter <dick@ximian.com>
31235 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
31236 Don't free a buffer while it's still needed. Patch from Jonathan
31237 Liger <Jonathan.liger@wanadoo.fr>
31239 2002-08-21 Miguel de Icaza <miguel@ximian.com>
31241 * icall.c (ves_icall_System_Environment_get_Platform): Add new
31244 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
31246 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
31247 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
31249 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
31250 we call unmanaged code which throws exceptions.
31252 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31254 * appdomain.h: added per-domain entry_assembly.
31255 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
31257 * icall.c: Assembly::GetEntryAssembly icall.
31258 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
31259 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
31261 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31263 * appdomain.h, gc.c: added mono_domain_finalize ().
31265 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31268 (mono_print_unhandled_exception): changed g_warning by g_printerr
31269 because g_log has a 1024 characters limit (yeah, i got a big stack
31270 trace). Don't print exception name, that should be in ToString
31273 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31275 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
31276 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
31278 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31281 (mono_print_unhandled_exception): after previous commit, i realized
31282 that MS calls ToString on the exception. I changed this function to
31283 do that. This way we get stack_trace for free.
31285 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31288 (mono_print_unhandled_exception): invoke Message property instead of
31289 getting 'message' field from Exception. Don't allocate memory for
31290 'trace' and 'message' if not needed.
31292 2002-08-18 Dick Porter <dick@ximian.com>
31294 * unicode.c: Fix asserts to match Encoder.cs checks
31296 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31298 * marshal.c: fix unaligned store issue and a few wrong
31299 opcode argument types.
31301 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31303 * icall.c: added GetUninitializedObjectInternal internal call.
31305 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
31307 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
31308 to the right domain.
31310 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
31312 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
31314 * class.c (class_compute_field_layout): set blittable to false for Strings
31316 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
31318 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31320 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
31321 first chunk of code to create types at runtime. Code to
31322 handle ReflectedType/DeclaringType. Make reflection handles
31325 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31327 * class.c: set correct name in arrays.
31329 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
31331 * appdomain.c (mono_domain_transfer_object): make it work with
31332 valuetypes. bug fixes.
31334 2002-08-12 Dick Porter <dick@ximian.com>
31336 * object.h: Rename some parameters to avoid c++ keywords (Patch
31337 from Joseph Wenninger <kde@jowenn.at>)
31339 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
31341 * icall.c: added icall to implement Assembly.GetFile*.
31343 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
31345 * reflection.h, reflection.c: code to embed managed resources.
31347 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31349 * class.c: move all the type size stuff into
31350 class_compute_field_layout().
31352 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31354 * class.c: ensure enums have always the correct instance size.
31355 * unicode.c: remove wrong assert.
31357 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31359 * assembly.c: fix mem corruption issue.
31360 * image.h, image.c: added mono_image_get_resource () to access
31362 * icall.c: implemented Assembly.EntryPoint property and some
31363 Managed Resources related internalcalls.
31366 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31368 * image.c, image.h: impemented mono_image_get_entry_point ().
31369 * appdomain.c: use mono_image_get_entry_point.
31371 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31373 * reflection.c: support the object type argument when loading
31376 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
31378 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
31379 String as return type.
31381 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
31383 * reflection.c: fix encoding of named args for custom attrs to match
31384 the ms implementation. Read them back when instantiating custom
31387 2002-08-02 Radek Doulik <rodo@ximian.com>
31389 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
31390 by Dietmar as quick fix
31391 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
31392 16 as stack size, used on more places as quick fix before Dietmar
31393 will fix it properly
31395 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
31397 * object.h, object.c: added accessors for fields and properties.
31399 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31401 * class.c, class.h: made mono_class_get_field_from_name ()
31402 loop on parent types.
31403 Added mono_class_get_property_from_name ().
31405 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31407 * class.c, class.h: move the code to setup the type vtable in its own
31408 function so that it can be reused also for types created at runtime.
31409 Eliminate the "class" identifier from the header file.
31410 * reflection.c: setup the vtable for enums so that we can create
31411 objects for use in SetConstant ().
31413 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
31415 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
31416 instead of the delegate itself as this pointer (bug #28383)
31418 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
31420 * marshal.c (mono_marshal_get_managed_wrapper): added return type
31423 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31425 * loader.c: don't set the pinvoke bit on icalls.
31427 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
31429 * debug-helpers.c (mono_method_full_name): only print a number to
31430 indicate wrapper type (so that the output is more readable in traces).
31432 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
31434 * class.c (mono_class_init): include method override patch from Paolo
31436 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
31438 * icall.c: fixed GetTypeCode().
31440 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
31442 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
31443 use real delegate invoke function to make it work with multicast
31444 delegates (fix bug# 28291).
31446 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31448 * object.c: load constant strings.
31450 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31452 * reflection.c: no magic numbers.
31453 * tabledefs.h: security action enum.
31455 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31457 * assembly.c: fix possible memory corruption.
31459 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31461 * reflection.h, reflection.c: added support for linking resources.
31462 * verify.c: check we have an updated corlib.
31464 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
31466 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
31468 (mono_marshal_string_array): null terminate unmanaged string arrays.
31469 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
31471 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31473 * icall.c: Type.GetType () can now return also types from the
31476 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
31478 * loader.h, loader.c: stack walking support.
31479 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
31480 GetCallingAssembly.
31482 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
31484 * marshal.c: added optimisations for blittable types
31486 * class.c (mono_array_class_get): do not set blittable attribute on arrays
31487 (mono_class_setup_mono_type): set blittable attribute for single
31490 * marshal.c (mono_string_utf8_to_builder): impl.
31491 (mono_string_builder_to_utf8): impl.
31492 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
31494 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
31496 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
31497 (mono_marshal_get_managed_wrapper): impl. byref types
31499 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31502 (search_method): don't display debug message.
31504 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
31506 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
31508 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
31510 * appdomain.c: set the missing filename when throwing exception.
31512 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
31514 * metadata.c (mono_type_size): code cleanup
31515 (mono_type_stack_size): removed some test code
31517 2002-07-21 Miguel de Icaza <miguel@ximian.com>
31519 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
31520 mono_get_exception_file_not_found now.
31522 * exception.c (mono_exception_from_name_two_strings): New version
31523 that will call a constructor with two string arguments.
31524 (mono_get_exception_file_not_found): New helper routine, used to
31525 report file-not-found errors.
31527 2002-07-20 Dick Porter <dick@ximian.com>
31530 * process.c: Pass file handles to CreateProcess
31534 * file-io.c: Implemented CreatePipe
31536 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
31538 * metadata.c (mono_get_param_info): set alignment for value types
31540 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31542 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
31543 Constify mono_domain_assembly_open().
31544 * loader.c: handle null namespace in icalls.
31546 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
31548 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
31549 (emit_str_to_ptr_conv): marshal object as structs
31551 * metadata.c (mono_type_to_unmanaged): marshal object as structs
31553 * marshal.c (mono_marshal_get_runtime_invoke): support value types
31555 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
31557 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
31558 (mono_marshal_get_native_wrapper): we an now return value types
31560 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31562 * verify.c: more checks implemented.
31564 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
31566 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
31568 (mono_marshal_get_native_wrapper): allow byref arguments
31569 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
31570 impl. PtrToStringXXX methods
31571 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
31572 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
31573 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
31574 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
31575 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
31577 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31579 * reflection.c: fix buglet in parsing an assembly name.
31581 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
31583 * marshal.c (emit_ptr_to_str_conv): first impl.
31585 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31587 * object.c, class.h: cache the vtable in the class as suggested by
31588 vargaz@freemail.hu (Zoltan Varga).
31590 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31592 * class.h, loader.c: added mono_field_from_token().
31593 * verify.c: first cut of type checking code.
31595 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
31597 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
31599 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
31601 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
31603 (mono_marshal_get_remoting_invoke): impl.
31604 (mono_delegate_begin_invoke): impl.
31605 (mono_mb_emit_save_args): impl.
31606 (mono_delegate_end_invoke): impl.
31607 (mono_marshal_get_delegate_begin_invoke):
31608 (mono_marshal_get_delegate_end_invoke):
31609 (mono_marshal_get_delegate_invoke): generate a special name for
31610 those methods (including the signature) and associate them whith
31611 the delegate class.
31613 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
31616 (mono_reflection_type_from_name): now it has a MonoImage parameter
31617 which is used as the default image to search the type in. If the image
31618 is NULL or getting the type from it fails, it defaults to corlib.
31620 * icall.c: changed 1 call to mono_reflection_type_from_name to match
31623 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31625 * reflection.c: update the parameter table index.
31627 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31629 * domain.c: don't include the mark byte in the string hash.
31631 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31633 * icall.cs: icall for Type.GetTypeCode ().
31634 * verify: a couple of fixes and disabled local initialization checks.
31636 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
31638 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
31640 * debug-helpers.c (mono_method_full_name): print the type of the
31643 * metadata.c (mono_signature_hash): a hash function for signatures
31644 (mono_signature_hash): better hash algorithm
31646 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
31648 * debug-helpers.c (mono_method_full_name): this can now generate
31649 method names with signatures
31651 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
31652 method dont have this pointers.
31654 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31656 * reflection.c: fixup typebuilder tokens.
31657 * image.c: fix buglet.
31658 * marshal.h: remove whitespace.
31659 * metadata.h, metadata.c: reinstate code that was removed.
31660 * verify.c: handle catch directives and fix another couple of bugs.
31662 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
31664 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
31665 (mono_marshal_get_native_wrapper): make it comp. with the old code
31666 (mono_marshal_get_native_wrapper): support boolean
31667 (mono_marshal_get_managed_wrapper): support more types
31669 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
31671 * class.c (class_compute_field_layout): compute class->blittable attribute.
31673 2002-07-09 Dick Porter <dick@ximian.com>
31675 * threads.c: Make the thread cleaning up cope with threads that
31678 2002-07-08 Radek Doulik <rodo@ximian.com>
31680 * reflection.c (method_encode_code): use non-translated values to
31681 compute finally_start, this fixes exception handling on ppc, yay!
31683 * decimal.h (struct signscale): fix endianess
31685 2002-07-07 Radek Doulik <rodo@ximian.com>
31687 * reflection.c: swap box_val and not val
31689 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31691 * reflection.c, reflection.h: handle full assembly info in type name.
31692 Handle Type arguments when loading custom attributes.
31693 * icall.c: updated to use new mono_reflection_type_from_name () method.
31695 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31698 (method_from_memberref): also print assembly name when method not found.
31700 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31703 (ves_icall_TypeGetProperties): fixed bug #27473.
31705 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31707 * reflection.c: display image name and token when cannot find the
31708 .ctor for an attribute.
31710 2002-07-05 Martin Baulig <martin@gnome.org>
31712 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31714 2002-07-04 Dick Porter <dick@ximian.com>
31716 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
31717 compile on mingw. This will cause mingw builds to not wait for
31718 subthreads to terminate after the main thread does. I've lodged a
31719 bug with the mingw developers for them to wrap OpenThread().
31721 2002-07-03 Dick Porter <dick@ximian.com>
31723 * threads.c: Store thread IDs instead of handles, because
31724 GetCurrentThread() returns a pseudohandle and therefore stores
31725 useless values. mono_thread_cleanup() continues checking the
31726 array of threads until it is empty, to cope with subthreads
31727 spawning new threads after the main thread has finished.
31731 * profiler-private.h: Pass the thread ID to thread profiler
31732 functions, instead of a handle
31734 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31736 * verify.c: fixes to make it more usable.
31737 * pedump.c: added --verify code to verify IL code in an assembly.
31739 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31741 * reflection.c: turn errors into warnings to allow compiling corlib.
31743 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31745 * reflection.c: add special cases to compile corlib.
31747 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31749 * reflection.c: handle properties with only a set method.
31751 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31753 * opcodes.h: add enum with opcodes in opval order.
31755 2002-07-01 Dick Porter <dick@ximian.com>
31758 * object.c (mono_runtime_run_main): Removed unneeded argument
31760 2002-06-28 Martin Baulig <martin@gnome.org>
31762 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31764 2002-06-27 Dick Porter <dick@ximian.com>
31766 * threads.c: Store the handle in both the parent thread and in the
31767 subthread, to minimise the time between starting a new thread and
31770 2002-06-26 Dick Porter <dick@ximian.com>
31772 * appdomain.c (mono_runtime_cleanup): Close the socket library
31773 after all the threads have finished, not before
31775 2002-06-26 Martin Baulig <martin@gnome.org>
31777 * debug-symfile.c (mono_debug_find_source_location): Added
31778 `guint32 *line_number' argument. If it's not NULL, store the line number
31779 there and return the file name without the line number.
31781 2002-06-25 Dick Porter <dick@ximian.com>
31785 * process.c: Process forking and other support functions
31787 2002-06-25 Dick Porter <dick@ximian.com>
31789 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
31790 things dont happen when the image is closed.
31791 (mono_image_lookup_resource): Walk the resource section looking
31792 for a particular entry
31794 * cil-coff.h: PE resource section decoding
31796 2002-06-25 Dick Porter <dick@ximian.com>
31800 (mono_assembly_foreach): Accessor functions to walk the list of
31802 (mono_assembly_set_main):
31803 (mono_assembly_get_main): Process methods need to know which
31804 assembly is the "main" one
31806 * object.c (mono_runtime_run_main): Record the main assembly
31808 * debug-helpers.c: Fix typo
31810 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
31812 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
31813 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
31815 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31817 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
31819 2002-06-21 Miguel de Icaza <miguel@ximian.com>
31821 * image.c (do_mono_image_open): Initialize reference count,
31822 otherwise we leak the MonoImage.
31824 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31826 * reflection.c: small tweak to handle self-hosting.
31828 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31830 * reflection.c: fix type name parse code.
31832 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31834 * reflection.c: break out of the loop.
31835 * image.c: special case corlib.
31837 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31839 * reflection.c: add all the custom attrs at the end to ensure the
31840 ctors have been properly initialized when the attributes are defined
31841 in the current assembly.
31843 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31845 * reflection.c: handle correctly multiple-nested types.
31847 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
31849 * row-indexes.h: fix typos.
31850 * reflection.c: adjust for typos and fix method_def_or_ref
31851 encoding in MethodImpl table.
31853 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31855 * reflection.c: fix entry point patching (thanks Serge!).
31857 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
31859 * verify.c: add check for System.Exception
31861 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31863 * image.c, class.c: minifix for code just c&p'ed.
31864 * reflection.c: warning fix.
31865 * object.h, loader.h, domain.c: load also StringBuilder.
31867 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31869 * marshal.h, marshal.c: some support code to handle complex marshaling.
31871 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31873 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
31874 Better signatures with vtable error dump.
31876 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
31878 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
31880 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
31882 * icall.c (ves_icall_Type_GetField): impl.
31884 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31886 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
31887 to retrieve a marshal description blob for a field or param.
31889 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31891 * reflection.h, reflection.c: change order of nested type emission
31892 to avoid table corruption. The NestedTypes table is sorted.
31893 * icall.c: change order of GetConstructor results to workaround mcs bug.
31895 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31897 * reflection.h, reflection.c: handle field and param marshal
31900 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31902 * icall.c, marshal.c marshal.h: more Marshal class implementation.
31904 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31906 * reflection.c: fix call convention.
31908 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31910 * reflection.h, reflection.c: mono_image_get_memberref_token()
31911 takes a type instead of a class, now. Added
31912 mono_image_get_array_token() to create tokens for the special
31913 multi-dim array methods.
31915 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31917 * assembly.c: handle modules (no assembly table). Split
31918 loading references in its own function.
31919 * class.c: handle moduleref resolution scope.
31920 * image.c, image.h: cache module name in image.
31922 2002-06-07 Martin Baulig <martin@gnome.org>
31924 * reflection.c (mono_image_get_type_info): Only add a class layout entry
31925 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
31927 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31929 * icall.c: more signature fixes that used uint instead of int.
31931 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31933 * reflection.c: fixed signature of field refs.
31935 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31937 * class.c, reflection.c: handle typerefs of nested types
31938 (both on read and when writing files).
31940 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31942 * icall.c: fix method signatures that tried to workaround the previous
31945 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31947 * debug-helpers.c: fix typo.
31949 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31951 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
31952 rewrote the PE/COFF writing code (our programs are understood by the
31955 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31957 * gc.c, gc.h, icall.c: weakreference support.
31959 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31961 * Makefile.am, mono-config.c: use $(sysconfdir).
31963 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31965 * icall.c: changed default precision of Double.ToString() to 15.
31966 Fixed memory leak. Unified with Single.ToString.
31968 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31970 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
31972 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31974 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
31975 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
31976 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
31979 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31981 * debug-symfile.c, sysmath.c: yet more compilation fixes.
31983 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31985 * reflection.c, socket-io.c: more compilation fixes.
31987 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31989 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
31990 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
31991 unicode.c: warning and compiler compatibility fixes.
31993 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31995 * class.h, metadata.c: fixed warnings/compilation errors.
31997 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31999 * Makefile.am, mono-config.c, mono-config.h: configuration file
32001 * loader.c, loader.h: make Dll mapping configurable at runtime in the
32002 config file. Export methods to insert and lookup mappings.
32004 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
32006 * reflection.c: handle types and boxed objects in custom attr
32009 2002-05-30 Martin Baulig <martin@gnome.org>
32012 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
32014 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
32016 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
32017 to lookup the implmap row for a P/Invoke method.
32018 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
32019 P/Invoke method from the runtime on an as needed basis.
32021 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
32023 * metadata.c (mono_metadata_parse_signature): impl.
32025 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32027 * class.c: handle .pack directive.
32029 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
32031 * object.c: initialize static fields with RVA data.
32033 2002-05-25 Martin Baulig <martin@gnome.org>
32036 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
32038 2002-05-24 Martin Baulig <martin@gnome.org>
32041 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
32042 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
32043 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
32045 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
32047 * object.c: special case string ctros in invoke.
32048 * gc.c: silly whitespace changes.
32050 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
32052 * threadpool.[ch]: impl. a threadpool that can
32053 be used by mint and mono.
32055 2002-05-22 Martin Baulig <martin@gnome.org>
32057 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
32058 The first argument is now a `MonoReflectionModuleBuilder *', the return
32059 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
32060 `methods' field to get the method builder. The `token' argument is the
32063 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
32064 invalid characters instead of g_assert_not_reached()ing. This seems
32065 to be the behaviour of mscorlib.
32067 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
32069 * object.c (mono_runtime_invoke_array): applied patch from Rachel
32070 Hestilow to fix bug #25104
32072 2002-05-21 Martin Baulig <martin@gnome.org>
32074 * debug-symfile.c (mono_debug_find_source_location): New function.
32075 Looks up an IL offset in the line number table and returns the source
32076 location as a string.
32078 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32081 (mono_double_ToStringImpl): changed %f by %g until we have something
32084 2002-05-21 Nick Drochak <ndrochak@gol.com>
32086 * icall.c : Use different name for Math.Pow's icall. Needed to check
32087 parameters first in C#.
32089 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32091 * icall.c, reflection.h: added icall to get info about an event.
32093 2002-05-20 Radek Doulik <rodo@ximian.com>
32095 * object.c (mono_value_box): don't use memcpy for boxing on BIG
32097 (mono_value_box): don't use memcpy for small sizes on
32098 architectures with unaligned access
32100 2002-05-20 Martin Baulig <martin@gnome.org>
32102 * reflection.c (mono_reflection_setup_internal_class): Don't crash
32103 if `tb->parent == NULL'.
32104 (mono_reflection_create_internal_class): New function. This is
32105 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
32108 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
32111 2002-05-19 Martin Baulig <martin@gnome.org>
32113 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
32114 argument to get the length, don't default to the array length.
32116 2002-05-18 Miguel de Icaza <miguel@ximian.com>
32118 * assembly.c (mono_assembly_setrootdir): New function used to
32119 override the MONO_ASSEMBLIES directory.
32121 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32123 * icall.c: ValueType_GetHashCode() initialize local var.
32125 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32127 * reflection.c: sort custom attributes table.
32129 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
32131 * reflection.c: support named args in custom attributes (write support).
32133 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
32135 * reflection.c: fix finally position calculation.
32137 2002-05-15 Radek Doulik <rodo@ximian.com>
32139 * reflection.c: fixed endianess at many places
32141 * icall.c (ves_icall_InitializeArray): comment out debug msg
32143 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
32145 * object.c (mono_unhandled_exception): new function to handle
32146 unhandled exceptions.
32147 (mono_unhandled_exception): call the UnhandledException event.
32148 (mono_runtime_delegate_invoke): impl.
32150 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
32152 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
32153 returns the RVA, not the direct pointer to the data. Handle the case
32154 when the class size is fixed.
32156 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
32158 * reflection.c: fix some endianess issues.
32160 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
32162 * object.c (mono_runtime_invoke): is now able to catch exceptions.
32164 * threads.c (mono_thread_init): added a callback which is invoked
32167 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
32169 * icall.c: make GetHashCode return non-negative values.
32171 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
32173 * object.c, icall.c, gc.c: revert to address-based hashcode.
32175 2002-05-13 Miguel de Icaza <miguel@ximian.com>
32177 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
32179 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
32181 * icall.c, class.c: special case <Module>.
32183 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
32185 * icall.c: fix bug in GetNow().
32187 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
32189 * object.c (mono_runtime_class_init): make sure that we call all
32190 static class constructors.
32192 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
32194 * reflection.c: sort methodsemantics table.
32196 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
32198 * reflection.h, reflection.c: honour init locals setting.
32200 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
32202 * icall.c: copied Double ToStringImpl for Single ToStringImpl
32204 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
32206 * reflection.c: support ContructorBuilders in attribute blob creation.
32208 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32210 * reflection.c: some changes to build a binary that can be run
32211 directly in windows.
32213 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
32215 * loader.c: print a big message when an icall can't be found.
32217 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32219 * string-icalls.c: fix bug 24248.
32221 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
32223 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
32224 icall.c, reflection.h: separate assembly loading by pathname and by
32225 assembly name. Use the MONO_PATH env var to search for assemblies.
32227 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
32229 * assembly.c, image.h: add some support for assemblies
32230 with multiple modules.
32231 * class.c, class.h: export mono_class_from_typeref().
32232 * loader.c: remove duplicated code and use mono_class_from_typeref(),
32235 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
32237 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
32238 documentation says (the ECMA one is correct).
32240 2002-05-02 Dick Porter <dick@ximian.com>
32242 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
32243 Don't name the synchronisation mutex.
32245 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
32248 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
32249 Make the prototypes match.
32250 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
32254 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
32255 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
32256 all systems have tm.tm_zone, so use strftime() with %Z to print
32257 the timezone abreviation into a temp string.
32259 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
32260 rather than mono_array_addr() on a MonoString on Big Endian
32263 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
32265 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
32268 2002-04-30 Dick Porter <dick@ximian.com>
32270 * socket-io.c: Cope with SOCKET being an integer rather than a
32273 * threads.c: Added Thread_free_internal, to deal with thread
32274 handle cleanup. Moved calls to handle_store() and handle_remove()
32275 to start_wrapper(), so each can only be called once. Allocate
32276 synchronisation blocks with GC_malloc(), and use GC finalisation
32277 to close the handles.
32279 * icall.c: added System.Threading.Thread::Thread_free_internal
32281 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
32283 * icall.c: support Environment.Exit, CommandLineArgs().
32285 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
32287 * object.c, object.h: added mono_runtime_run_main () and
32288 mono_runtime_get_main_args () for use in System.Environment.
32290 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
32292 * gc.c: fix thinko, enable actual finalization since the jit is now
32295 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32297 * gc.c, object.c: take into account that an object may be offset wrt the address
32298 returned by GC_malloc().
32300 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
32302 * image.c: handle files without entries in the assembly table (modules).
32304 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
32306 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
32307 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
32308 allowed to be null when it's System.Object class setup.
32310 2002-04-27 Martin Baulig <martin@gnome.org>
32312 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
32313 if `tb->parent == NULL' rather than crashing.
32315 2002-04-28 Nick Drochak <ndrochak@gol.com>
32317 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
32318 calling acos() where asin() should have been called.
32320 2002-04-26 Martin Baulig <martin@gnome.org>
32322 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
32323 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
32324 there's a subdirectory called `System', but we don't want to read that
32325 subdirectory as an assembly.
32327 2002-04-25 Martin Baulig <martin@gnome.org>
32329 * debug-symfile.c: Reflect latest MonoString changes.
32331 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
32333 * rand.c, rand.h: instance method icalls need to have an explicit
32334 this pointer as first argument in the C implementation.
32336 2002-04-25 Nick Drochak <ndrochak@gol.com>
32338 * icall.c: Fix typo in map for GetNonZeroBytes
32340 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32342 * string-icalls.c : String does now passes unit tests without any
32343 errors, the following changes has been made:
32345 Implemented replace methods.
32346 Renaming of methods to (try) follow the standard.
32347 Fixed compare ordinal
32348 Made all memory allocated directly to function instead of via icall function.
32349 Small performance fix in is_in_array function
32351 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
32353 c (mono_string_Internal_ctor_charp_int_int):
32354 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
32355 sindex < 0, throw ArgumentOutOfRangeException instead of
32356 ArgumentNullException.
32358 Added new check for length == 0, however
32359 I need to make it return String.Empty from the C code.
32361 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
32362 that calculate the length for us here.
32364 (mono_string_Internal_ctor_sbytep_int_int): Replaced
32365 mono_string_new_utf16 with mono_string_new, since value is utf8.
32367 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32369 * object.c: register the object for finalization if needed.
32370 Allocate one more char in the string for the terminating 0 char.
32372 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
32374 * class.c, class.h, image.c: check if a type implemenst a destructor.
32375 Use the proper key for array class lookups.
32376 * icall.c: register the icalls in the System.GC class.
32377 * gc.c, gc.h: GC-related functions and icalls.
32379 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32383 * unicode.c: free some strings gotten from mono_string_to_utf8 and
32384 changed a couple of free () by g_free ().
32386 * decimal.c: one-liner in the comments for decimal2string ().
32388 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32390 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
32392 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32394 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
32395 * object.c (mono_runtime_invoke_array) : handle null in params
32397 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32399 * string-icalls.c: fixed bug in split (one off bug)
32401 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32403 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
32404 * icalls.c: added String::Equals as internal method
32406 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32408 * threads.c: fixed bug in the double interlocked functions
32410 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
32412 * threads.c: implemented all of the new interlocked icalls.
32413 * string-icalls.c: fix a bug in insert.
32414 * icalls.c: added the icalls for interlocked, removed old string functions.
32416 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32418 * loader.c: fix off-by-one error when reading argument names.
32420 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32422 * profiler.c: win32 counter implementation (untested).
32423 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
32424 (the latter needs testing and more complete impl. from win32 folks).
32426 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
32428 * object.c: mono_array_new_full workaround mono_array_class_get
32431 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32433 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
32434 * object.h (mono_string_chars): Changed casting type.
32436 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32438 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
32439 method signatures to use gunichar2 instead of gint16.
32441 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
32443 * object.h, object.c: domain-specific versions of mono_object_new and
32446 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
32448 * object.c: changed String layout
32450 * string-icalls.c (mono_string_Internal_ctor_chara): added
32451 internal string constructors.
32453 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
32455 * threads.c: pass 'this' to the thread start routine.
32457 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32459 * string-icalls.c: fix IndexOf and LastIndexOf. Now
32460 InternalCompareStr don't call twice mono_string_cmp_char for the last
32461 character. Improved performance in mono_string_cmp_char.
32463 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
32465 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
32466 code into its own library: libmonoruntime.
32468 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
32470 * object.h, object.c: changed array format so that szarrays do not
32471 require a bounds structure.
32472 * icall.c, appdomain.c: support for new szarray format.
32474 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
32476 * metadata.c: compare also the retuns type when comparing signatures:
32477 we didn't do this as an optimization since really overloaded methods
32478 must differ also in the arguments, but this doesn't work with
32479 low-level IL code (or when using explicit conversion operators: see
32480 bug#23498 for an example).
32482 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
32484 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
32486 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
32488 * icall.c: make MonoType::GetElementType its own icall.
32490 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
32492 * icall.c: remove MonoMethod_get_Name().
32493 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
32496 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32498 * string-icalls.c: optimized a few methods.
32500 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32502 * icall.c: added all new string internal calls
32503 * string-icalls.c: added, new string internal call implementation.
32504 * object.c: added mono_string_new_size for allocating a string a size
32506 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
32508 * object.c (mono_object_isinst): use the same code as in the
32509 optimized x86 version.
32511 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32513 * profiler.c: TSC-based timer code (faster and more accurate).
32514 Not hooked up in configure, yet (set USE_X86TSC to 1).
32516 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
32518 * profiler.c, profiler.h: track time spent compiling methods.
32519 * threads.c: track thread creation/destruction.
32521 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
32523 * profiler.c, profiler.h, profiler-private.h: profiling interface
32524 and sample implementation. Moved here so that it can be used also by
32527 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
32529 * reflection.c, reflection.h: keep types and other handles separate in
32530 the hash tables for referred tokens. Add guid for modules.
32532 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
32534 * assembly.c: fix bugs found with valgrind.
32535 * metadata.h, metadata.c: added mono_metadata_guid_heap().
32537 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
32539 * threads: added icall support for getting current domain for
32542 2002-04-13 Martin Baulig <martin@gnome.org>
32544 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
32545 (MonoDebugVarInfo): Added `index' field for register based addresses.
32546 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
32547 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
32548 `MonoDebugVarInfo *params' and `guint32 this_offset' with
32549 `MonoDebugVarInfo *this_var'.
32551 * debug-symfile.c (relocate_variable): New static function to write
32552 a location description for a local variable or method parameter.
32554 2002-04-12 Martin Baulig <martin@gnome.org>
32556 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
32557 stack offset and begin/end scope address of a local variable.
32558 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
32559 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
32560 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
32562 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
32563 Added new relocation types for start/end scope of a local variable.
32565 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32567 * object.h: add mono_object_domain() macro.
32568 * reflection.c: handle typespecs.
32569 * icall.c: MonoMethod::get_Name() implementation.
32571 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32573 * icall.c: String::GetHashCode() icall implementation.
32575 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32577 * icall.c: String::IndexOfAny icall.
32578 * object.c, object.h: make array->max_length more useful.
32579 Intrduced mono_object_class() and mono_string_length() macros.
32581 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32583 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
32584 instead of g_unichar_isdigit.
32586 2002-04-11 Nick Drochak <ndrochak@gol.com>
32588 * icall.c: Implement a simple Double.ToString().
32590 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32592 * appdomain.h: only io-layer.h is supposed to be included.
32593 * icall.c: explicitly import environ. Fix warning.
32595 2002-04-10 Nick Drochak <ndrochak@gol.com>
32597 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
32598 return true even if it's not Daylight Savings time.
32599 Only return false for the case where the function isn't
32600 implemented for a plaform (read Windows).
32602 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32604 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
32607 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
32609 * mempool.c (mono_mempool_alloc): only use g_malloc when
32610 absolutely necessary.
32612 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
32614 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
32616 * class.c (mono_class_vtable): use domain mempool to allocate vtable
32617 (mono_class_proxy_vtable): use domain mempool
32619 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
32621 * appdomain.h, appdomain.c: split initialization that requires the
32622 execution engine support into mono_runtime_init().
32624 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
32626 * class.c (mono_class_init): don't include vtable inside MonoClass
32627 to save some memory, gather some statistics.
32628 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
32630 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32632 * icall.c: internalcall implementation for ValueType.Equals().
32634 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
32636 * object.c (mono_message_init): moved
32637 (mono_runtime_exec_main): new arch. independent impl.
32638 (mono_runtime_invoke_array): new method - like
32639 mono_runtime_invoke, but you can pass an array of objects.
32640 (mono_remoting_invoke): new arch. independent impl.
32641 (mono_message_invoke): new arch. independent impl.
32642 (mono_runtime_class_init): new arch. independent impl.
32643 (mono_runtime_object_init): new arch. independent impl.
32645 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32647 * metadata.c, object.c, reflection.c: documented the exported
32650 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
32652 * icall.c: simpler code to pass the assembly builder data to corlib.
32653 Implement GetNestedTypes() internalcall.
32655 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32657 * class.c: warn if a type can't be loaded.
32659 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
32661 * image.h: typedef MonoImageOpenStatus
32662 * types.h: removed unused file
32664 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
32666 * icall.c: Enum_ToObject accepts enum value arguments.
32668 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
32670 * class.c: move initialization of properties, events and nested
32671 classes, so that they happen for interfaces, too.
32673 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
32675 * icall.c: cleanup some ugly casts in Array_SetValue*.
32677 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32679 * icall.c: the values array fro enums is of the correct type, now.
32680 Implement (correctly) getFullName instead of assQualifiedName for
32682 * reflection.h, reflection.c: added mono_type_get_name ().
32684 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32686 * assembly.c, image.h: for each MonoImage, record from wich assembly
32688 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
32689 Make Type.Assembly work.
32691 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
32693 * debug-symfile.h: use char* instead of gpointer to avoid
32696 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
32698 * icall.c (ves_icall_InternalExecute): impl. FielSetter
32699 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
32701 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
32703 * icall.c (mono_message_init): impl. (code cleanup)
32704 (ves_icall_InternalExecute): impl. FieldGetter
32706 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
32707 defined we call all (non-static)methods through the vtable.
32709 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
32711 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
32712 finalizer even though the memory is still referenced (and the chunk of
32713 memory is not freed).
32715 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
32717 * assembly.c: fix brokeness.
32719 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
32721 * class.c: kill some warnings. Check explicit interface method
32722 implementation also without considering the namespace.
32723 Load also literal strings in static class data.
32725 2002-03-29 Miguel de Icaza <miguel@ximian.com>
32727 * assembly.c (default_assembly_name_resolver): Kill memory leak.
32728 (default_assembly_name_resolver): Make the resolver take the
32729 "base" directory where the assembly was originally defined, so we
32730 can load DLLs that are in the same directory as the assembly that
32731 is being referenced.
32733 2002-03-28 Dick Porter <dick@ximian.com>
32739 * unicode.c: Warning cleanups
32741 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
32743 * object.h, reflection.h: use the correct type instead of MonoObject.
32745 2002-03-28 Martin Baulig <martin@gnome.org>
32747 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
32748 (mono_debug_update_symbol_file): Initialize classes if necessary.
32750 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32752 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
32753 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
32755 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
32757 * assembly.h: fix function prototype.
32758 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
32759 * mono-endian.h: use const cast.
32761 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
32763 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
32765 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32767 * loader.c: don't assert when a typeref can't be loaded, give
32768 a chance to the runtime to trow an exception instead.
32769 * loader.h: fix warning.
32771 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
32773 * class.c (mono_class_proxy_vtable): added proxy support
32775 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
32777 * icall.c: removed last of PAL calls, added System.Environment
32778 * file-io.h, file-io.c: MonoIO implementation
32779 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
32781 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32783 * appdomain.c: do not use the byte marker in ldstr table lookup.
32784 * debug-helpers.c: allow two ':' to separate class and method name.
32785 * object.c: allocate arrays bounds with the GC, too.
32786 * verify: add a few more checks.
32788 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
32790 * reflection.c: output also literal strings. Allocate parameter data
32791 with GC_malloc() (thanks, Martin, for catching this!).
32793 2002-03-26 Martin Baulig <martin@gnome.org>
32795 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
32796 include the `this' offset in the `param_offsets'.
32798 2002-03-25 Martin Baulig <martin@gnome.org>
32800 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
32801 mono_debug_get_class() function to get the classes. Added new
32802 relocation types for arrays and strings.
32803 (mono_debug_get_class): New static function to search in all
32804 referenced assemblies for a metadata token.
32806 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
32808 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32810 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
32811 hold gc-allocated objects. Make the string heap a stream like the
32812 others. Removed duplicated code when writing stream info.
32813 Added asserts to catch possible buffer overflows. Set the sorted map
32814 for tables that need sorting. Added some documentation.
32816 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
32818 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
32819 for interned strings and vtables.
32821 2002-03-24 Martin Baulig <martin@gnome.org>
32823 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
32824 it in the array since it was created with g_slist_prepend().
32826 2002-03-24 Martin Baulig <martin@gnome.org>
32828 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
32829 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
32830 (mono_debug_method_from_token): Renamed to
32831 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
32832 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
32834 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
32837 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
32839 2002-03-24 Martin Baulig <martin@gnome.org>
32841 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
32842 (mono_debug_method_from_token): New func.
32844 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
32845 New interncall, calls mono_debug_local_type_from_signature().
32846 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
32847 calls mono_debug_method_from_token().
32849 2002-03-23 Martin Baulig <martin@gnome.org>
32851 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
32852 specifies the number of bytes to be converted, not the array size.
32853 Return the number of chars, not the number of bytes.
32854 (ves_icall_iconv_get_chars): The `byteCount' argument
32855 specifies the number of bytes to be converted, not the array size.
32857 2002-03-23 Martin Baulig <martin@gnome.org>
32859 * reflection.h (MonoReflectionSigHelper): New type.
32861 * reflection.c (mono_reflection_sighelper_get_signature_local),
32862 (mono_reflection_sighelper_get_signature_local): New functions.
32864 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
32865 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
32868 2002-03-23 Martin Baulig <martin@gnome.org>
32870 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
32871 is_writeable is set.
32872 (mono_raw_buffer_update): New function to write the modified map
32875 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
32877 * debug-symfile.c (mono_debug_update_symbol_file): Call
32878 mono_raw_buffer_update() when done writing.
32880 2002-03-23 Martin Baulig <martin@gnome.org>
32882 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
32884 * debug-symfile.c: Added support for arguments and local variables.
32886 2002-03-23 Dick Porter <dick@ximian.com>
32888 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
32889 protected by ifdefs, hence breaking the w32 build.
32891 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32893 * object.c: implement is_interned() the right way.
32895 2002-03-21 Martin Baulig <martin@gnome.org>
32897 * debug-symfile.[ch]: New files to handle debugging information
32898 files. There's also support to dynamically update these symbol
32899 files to include machine dependent information.
32901 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
32903 * threads.c (mono_thread_create): new function to create thread
32906 2002-03-20 Martin Baulig <martin@gnome.org>
32908 * icall.c (ves_icall_InternalInvoke): Create a new object if the
32909 method is a constructor.
32910 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
32911 points to ves_icall_InternalInvoke().
32913 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
32915 * file-io.c: Flush shouldn't throw exceptions.
32917 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
32919 * file-io.c: FileStream flush support; FileSetLength now
32920 restores file pointer.
32922 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32924 * class.c: set image for pointer classes.
32926 2002/03/19 Nick Drochak <ndrochak@gol.com>
32928 * sysmath.c: Forgot one.
32930 2002-03-18 Miguel de Icaza <miguel@ximian.com>
32932 * sysmath.c: Avoid redefining existing names.
32934 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
32936 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
32937 handled by runtime as icall rather than dllimport from libm.so
32938 * file-io.c, file-io.h: fixed handle argument type.
32940 2002-03-18 Dick Porter <dick@ximian.com>
32942 * reflection.c (mono_image_get_type_info): rename interface to
32943 iface, because of "#define interface struct" on windows.
32945 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
32947 * class.c, class.h: rename and export mono_ptr_class_get().
32948 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
32949 * reflection.c, reflection.h, icall.c: better/saner type name
32950 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
32953 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
32955 * class.c (mono_class_init): removed hardcoded GHC_SLOT
32957 * icall.c (ves_icall_InternalInvoke): impl.
32959 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32961 * reflection.c: output the interface map table, too.
32963 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32965 * class.c (class_compute_field_layout): separate computation of
32966 static field layout
32968 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
32970 * icall.c: added System.Buffer support.
32971 * file-io.c: moved file icalls from PAL to FileStream.
32973 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32975 * icall.c (ves_icall_System_Object_GetHashCode): impl.
32977 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
32979 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
32981 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32983 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
32985 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32987 * debug-helpers.{c,h}: moved here from monograph some useful functions
32988 to locate a method by name/signature in a class or image. Included
32989 also a small and flexible IL disassembler.
32991 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32993 * reflection.c: fixup tokens in methods with small header size, too.
32995 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
32997 * object.c (mono_string_to_utf8): remove assert(!error), instead
33000 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
33002 * icall.c: update to the new mono_Array_class_get interface.
33004 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
33006 * appdomain.c, object.c: Boehm-GC enable.
33007 * icall.c: make get_data_chunk() support split data requests.
33008 Ensure a class is initialized in more cases. Return only the first
33009 property found in GetProperties() or the compiler gets confused.
33010 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
33011 * reflection.h, reflection.c: add fixup mechanism for field and method
33012 tokens. Initialize assembly->typeref in a single place. Output
33013 properties after events. Support custom attributes for events, too.
33014 Typo fix for paramter custom attrs.
33016 2002-03-07 Martin Baulig <martin@gnome.org>
33018 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
33020 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
33022 * class.c (mono_array_class_get): fix. for multi. dim. arrays
33024 2002-03-06 Martin Baulig <martin@gnome.org>
33026 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
33027 non-zero lower bounds. See testcases #F10-#F13.
33029 2002-03-05 Martin Baulig <martin@gnome.org>
33031 * exception.c (mono_get_exception_argument_out_of_range): New exception.
33033 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
33034 ves_icall_System_Array_GetValue(), only calculate the absolute array position
33036 (ves_icall_System_Array_SetValue): Likewise.
33037 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
33038 as argument and does the actual work. This function is used when copying a
33039 multi-dimensional array.
33040 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
33041 now do all the widening conversions of value types.
33042 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
33044 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33046 * class.c: remove some magic numbers and use the smbolic names,
33047 instead. Added init_events() to load event info at class init time.
33048 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
33049 and mono_metadata_methods_from_event().
33050 * reflection.h, reflection.c: added support for writing out the evnets
33051 related information.
33053 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
33055 * reflection.h, icall.c: use a different method (GetInterfaces)
33056 to gather interface info and add isbyref, isprimitive and
33057 ispointer to the ves_icall_get_type_info() return value.
33059 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
33061 * class.h: stared adding support for events.
33062 * icall.c: split find_members implementation. Added debug icall to get
33063 the address of an object.
33064 * reflection.c: handle TypeBuilders in mono_type_get_object().
33066 2002-03-01 Martin Baulig <martin@gnome.org>
33068 * icall.c (ves_icall_System_Array_GetLength): This must throw an
33069 ArgumentOutOfRangeException(), not an ArgumentException().
33070 (ves_icall_System_Array_GetLowerBound): Likewise.
33071 (ves_icall_System_Array_GetValue): Improved argument checking.
33072 (ves_icall_System_Array_SetValue): Improved argument checking.
33074 2002-03-01 Martin Baulig <martin@gnome.org>
33076 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
33077 called with invalid arguments rather than just dying with g_assert().
33078 (ves_icall_System_Array_SetValue): Likewise.
33079 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
33080 raise a NotImplementedException instead.
33081 (ves_icall_System_Array_GetLength): Added argument checking.
33082 (ves_icall_System_Array_GetLowerBound): Added argument checking.
33084 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
33086 * object.h (mono_assert): new macros mono_assert and
33087 mono_assert_not_reached
33089 2002-02-28 Martin Baulig <martin@gnome.org>
33091 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
33092 and "System::String::IsInterned" to "System::String::_IsInterned".
33094 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
33096 * icall.c: remove hacks for typebuilder. Added icall to create a
33097 modified type from a tybebuilder.
33098 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
33099 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
33100 to create a backing MonoClass for a TypeBuilder.
33102 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33104 * class.c, class.h: more refactoring of class init.
33105 Export mono_class_setup_mono_type() and mono_class_setup_parent().
33107 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
33109 * marshal.c, marshal.h: start of marshaling interface.
33111 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
33113 * icall.c: fix order in assembly qualified name icall.
33115 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
33117 * class.c: do not free str, since we store it in the hash table.
33118 * reflection.h: add label field to MonoILExceptionInfo.
33119 * reflection.c: handle references to more than one assembly. Handle
33120 case when there isn't a module created in the assembly.
33122 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
33124 * class.c: Fix typo. Start refactoring of class init code.
33126 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
33128 * appdomain.c: exit with 1 on error.
33129 * class.c: we already have the name in MonoClassField.
33130 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
33131 MonoStreamHeader instead of an offset of image->raw_metadata.
33133 2002-02-26 Miguel de Icaza <miguel@ximian.com>
33135 * appdomain.c (mono_init): Be even more descriptive about the error.
33137 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
33139 * appdomain.c: give the user an informative message when corlib can't
33142 2002-02-26 Martin Baulig <martin@gnome.org>
33144 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
33145 New icall to get the time zone data.
33147 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33149 * reflection.c: set virtual and raw size of section correctly.
33150 * threads.c: transfer domain information to newly created threads.
33152 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
33154 * class.c: when instancing a class in a domain, load the default
33155 vaules for static fields from the constant table. Fix System.Enum to
33157 * icall.c: implement Object::GetType() internalcall. Implemented
33158 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
33159 Fixed checking of binding flags in find_members().
33160 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
33161 * reflection.c: handle enumerations when writing to the constant
33162 table. Use a different object cache for types.
33165 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
33167 * object.c (mono_object_isinst): fix for arrays
33169 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
33171 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
33173 * object.c: don't use mprotect () and fix intern pool hash table
33174 lookup for big endian systems.
33176 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33178 * icall.c: change type_is_subtype_of () signature.
33180 2002-02-21 Mark Crichton <crichton@gimp.org>
33182 * rand.c, rand.h: Added random number generator for
33183 System.Security.Cryptography classes.
33185 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
33187 * icall.c: Added System.Security.Cryptography calls.
33189 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
33191 * class.c, icall.c, metadata.c: better support for pointer types.
33192 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
33193 * reflection.c: Add support for getting custom attrs for properties
33194 and simplify some code.
33196 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
33198 * icall.c: change getToken () and add custom attribute GetBlob()helper
33200 * reflection.h: add custom attrs array to the reflection builder structures.
33201 * reflection.c: encode and emit custom attributes for all the relevant
33202 reflection objects. Cache fieldref and methodref tokens. Change
33203 mono_image_create_token() interface to take a MonoDynamicAssembly.
33204 More complete custom attributes decoder. Load custom attributes for
33205 Assembly, Field, Method and Constructor objects, too. Make the
33206 returned array an Attribute[] one, not object[]. Added
33207 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
33208 custom attribute constructor.
33210 2002-02-20 Dick Porter <dick@ximian.com>
33214 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
33215 problem code out for now).
33217 2002-02-19 Radek Doulik <rodo@ximian.com>
33219 * object.c (mono_ldstr): use hash table to avoid multiple swapping
33221 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
33223 * icall.c: register the GetCustomAttributes method.
33224 * object.c, object.h: add mono_string_new_len ().
33225 * reflection.h, reflection.c: added mono_runtime_invoke(),
33226 mono_install_runtime_invoke(). Added
33227 mono_reflection_get_custom_attrs () to load custom attributes and
33228 create the attribute objects.
33230 2002-02-19 Dick Porter <dick@ximian.com>
33231 * threads-dummy-types.c:
33232 * threads-dummy-types.h:
33235 * threads-pthread-types.c:
33236 * threads-pthread-types.h:
33237 * threads-pthread.c:
33238 * threads-pthread.h: Deleted obsolete files
33240 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
33242 * class.c (mono_class_vtable): runtime init the class when we
33243 allocate static class data.
33245 * icall.c (ves_icall_System_Array_SetValue): check for null values.
33247 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
33248 and String - but we will need generic marshalling support in the
33250 (mono_init): set the domain name in a ms compatible way
33252 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
33255 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
33257 * object.c (mono_array_clone): use alloca() instead of g_malloc
33260 * appdomain.c (mono_domain_unload): impl.
33262 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
33264 * appdomain.c, object.c: fix intern pool implementation.
33265 * class.c: fix alignment code.
33267 2002-02-16 Radek Doulik <rodo@ximian.com>
33269 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
33270 and s2 > s1, just copy lower bytes to be compatible with little
33271 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
33272 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
33274 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
33275 force big_endian to be 1 for big endian machines
33276 (ves_icall_iconv_new_decoder): ditto
33278 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
33280 * socket-io.c (convert_sockopt_level_and_name): If the system
33281 doesn't define SOL_IP or SOL_TCP, get them by hand using
33282 getprotobyname() and caching the values (because this could be a
33284 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
33285 Use the appropriate struct when the system does support it. Ie,
33286 not all systems have struct ip_mreqn so use struct ip_mreq when
33289 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
33291 * reflection.c: handle finally clauses.
33293 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
33295 * socket-io.c: use g_snprintf() instead of snprintf.
33297 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
33299 * reflection.c (mono_param_get_objects): Cast second argument to
33300 mono_method_get_param_names to a const char** to silence the
33303 * appdomain.c (mono_domain_assembly_open): Put parens around the
33304 truth statement in the for-loop.
33306 * unicode.c (iconv_convert): Got rid of a compiler warning about
33307 int i being unused when the system has a new iconv.
33308 (iconv_get_length): Same.
33310 * image.c (load_class_names): Cast the second argument to
33311 g_hash_table_insert() to char* to hush compiler warnings about the
33313 (mono_image_open): Same here.
33315 * socket-io.c: Don't conditionally include sys/filio.h or
33316 sys/sockio.h here anymore since we now get them from
33317 io-layer/io-layer.h
33318 (inet_pton): If the system doesn't support inet_aton, implement
33319 using inet_addr and also #define INADDR_NONE if it isn't defined
33322 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
33324 * metadata.c, metadata.h: added function to get packing and size info
33326 * reflection.h, reflection.c: handle field RVA data. Save info about
33327 the table layout if needed. Assign typedef indexes to all the types
33328 before dumping the info about them to avoid forward reference problems.
33330 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
33332 * socket-io.c (convert_sockopt_level_and_name): ifdef
33333 SO_ACCEPTCONN because it is not defined on my system (old debian)
33335 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
33337 * opcode.c: use stddef.h to get NULL.
33339 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
33341 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
33342 for FIONBIO, FIONREAD and SIOCATMARK.
33343 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
33344 define INADDR_NONE and besides, inet_addr() is deprecated and
33345 should not be used. Use inet_pton() instead - it also has the
33346 added bonus that it can easily handle IPv6 addresses as well.
33347 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
33349 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
33351 * decimal.c: remove _MSC_VER conditional.
33353 2002-02-13 Dick Porter <dick@ximian.com>
33356 * icall.c: Internal calls for Blocking, Select, Shutdown,
33357 GetSocketOption and SetSocketOption
33359 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33361 * assembly.cs: better resolver: use it instead of some kludgy
33364 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
33366 * reflection.c: the best way to speed-up the compiler is to avoid
33369 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
33371 * class.c (mono_class_vtable): changed the object layout
33372 (obj->vtable->class).
33373 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
33375 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33377 * assembly.c: look for assemblies in the assembly dir, too.
33379 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
33381 * class.c: fix thinko in mono_class_from_type().
33383 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33385 * exception.h, exception.c: added TypeLoadException.
33386 * object.h, object.c: added mono_array_clone ().
33387 * icall.c: handle throwOnError in AssemblyGetType().
33388 Added Array.Clone().
33389 * opcode.h, opcode.c: use a single value for the opcode val.
33390 Compile fix for non-gcc compilers.
33392 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
33394 * opcodes.c, opcodes.h: export interesting info about opcodes.
33396 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
33398 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
33401 * class.c (class_compute_field_layout): set element_class for enums
33402 (mono_class_create_from_typedef): set element_class for normal classes
33404 * icall.c (ves_icall_System_Enum_get_value): impl.
33406 * class.c (mono_class_create_from_typedef): do not set valuetype
33407 flag for System.ValueType and System.Enum
33409 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
33411 * unicode.c (iconv_convert): fix big endian problem.
33413 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
33415 * class.c: add asserts if we are ever going to scribble over memory.
33416 * socket-io.c: not all systems have AF_IRDA defined.
33418 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
33420 * class.c (class_compute_field_layout): do not consider static
33421 fields to compute alignment
33423 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
33425 * appdomain.c (mono_appdomain_get): impl.
33426 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
33428 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
33430 * icall.c: ignore "file://" prefix when loading an assembly.
33432 2002-01-23 Dick Porter <dick@ximian.com>
33436 * Makefile.am: Added socket support
33438 2002-01-23 Miguel de Icaza <miguel@ximian.com>
33440 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
33441 code back. This should return the assemblies that are loaded by
33442 the runtime on behalf of an application domain.
33444 The current implementation is still broken, it just returns every
33445 assembly loaded, but until we get real applications domain this
33448 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
33450 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
33453 2002-01-23 Miguel de Icaza <miguel@ximian.com>
33455 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
33456 the mono_class_from_name lookup.
33457 (ves_icall_get_parameter_info): ditto.
33458 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
33460 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
33462 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
33464 * class.c: load also nested classes on class init.
33465 System.ValueType instance methods gets passed boxed
33466 values, unless methods in derived classed that get a pointer to the
33468 * icall.c: use better name parsing code in GetType().
33469 * image.c, image.h: add mono_image_loaded ().
33470 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
33471 * reflection.c, reflection.h: added mono_reflection_parse_type().
33473 2002-01-22 Veronica De Santis <veron78@interfree.it>
33475 * icall.c : Added mapping of internal calls for Manual and Auto reset events
33476 * threads.c : Added the implementation of internal calls for events
33477 * threads.h : Added prototypes of internal calls for events
33479 2002-01-21 Radek Doulik <rodo@ximian.com>
33481 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
33483 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
33485 * class.c (mono_class_init): set min_align to 1 (instead of 0)
33486 (mono_class_value_size): use min_align
33488 2002-01-20 Dick Porter <dick@ximian.com>
33491 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
33492 so it compiles on w32.
33494 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
33496 * metadata.c (mono_type_stack_size): impl.
33498 * class.c (mono_class_get_field): impl. memberref token
33500 2002-01-16 Veronica De Santis <veron78@@interfree.it>
33502 * icall.h : Added the internal calls mapping for CreateMutex_internal
33503 and ReleaseMutex_internal.
33504 * threads.h : Added the prototype of mutexes internal calls.
33505 * threads.c : Added the implementations of mutexes internal calls.
33507 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
33509 * metaparse.h: removed unused file.
33510 * reflection.c, reflection.h: added stream_data_align () function
33511 to align data in streams and keep stream aligned. Add support for
33512 exception support in method headers.
33514 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
33516 * unicode.c: make iconv_convert () return the number of bytess written
33517 in the output buffer.
33519 2002-01-15 Dick Porter <dick@ximian.com>
33520 * threads.c: Make the runtime's idea of infinite timeouts coincide
33521 with the class library's
33523 Fix a particularly egregious bug in mono_thread_cleanup(). That
33524 code was so utterly bogus it must have been written on a Monday.
33526 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
33528 * reflection.h: add subtypes field to TypeBuilder.
33529 * reflection.c: encode constants for literal fields.
33530 Handle subtypes. Fix user string token (and add a zero byte)
33533 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
33535 * class.c (mono_class_init): bug fix: assign slot numbers for
33538 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
33540 * reflection.c: don't try to output a code RVA for abstract methods.
33541 Small fixes for method header format. Output parameter info to the
33542 ParamDef table. Save method overriding info to MethodImpl table.
33543 Fix property support. Allow typedef.extends to be a type in the
33545 * verify.c: fix off-by-one error.
33547 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
33549 * class.c: fix mono_class_from_mono_type () for szarray types.
33550 Remove unused cache check in mono_class_from_type_spec().
33551 * icall.c: *type_from_name () functions handle simple arrays and byref.
33552 * reflection.c: handle byref and szarray types. Handle methods without
33553 body (gets P/Invoke compilation working). Handle types and fields in
33555 * reflection.h: add rank to MonoTypeInfo.
33557 2002-01-10 Dick Porter <dick@ximian.com>
33559 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
33562 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
33564 * icall.c: initialize class in type_from_handle ().
33565 Loop also in parent classes for get_method ().
33566 * reflection.c: properly encode class and valuetype types.
33567 Start on encoding TypeBuilder types. Handle fieldrefs.
33568 Use correct length when registering a user string.
33569 Handle ConstructorBuilder and MonoMethod in get_token ().
33570 Make mono_type_get_object () aware of cached types.
33571 * object.c: back out change to mono_string_new ().
33573 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
33574 * object.c: mono_string_new should return a NULL when the string
33575 passed in is NULL -- not try to deference it.
33577 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
33579 * icall.c: hack to make IsSubType work for TypeBuilders.
33580 * reflection.c: emit constructors before methods.
33581 Retrieve param names in mono_param_get_objects().
33583 2002/01/05 Nick Drochak <ndrochak@gol.com>
33585 * Makefile.am: fix list of headers and sources so automake 1.5
33586 doesn't complain. Removed \# at end of list.
33588 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
33590 * reflection.c: get token for a method ref. Set return type of
33591 constructor to void.
33592 * loader.c: debug message.
33593 * class.c: typo fix.
33595 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
33597 * icall.c: fix array init with rank > 1. FindMembers
33598 loops in parent class as well.
33599 * image.c: do not insert nested types in name cache.
33600 * reflection.c: warning fix.
33601 * reflection.h: add override method (for interface impl).
33603 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
33605 * metadata.c: fix customattr decoding.
33607 2001-12-21 Miguel de Icaza <miguel@ximian.com>
33609 * rawbuffer.cs: Added native Win32 implementation, avoids using
33610 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
33612 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
33614 * class.c: make the low-level routines handle the cache.
33616 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
33618 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
33620 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
33622 * class.c: fix mono_array_element_size() for objects.
33623 * class.h, class.c: add properties to MonoClass and load them
33625 * icall.c: check with isinst() when assigning a value to an array
33626 instead of requiring the classes to match exactly.
33627 Implemented icall for System.Type::GetType().
33628 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
33629 enums. Handle bindingflags when looking for methods and fields.
33630 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
33631 and mono_metadata_methods_from_property().
33632 * reflection.h, reflection.c: added structures for propreties,
33633 parameters and enums. Implemented mono_property_get_object() and
33634 mono_param_get_objects().
33636 2001-12-18 Dick Porter <dick@ximian.com>
33638 * file-io.c: Use mono_string_to_utf16() instead of
33639 mono_string_chars()
33641 * object.c: Added mono_string_to_utf16(), which copies the non
33642 NULL-terminated MonoString into a new double-null-terminated
33645 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
33647 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
33649 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
33651 * file-io.c: raise exceptions if handle is invalid.
33653 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
33655 * assembly.c: yet another check for mscorlib.
33656 * class.c, class.h: load nesting info for classes.
33657 * icall.c: many new functions to support the Reflection classes.
33658 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
33659 * reflection.h, reflection.c: mono_image_create_token(),
33660 mono_assembly_get_object(), mono_type_get_object(),
33661 mono_method_get_object(), mono_field_get_object(): methods to return
33662 objects that parallel the C representation of assemblies, types,
33665 2001-12-11 Dick Porter <dick@ximian.com>
33668 * file-io.c: Internal calls for file IO.
33670 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
33672 * tabledefs.h: missing FileAttributes.
33673 * verify.h, verify.c: use is_valid_string () to simplify and check for
33674 valid strings more correctly. Fix warnings and speeling.
33675 Check more tables: Filed, File, ModuleRef, StandAloneSig.
33676 Check code: branches, maxstack, method calls.
33678 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
33680 * object.c (mono_object_allocate): removed static, so that the jit
33681 can allocate value types.
33683 * icall.c (ves_icall_System_DateTime_GetNow): impl.
33685 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33687 * class.c: init enum types right away and register the
33688 token->MonoClass map in mono_class_create_from_typedef ().
33689 * verify.h, verify.c: first cut of the verifier.
33690 * pedump.c: add --verify switch to verify metadata tables.
33691 * tabledefs.h: add some missing enums.
33693 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
33695 * class.c (mono_install_runtime_class_init): impl.
33696 (mono_class_init): renamed mono_class_metadata_init to
33697 mono_class_init, also removed the metadata_inited flag
33699 * object.c (mono_object_isinst): use faster algorithm
33701 2001-11-30 Radek Doulik <rodo@ximian.com>
33703 * mono-endian.h: reverted last change
33704 added function prototypes
33706 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
33707 add mono-endian.c back
33709 * mono-endian.c: returned back, as Paolo pointed out, it's needed
33710 for unaligned access, I've mistaked it with endianess. I am
33712 (mono_read16): fix reverted endianess
33713 (mono_read64): ditto
33714 (mono_read32): ditto
33716 2001-11-30 Dick Porter <dick@ximian.com>
33718 * exception.c: Implement mono_exception_from_name()
33720 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33722 * metadata.h, metadata.c: remove params_size and locals_size and their
33723 calculation from the metadata code: they are only usefult to the
33726 2001-11-29 Radek Doulik <rodo@ximian.com>
33728 * object.c (mono_ldstr): swap bytes here, it's probably not the
33729 best place, but works for me now, I'll redo it once I know mono
33730 better, also note that I add PROT_WRITE and don't reset back, also
33731 note that it's only affects big endians, so x86 should be OK
33733 * mono-endian.h (read16): use just glib macros for both endians
33735 * mono-endian.c: removed as glib macros are used in in
33736 mono-endian.h so we don't need to care about endianess for read
33737 macros as glib does that for us already
33739 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
33741 * class.h, class.h: take minimum alignment into consideration so
33742 that the fields of a class remain aligned also when in an array.
33744 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33746 * loader.h, loader.c: add mono_method_get_param_names().
33747 * class.c: 0-init class fields.
33749 2001-11-26 Dick Porter <dick@ximian.com>
33753 * threads.c: New file that handles System.Threading on all platforms
33756 * object.h: Remove the synchronisation struct from MonoObject,
33757 replace it with a pointer that gets initialised on demand
33759 * Makefile.am: Replace all the system-specific threading code with
33760 a single file that uses the new wrapper library
33762 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
33764 * class.c, class.h: add mono_install_trampoline() so that the runtime
33765 can register a function to create a trampoline: removes the ugly
33766 requirement that a runtime needed to export arch_create_jit_trampoline.
33767 * object.h, object.c: added mono_install_handler() so that the runtime
33768 can install an handler for exceptions generated in C code (with
33769 mono_raise_exception()). Added C struct for System.Delegate.
33770 * pedump.c: removed arch_create_jit_trampoline.
33771 * reflection.c: some cleanups to allow registering user strings and
33772 later getting a token for methodrefs and fieldrefs before the assembly
33774 * row-indexes.h: updates and fixes from the new ECMA specs.
33776 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
33778 * class.h, class.c: add enum_basetype field to MonoClass.
33779 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
33780 to get index in the constant table reated to a field, param or
33782 * reflection.h, reflection.c: handle constructors. Set public-key and
33783 version number of the built assembly to 0.
33784 * row-indexes.h: update from new ECMA spec.
33786 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33788 * class.h, class.c: add a max_interface_id to MonoClass.
33789 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
33790 since it's used to do that. Added mono_type_type_from_obj().
33791 Make GetType() return NULL instead of segfaulting if the type was not
33792 found. Handle simple arrays in assQualifiedName.
33793 * object.h: add a struct to represent an Exception.
33794 * reflection.c: output call convention in method signature.
33795 Add code to support P/Invoke methods and fixed offsets for fields.
33797 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
33799 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
33801 * icall.c: use mono_array_addr instead of array->vector: fixes the
33802 reflection image writing.
33803 * reflection.c: init call convention byte to 0 in method signature.
33804 Encode the property signature. Don't output property-related methods
33805 twice. Really process the properties for a type (don't cast a field to
33806 a property, my mom always told me that).
33807 Fix 64 bit issues in pointer alignment in a different and more
33810 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
33812 * loader.h: Removed type class from MonoDefaults, added monotype
33814 * loader.c: Loaded MonoType, removed loading of Type
33816 * icall.c (my_mono_new_object): Now returns a System.MonoType,
33817 and fills in System.Type._impl with a RuntimeTypeHandle rather
33818 than the actual MonoClass *
33820 (ves_icall_type_from_handle): change from type_class to
33823 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
33826 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
33829 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
33831 (ves_icall_System_Reflection_Assembly_GetType): implemented
33833 (ves_icall_System_MonoType_assQualifiedName): implemented
33835 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
33837 2001-11-09 Miguel de Icaza <miguel@ximian.com>
33839 * assembly.c (mono_assembly_open): Implement a cache for the
33842 (mono_assembly_close): only destroy the assembly when the last
33845 2001-11-09 Dick Porter <dick@ximian.com>
33847 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
33849 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
33851 * class.c (mono_class_metadata_init): bug fix: compute the right slot
33853 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33855 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
33856 from Martin Weindel.
33857 * object.h: add mono_string_chars ().
33859 2001-11-07 Miguel de Icaza <miguel@ximian.com>
33861 * reflection.c (build_compressed_metadata): Eliminates warnings
33862 and uses 64-bit clean code.
33864 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
33865 (mono_type_equal): Change signature to eliminate warnings.
33867 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33869 * icall.c, loader.c: remove the internalcall array constructors.
33870 Changes to match the new MonoArray structure.
33871 * object.h, object.c: an array object doesn't allocate an extra
33872 vector. Add mono_array_new_full () to create jagged arrays easily.
33874 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33876 * metadata.h, metadata.c: add mono_metadata_field_info () to
33877 retreive all the info about a field from vairous tables.
33878 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
33879 * class.h, class.c: augment MonoClassField with more info.
33880 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
33881 policy and load a field's RVA if needed.
33883 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
33885 * class.c (mono_class_metadata_init): create a trampoline for all
33886 virtual functions instead of actually compiling them.
33888 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
33890 * class.h, class.c: include name in MonoClassField.
33891 * class.c: fix fundamental type of System.Object and System.String.
33892 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
33894 * icall.c: remove internalcalls for the Reflection stuff that is now
33896 * loader.c: mono_field_from_memberref () implementation.
33897 * mono-endian.c: thinko (s/struct/union/g).
33898 * object.c, object.h: make the mono_string_* prototypes actually use
33899 MonoString instead of MonoObject.
33900 * reflection.c, reflection.h: updates for changes in the reflection
33901 code in corlib: we use C structures that map to the actual C# classes.
33902 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
33903 fat method header if needed and use the info from the ILGenerator for
33904 methods. Handle fields in types. Misc fixes.
33906 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
33908 * class.c (mono_class_metadata_init): bug fix: always allocate
33909 space for static class data
33911 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
33913 * class.c (mono_compute_relative_numbering): use relative
33914 numbering to support fast runtime type checks.
33916 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
33918 * class.c (mono_class_create_from_typeref): added debugging output
33919 to print class name when MonoDummy is returned instead of real class
33921 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
33923 * class.c (mono_class_metadata_init): interface offset table now
33924 contains pointers into the vtable - this is more efficient for the jit
33926 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
33928 * class.c (mono_class_metadata_init): use a temporary vtable (the
33929 old algorithm only worked for the interpreter, but not for the jit)
33931 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
33933 * loader.c (method_from_memberref): use mono_class_get to get the
33934 class of an array instead of using System.Array directly.
33935 (mono_get_method): also add MEMBERREF methods to the method cache
33936 which usefull for arrays.
33938 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
33940 * pedump.c (arch_compile_method): added to compute vtable entry
33942 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
33943 number of interfaces.
33945 * class.h: merged MonoArrayClass into MonoClass
33947 * class.c (mono_class_create_from_typedef): compute the vtable size and
33948 allocate space to include the vtable inside MonoClass
33949 (mono_class_metadata_init): initialize the vtable
33951 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
33953 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
33954 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
33955 * image.c: endian fixes by Laurent Rioux.
33956 * object.h, object.c: rename MonoStringObject to MonoString and
33957 MonoArrayObject to MonoArray. Change some function names to conform to
33958 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
33959 guint16* as first argument, so don't use char*.
33960 Provide macros to do the interesting things on arrays in a portable way.
33961 * threads-pthread.c: updates for the API changes and #include <sched.h>
33962 (required for sched_yield()).
33963 * icall.c: updates for the API changes above.
33964 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
33965 platforms that need them.
33967 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33969 * class.c: set the correct type for all the fundamental
33970 type when loading the class.
33972 2001-10-05 Dick Porter <dick@ximian.com>
33974 * threads-pthread.c (pthread_mutex_timedlock): Simple
33975 compatibility version for C libraries that lack this call.
33977 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33979 * class.c: MonoTypes stored in MonoClass are stored as
33980 fundamental MonoTypes when the class represents a
33981 fundamental type (System.Int32, ...).
33982 The TypeHandle return by ldtoken is a MonoType*.
33983 * icall.c: ves_icall_get_data_chunk () write out all the
33984 PE/COFF stuff. Implement ves_icall_define_method (),
33985 ves_icall_set_method_body (), ves_icall_type_from_handle ().
33986 * image.c: properly skip unknown streams.
33987 * loader.h, loader.c: add type_class to mono_defaults.
33988 * metadata.c, metadata.h: export compute_size () as
33989 mono_metadata_compute_size () with a better interface.
33990 Typo and C&P fixes.
33991 * pedump.c: don't try to print the entry point RVA if there is no entry point.
33992 * reflection.c, reflection.h: many cleanups, fixes, output method
33993 signatures and headers, typedef and typeref info, compress the metadata
33994 tables, output all the heap streams, cli header etc.
33995 * row-indexes.h: typo fixes.
33997 2001-10-04 Dick Porter <dick@ximian.com>
33999 * object.h: Add a synchronisation mutex struct to MonoObject
34001 * object.c (mono_new_object): Initialise the object
34002 synchronisation mutexes
34004 * icall.c: System.Threading.Monitor internal calls
34006 * threads-pthread.h:
34007 * threads-pthread.c: System.Threading.Monitor internal calls
34009 * threads-types.h: New file, includes the system-specific thread
34012 * threads-pthread-types.h:
34013 * threads-pthread-types.c: New files, handle pthread-specific
34014 synchronisation types
34016 * threads-dummy-types.h:
34017 * threads-dummy-types.c: New files of dummy support for
34018 thread-specific types
34022 * pedump.c: include mono-endian.h not endian.h
34024 * Makefile.am: More threads files.
34025 Name mono-endian.h not endian.h
34027 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
34029 * Makefile.am, reflection.h, reflection.c: move here the reflection related
34030 stuff and implement a few more bits.
34031 * icall.c: a field needs to be dereferenced twice. Do not use the same
34032 name for two variables in the same scope.
34033 * image.c, image.h: cleanups.
34035 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
34037 * class.c (mono_class_metadata_init): bug fix: compute the right size
34039 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
34041 * icall.c: implemented some of the Reflection internalcalls.
34042 * image.c, image.h: start writing out the PE/COFF image.
34043 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
34044 that does the reverse than decode_blob_size ().
34045 * object.c: use mono_metadata_encode_value (). Move here
34046 temporary implementation of mono_string_to_utf8 ().
34047 * rawbuffer.c: make malloc_map static.
34049 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
34051 * metadata.c: fix type comparison for arrays.
34052 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
34053 Added a couple of new classes to monodefaults.
34054 * icall.c: added a couple of Reflection-related internalcalls.
34055 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
34056 Added a byval_arg MonoType to MonoClass.
34058 2001-09-28 Dick Porter <dick@ximian.com>
34061 * threads-pthread.h:
34062 * threads-pthread.c: Implemented internal calls for
34063 LocalDataStoreSlot operations. Applied mutexes around all shared
34064 data. Reworked the thread creation and Start() operations to
34065 avoid a race condition.
34068 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
34070 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
34072 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
34074 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
34076 * class.c, loader.c: warn and return NULL instead of erroring out.
34077 * icall.c: added System.AppDomain::getCurDomain().
34078 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
34080 2001-09-25 Dick Porter <dick@ximian.com>
34082 * threads-pthread.h:
34083 * threads-pthread.c: Implemented timed thread joining and added
34084 System.Threading.Thread::Join_internal internal call
34086 * icall.c: Added System.Threading.Thread::Join_internal internal call
34089 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
34091 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
34093 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
34094 mono_string_intern () to implement the semantics of the ldstr opcode
34095 and the interning of System.Strings.
34096 * icall.c: provide hooks to make String::IsIntern and String::Intern
34099 2001-09-23 Dick Porter <dick@ximian.com>
34102 * threads-dummy.h: New files of dummy threading routines
34104 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
34105 support code based on system specifics
34107 Rename PTHREAD_LIBS to THREAD_LIBS
34109 2001-09-23 Dick Porter <dick@ximian.com>
34111 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
34112 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
34114 (mono_thread_init): Set up a Thread object instance to return when
34115 the main thread calls Thread.CurrentThread
34116 (mono_thread_cleanup): Wait for all subthreads to exit
34118 * icall.c: New internal calls for System.Threading.Thread::Sleep
34119 (including Schedule) and CurrentThread
34121 * threads.h: New file, to insulate thread-specific stuff from the
34124 2001-09-21 Dick Porter <dick@ximian.com>
34126 * threads-pthread.h:
34127 * threads-pthread.c: New file, for handling pthreads-style
34128 threading support. Start() now starts a new thread and executes
34129 the ThreadStart delegate instance.
34131 * icall.c: Added the internalcall for
34132 System.Threading.Thread::Start_internal
34134 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
34136 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
34138 * loader.c: work around the different signatures for delegates
34139 constructors csc generates in compiled code vs the ones compiled in mscorlib.
34141 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
34143 * class.h, class.c: add mono_class_get_field_from_name ().
34144 * *: Fix C comments and other ANSI C issues.
34146 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
34148 * endian.h, assembly.c: fix some endianness issues.
34150 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
34152 * loader.h, load.c: add delegate_class to mono_defaults.
34153 Handle runtime provided methods in mono_get_method ().
34155 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
34157 * loader.c (mono_get_method): use pinvoke for internal call
34159 * icall.c: use pinvoke for internal call
34161 * loader.c (method_from_memberref): set the method name
34163 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
34165 * metadata.c: help the compiler generate better code for
34166 mono_class_from_mono_type ().
34168 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
34170 * class.c (mono_class_metadata_init): delayed computing of the
34171 class size to mono_class_metadata_init ()
34173 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
34175 * class.c, class.h: add an interfaces member to MonoClass.
34176 * image.c, image.h: add assembly_name field to MonoImage
34177 from the assembly table.
34178 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
34180 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
34182 * class.c: Handle Array in mono_class_from_mono_type ().
34183 * metadata.c, pedump.c: some endian fixes.
34185 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
34187 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
34188 * metadata.c: fix small problem introduced with the latest commit.
34190 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
34192 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
34193 We don't need a MonoMetadata pointer anymore to compare signatures in
34194 mono_metadata_signature_equal (), update callers.
34195 Reduced memory usage an number of allocations for MonoMethodHeader and
34196 MonoMethodSignature.
34198 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
34200 * metadata.c: added compare for szarray.
34202 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
34204 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
34205 and add a couple more types to it and mono_defaults. Give an hint on
34206 classes that need implementing in our corlib and are referenced
34209 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
34211 * class.h, class.c: keep track if a class is also an Enum.
34212 * loader.c: Implement a couple more types for use in libffi
34213 marshalling. Gives better diagnostics when failing to dlopen
34214 a library. Set method->klass for P/Invoke methods, too.
34216 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
34218 * class.c, class.h: add a MonoType this_arg to MonoClass that
34219 represents a pointer to an object of the class' type that
34220 can be used by the interpreter and later the type cache.
34221 Add best guess alignment info for valuetype objects.
34223 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
34225 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
34226 into MonoType: one less level of indirection and allocation and
34227 simplifies quite a bit of code. Added cache for MonoTypes that are
34228 used frequently, so that we don't need to allocate them all the time.
34230 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
34232 * class.c (mono_class_create_from_typedef): System.Enum is also a
34233 value type, although it does not derive from System.ValueType
34234 (maybe a bug in the ms compiler?)
34236 * metadata.c (mono_type_size): return the right size for value types
34238 * loader.c (mono_get_method): only initialize method header if not abstract
34240 * class.c (mono_class_from_mono_type): use mono_default values.
34242 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
34244 * *: use MonoClass pointers instead of <type_tokens>
34246 * class.h: new flag: metadata_inited.
34248 * class.c (mono_class_metadata_init): impl.
34249 (mono_class_instance_size): impl.
34250 (mono_class_data_size): impl.
34252 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
34254 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
34255 MonoClass now has the name and name_space fields.
34256 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
34257 mono_get_method () takes and optional MonoClass as argument.
34258 Removed mono_typedef_from_name() and added mono_class_token_from_name()
34259 instead that takes advantage of a map from class names to typedef
34260 tokens in MonoImage.
34262 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
34264 * metadata.c: zero is not a valid alignment boundary.
34265 Merge MONO_TYPE_VOID in default decoding code.
34267 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
34269 * image.h: merged MonoMetadata into MonoImage
34271 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
34272 identify the type of elements.
34274 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
34276 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
34277 * cil-coff.h: split MonoMSDOSHeader and add size info.
34278 * image.c: add some consistency checks.
34279 * metadata.c: fix row size computation: one programmer
34280 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
34281 add explanation for the locator routine.
34282 Fix decoding of size in method header.
34284 2001-08-20 Miguel de Icaza <miguel@ximian.com>
34286 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
34287 (g_concat_dir_and_file): Bring g_concat_dir_and_file
34288 function from gnome-libs. This uses the right path separator
34289 based on the OS, and also works around a bug in some systems where
34290 a double slash is not allowed.
34291 (default_assembly_name_resolver): Use g_concat_dir_and_file
34292 (mono_assembly_open): ditto.
34294 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
34296 * metadata.c (mono_metadata_signature_equal): impl.
34298 * *: void is now a realy MonoType (instead of using NULL)
34300 * metadata.c (do_mono_metadata_parse_type): use
34301 mono_metadata_parse_type to parse void value.
34303 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
34305 * metadata.c, metadata.h: in the signature and method header store
34306 only the space required for holding the loca vars and incoming arguments.
34308 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
34310 * metadata.c (do_mono_metadata_parse_type): treat void like any
34311 other type (instead of assigning NULL);
34313 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
34315 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
34317 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
34319 * image.c (do_mono_image_open): added a cache for arrays.
34321 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
34323 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
34324 decode a single column from a row in a metadata table and changes
34325 to take advantage of it in the typedef locator (gives a nice speed up).
34326 Store offset info for function params.
34328 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
34330 * image.h (MONO_IMAGE_IS_CORLIB): removed
34332 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
34334 * assembly.c: how could mono_assembly_close () had ever worked?
34335 * metadata.c, metadata.h: provide offset info for local vars.
34336 Implement mono_type_size () to take care of alignment as well
34337 as size (it was mono_field_type_size in cli/class.c before).
34339 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
34341 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
34343 * assembly.h (CORLIB_NAME): set to corlib.dll
34345 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
34347 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
34349 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
34350 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
34351 tokentype.h: massive namespace cleanup.
34353 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
34355 * metadata.h, metadata.c: decode exception clauses when parsing method header.
34357 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
34359 * metadata.c (mono_metadata_free_type): added check for type !=
34360 NULL (void) before calling mono_metadata_free_type()
34362 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
34364 * metadata.h, row_indexes.h: added header with enumerations to use
34365 to index in the columns from tables in metadata and to decode coded
34366 tokens: we should start using this instead of embedding magic numbers
34369 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
34371 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
34372 Move metadata_t info from cli_image_info_t to MonoImage, where
34373 it's easily accessible. Changed all the uses accordingly.
34374 Added the method and class caches to MonoImage.
34375 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
34376 and mono_metadata_decode_value () signature to be more consistent
34377 with the other parse functions (and simplify code). Taken advantage
34378 of zero-length array allocation with GCC. Removed reduntant (and
34379 wrong) MonoFieldType struct and use MonoParam instead. Changed
34380 mono_metadata_parse_field_type () to use common code for parsing.
34381 Added mono_metadata_typedef_from_field () and
34382 mono_metadata_typedef_from_method () to lookup a typedef index from a
34383 field or method token.
34384 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
34386 2001-07-23 Miguel de Icaza <miguel@ximian.com>
34388 * metadata.c (mono_metadata_parse_field_type): Implement.
34389 (do_mono_metadata_parse_type): Split engine from
34390 mono_metadata_parse_type, so that we can create smaller structures
34391 for things that just have one pointer to the MonoType (look at
34394 2001-07-20 Miguel de Icaza <miguel@ximian.com>
34396 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
34397 as Jan Gray found out, it is incorrect.
34399 2001-07-18 Miguel de Icaza <miguel@ximian.com>
34401 * assembly.c: Implement asssembly loading. This loads an image
34402 and loads all the referenced assemblies. Come to think of it, we
34403 could always do lazy loading of the assemblies.
34405 * image.c (mono_image_open): Keep loaded images in a hashtable.
34407 * image.h (MonoImage): Add reference count.
34409 2001-07-17 Miguel de Icaza <miguel@ximian.com>
34411 * assembly.c (mono_assembly_open): Keep track of the file name in
34412 case the assembly has no ASSEMBLY table.
34414 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
34417 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
34419 * metadata.c, metadata.h: decode local vars in method header
34420 parse function. Change callers accordingly.
34422 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
34424 * metadata.h, cil-coff.h: protect against multiple inclusion.
34425 Added some new structures to hold information decoded from metadata:
34426 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
34427 and relevant decoding/free functions.
34428 * metadata.c: implement decoding functions. Add warning for out of bounds
34429 index in mono_metadata_locate(). Implement mono_get_method () to retreive
34430 all the info about a method signature and invocation. Remove check on
34431 uninitialized local var in parse_mh() and fix memory leak.
34433 2001-07-12 Miguel de Icaza <miguel@ximian.com>
34435 * metadata.h: More macros.
34437 * tokentype.h: New file.
34439 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
34441 * assembly.c: added a consistency check and initialize
34442 some structures with g_new0().
34443 * metadata.c: fixed a couple more bugs in table size computation
34444 and add other checks for out-of bound access to metadata.
34446 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
34448 * metatada.c: fix bugs computing table sizes. Spew a
34449 warning when index in string heap is out of bounds.
34451 2001-07-04 Miguel de Icaza <miguel@ximian.com>
34453 * metadata.h: Add a couple of macros to manipulate tokens.
34455 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
34457 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
34458 cli_section_tables).
34460 2001-07-01 Miguel de Icaza <miguel@ximian.com>
34462 * metadata.c (mono_metadata_user_string): New function, provides
34463 access to the UserString heap.
34465 2001-06-27 Miguel de Icaza <miguel@ximian.com>
34467 * metadata.c: Add inline documentation.
34469 2001-06-26 Miguel de Icaza <miguel@ximian.com>
34471 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
34474 2001-06-22 Miguel de Icaza <miguel@ximian.com>
34476 * typeattr.h: New file, TypeAttribute flags.
34478 2001-06-21 Miguel de Icaza <miguel@ximian.com>
34480 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
34481 mono_assembly_ensure_section): Section loading code.
34482 (load_section_tables): Load the sections.
34484 * mono/metadata/metadata.c (mono_metadata_locate_token,
34485 mono_metadata_locate): Functions to locate the information
34486 definition given a token or a table and an index.
34487 (mono_metadata_compute_table_bases): New.
34488 (compute_size): New function to compute the sizes of the various
34491 * mono/metadata/metadata.h: Finish listing the different index
34494 * mono/metadata/pedump.c: Improve to dump new information.
34496 2001-06-19 Miguel de Icaza <miguel@ximian.com>
34498 * mono/metadata/metadata.c: Entered all the tables matching
34501 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2