1 2009-10-21 Mark Probst <mark.probst@gmail.com>
3 * sgen-gc.c: Make managed write barriers atomic via
6 2009-10-21 Rodrigo Kumpera <rkumpera@novell.com>
8 * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
9 methods. Fixes #543021.
11 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
13 * socket-io.[ch]: fix VS build.
15 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
18 * socket-io.[ch]: implemented SendFile.
20 2009-10-20 Zoltan Varga <vargaz@gmail.com>
22 * class.c (mono_class_create_from_typedef): Initialize class->element_class
23 before the interfaces to avoid crashes later if class initialization fails.
26 * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
29 2009-10-20 Marek Safar <marek.safar@gmail.com>
31 * domain.c: Bump 4.0 version.
33 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
35 * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
36 code is known. (parse_public_key) Remove duplicate (unneeded) NULL
37 check since 'pubkey' can't be NULL at this stage
38 * icall.c (ves_icall_System_Array_FastCopy): Add comment about
39 the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
40 initialization of 'iter'
42 2009-10-16 Bill Holmes <billholmes54@gmail.com>
44 * cominterop.c : Search the interface parts of vtable to find
45 method matches. Fixes 547030.
47 Code is contributed under MIT/X11 license.
49 2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
51 * marshal.c: BeginInvoke cannot be called on multicast delegates with
52 multiple targets. Fixes bug #574426.
54 2009-10-14 Massimiliano Mantione <massi@ximian.com>
56 * profiler.h: Put here the definition of
57 MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
58 (and fix the build...).
60 2009-10-14 Massimiliano Mantione <massi@ximian.com>
62 * profiler.c, profiler.h, profiler-private.h:
63 Added support for different ways of getting call chains in stat mode.
65 2009-10-12 Mark Probst <mark.probst@gmail.com>
67 * object.c, object-internals.h: New function for computing the
68 size of an array, factored out of mono_array_new_full(). Use
69 SGen's functions for allocating arrays and vectors.
71 * sgen-gc.c, gc-internal.h: Special functions for allocating
72 arrays and vectors without race conditions. A managed array
75 * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
77 2009-10-12 Mark Probst <mark.probst@gmail.com>
79 * object.c, object.h, icall.c: Write barriers do the copying now,
80 as well, so no need for an additional memcpy.
82 * sgen-gc.c: Lock when storing remsets. Do the memory
83 copying/moving in the write barriers.
85 * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
87 * reflection.c: Added an assert.
89 2009-10-12 Mark Probst <mark.probst@gmail.com>
91 * threads.c, process.c: A few missing write barriers.
93 2009-10-12 Joel W. Reed <joelwreed@gmail.com>
95 * mono-perfcounters.c, mono-perfcounters-def.h: Add
96 network performance counters for bytes sent per second, bytes
97 received per second, and bytes total per second.
99 Code is contributed under MIT/X11 license.
101 2009-10-09 Mark Probst <mark.probst@gmail.com>
103 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
106 2009-10-09 Mark Probst <mark.probst@gmail.com>
108 * threads.c, object-internals.h, object.c: Move code for
109 transferring an object to a different domain (via
110 serialization/remoting) to object.c.
112 * object.c (call_unhandled_exception_delegate): If the exception
113 is in a different domain than the delegate, transfer the exception
116 2009-10-07 Zoltan Varga <vargaz@gmail.com>
118 * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
121 2009-10-06 Zoltan Varga <vargaz@gmail.com>
123 * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
125 2009-10-06 Mark Probst <mark.probst@gmail.com>
127 * object.c (mono_method_return_message_restore): Handle the case
128 where the argument is an instance of a generic type. Fixes
131 2009-10-06 Mark Probst <mark.probst@gmail.com>
133 * object.c (set_value): Write barrier fix - we must pass the
136 2009-10-05 Zoltan Varga <vargaz@gmail.com>
138 * domain.c (mono_init_internal): Print a useful error message when encountering
139 an old mscorlib, instead of crashing. Fixes #544307.
141 2009-10-04 Zoltan Varga <vargaz@gmail.com>
143 * appdomain.c (copy_app_domain_setup): Fix a warning.
145 * debug-helpers.c (dis_one): Ditto.
147 2009-10-04 Mark Probst <mark.probst@gmail.com>
149 * domain-internals.h, appdomain.c: The AppDomainSetup is copied
150 into the new domain, instead of referencing the original one.
152 * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
155 * appdomain.c: Corlib version bump.
157 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
159 * threadpool.c: one more...
161 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
163 * threadpool.c: forgot a LeaveCriticalSection when telling the idle
164 threads to die because we're shutting down. delgate5.exe works again.
166 2009-10-01 Bill Holmes <billholmes54@gmail.com>
168 * cominterop.c (mono_marshal_free_ccw_entry): Updating the
169 ccw_interface_hash table when a ccw is finalized.
171 Code is contributed under MIT/X11 license.
173 2009-09-30 Mark Probst <mark.probst@gmail.com>
175 * assembly.c, domain.c, image.c, metadata-internals.h: Split
176 domain and image unloading into two steps. We must do this
177 because clearing the domain in SGen requires the class metadata to
178 be intact, but we need to free the mono_g_hash_tables in case a
179 collection occurs during domain unloading and the roots would trip
182 2009-09-30 Mark Probst <mark.probst@gmail.com>
184 * object-internals.h: Remove serialized culture fields from
187 * icall-def.h, thread-types.h, threads.c: Remove serialized
190 * appdomain.c: Corlib version bump.
192 2009-09-30 Zoltan Varga <vargaz@gmail.com>
194 * marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
197 2009-09-30 Mark Probst <mark.probst@gmail.com>
199 * sgen-gc.c: Try to shorten the new section after a major
200 allocation to avoid ever-growing sections.
202 2009-10-13 Martin Baulig <martin@ximian.com>
204 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
205 `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
206 `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
207 `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
209 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
211 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
213 * threadpool.c: fixed the order in which 'completed' and the wait
214 handle, if any, are set. Fixes bug #542933 and delegate2.exe
215 No need to use the wait_handle field of ASyncCall. Make sure the
216 threadpool is active when adding a job or queueing an idle thread.
218 2009-09-29 Zoltan Varga <vargaz@gmail.com>
220 * object.c (mono_unhandled_exception): Fix a crash if there is no main thread.
222 * threads.c (build_wait_tids): Fix a crash if there is no main thread, like
223 when using --compile-all.
225 2009-09-27 Mark Probst <mark.probst@gmail.com>
227 * metadata.c (free_generic_class): Unregister the field_objects
228 roots if we're using SGen.
230 2009-09-27 Mark Probst <mark.probst@gmail.com>
232 * reflection.c (mono_dynamic_image_free): Deregister the GC root
233 for GenericParamTableEntry.gparam.
235 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
237 * marshal.c: don't create the handle when calling. It is created later
240 2009-09-26 Mark Probst <mark.probst@gmail.com>
242 * sgen-gc.c: Warning fixes.
244 2009-09-26 Mark Probst <mark.probst@gmail.com>
246 * sgen-gc.c: New debug option "xdomain-checks", which scans the
247 whole heap for cross-domain references before each collection.
249 * sgen-scan-object.h: The scan action can now use SCAN to scan the
252 * threadpool-internals.h, threadpool.c: New function
253 mono_thread_pool_is_queue_array() for checking whether a given
254 array is used as a (cross-domain) queue by the thread pool code.
256 2009-09-26 Mark Probst <mark.probst@gmail.com>
258 * sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
259 searches the whole heap for objects containing a specific
260 reference. Only for debugging.
262 2009-09-26 Mark Probst <mark.probst@gmail.com>
264 * appdomain.c (MONO_CORLIB_VERSION): Bumped.
266 * icall-def.h, threads.c, threads-types.h: New icalls for copying
267 byte arrays between domains.
269 2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
273 * mono-perfcounters-def.h:
274 * mono-perfcounters.c:
275 -There is a list of idle threads
276 -Each of those idle threads wait on their own WaitHandle instead
277 of all of them using the same semaphore. When a new work item is
278 added, the job is assigned directly to an idle thread or a newly
279 created one if possible and then the handle for that thread is
280 signaled. Compare that to the current approach where all the
281 threads in the pool compete to dequeue a job from the same
283 -New struct ThreadPool that brings together the bunch of static
284 variable for each threadpool (IO and regular).
285 -New performance counters: # of items added and its rate per
286 threadpool. The rate will be used later, perhaps together with
287 other perf. counters, to decide when idle threads should exit.
289 2009-09-25 Jonathan Chambers <joncham@gmail.com>
291 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal):
292 Fix typo on Windows build.
293 (ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
295 Code is contributed under MIT/X11 license.
297 2009-09-25 Mark Probst <mark.probst@gmail.com>
299 * object-internals.h: The Thread class is split up into Thread and
300 InternalThread now. We have exactly one InternalThread per
301 thread, and at most one Thread per appdomain per thread. Most
302 data is stored in InternalThread. All InternalThread objects live
305 * class-internals.h: Add internal_thread_class to MonoDefaults.
307 * appdomain.c (mono_domain_unload), attach.c (receiver_thread),
308 domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
309 socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
310 resulting from the split of the Thread class.
312 * gc-internal.h: Prototype for new function for checking whether a
313 thread is the finalizer thread.
315 * appdomain.c: Corlib version bump.
317 2009-09-25 Rolf Bjarne Kvinge <RKvinge@novell.com>
319 * appdomain.c|h: Add a mono_domain_try_unload method which is
320 equivalent to mono_domain_unload, except that it returns an exception
321 instead of throwing it. Make mono_domain_unload use the
322 mono_domain_try_unload method to avoid code-duplication.
324 2009-09-25 Zoltan Varga <vargaz@gmail.com>
326 * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
329 2009-09-24 Zoltan Varga <vargaz@gmail.com>
331 * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
332 aborting when a conversion is not implemented.
334 2009-09-23 Miguel de Icaza <miguel@novell.com>
336 * verify.c: when comparing culture strings, use g_ascii_strcmp
338 * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
339 when comparing public key tokens to use memcmp on 16 bytes. I do
340 not believe this ever worked as advertised in the past.
342 The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
343 which would have always failed earlier.
345 2009-06-25 Miguel de Icaza <miguel@novell.com>
347 * gc.c: Raise a NullArgumentException if the object passed is
350 2009-09-22 Zoltan Varga <vargaz@gmail.com>
352 * image.c (mono_image_close): Atomically decrement the reference count and
353 remove the image from the hash tables, to prevent another thread from seeing a
354 dying MonoImage. Fixes #541194.
356 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
358 * threadpool.c: actually use the minimum number of 'completion ports'
359 (for us is just a potential worker thread).
361 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
363 * threadpool.c: remove ares_htable. It does not make sense any more
364 since the same objects are now stored in GC-tracked arrays while they are
367 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
369 * threadpool.c: increase the minimum length of the queues to 128.
372 2009-09-21 Zoltan Varga <vargaz@gmail.com>
374 * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
375 return the modified signature used by string ctors.
377 2009-09-20 Zoltan Varga <vargaz@gmail.com>
379 * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
380 to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
381 method, to be used by full-aot.
383 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
385 Since the runtime supports lazy initialization of a type's vtable and this can cause a type
386 to fail, we need to ensure that the vtable is properly initialized at spots were the type must
389 * class.c (mono_class_init): Fail array types if their element type fails initialization
392 * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
393 initialization, additionally we request the element_type vtable to be initialized as well.
395 This is fine and should not increase the working set in any meaningful way since it's reasonable
396 to assume that most code will create an array and eventually populate it, which will require the
397 type's vtable to be initialized.
399 * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
401 2009-09-17 Atsushi Enomoto <atsushi@ximian.com>
403 * normalization-tables.h : regenerated.
405 2009-09-16 Zoltan Varga <vargaz@gmail.com>
407 * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
408 a leb128 encoding can take up to 5 bytes.
410 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
412 * class.c (verify_class_overrides): Remove useless argument.
414 * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
415 before interface enumeration as this is no longer required.
417 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
419 * class.c: New function mono_class_is_assignable_from_slow that is safe to be
420 used under mono_class_init context. This functions avoid any code path that
421 calls mono_class_init, which leads it to be slow as some things like the interface
422 bitmap are not available.
424 * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
425 of it's own broken version. Fixes the verifier part of #538588.
427 * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
430 2009-09-15 Mark Probst <mark.probst@gmail.com>
432 * class.c (mono_class_init): Always set an exception in a class if
433 vtable setup fails. Fixes #538577.
435 * generic-sharing.c: Raise an exception if mono_class_vtable()
438 2009-09-13 Zoltan Varga <vargaz@gmail.com>
440 * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance
441 methods of vtypes, as they could be incorrectly shared with static methods
442 taking an IntPtr argument.
444 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
448 * class-internals.h: renamed waithandle_class to
449 manualresetevent_class.
450 * marshal.c: propagate the exception if a remoting BeginInvoke call
453 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
455 * object.c: Properly handle vtable failures.
457 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
459 * socket-io.c: Assert on vtable failure.
461 * mono-mlist.c: Assert on vtable failure.
463 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
465 * marshal.c: Assert on vtable failure.
467 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
469 * icall.c: Properly handle vtable failures.
471 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
473 * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
475 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
477 * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
479 * console-unix.c (do_console_cancel_event): Same.
481 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
483 * class-internals.h: Add mono_class_vtable_full function that allows control
484 if an exception should be raised or not.
486 * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
487 to do what its documentation say, that is to return NULL and set exception_type on
490 * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
491 and change the code to honor it.
493 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
495 * verify.c: Fix typo in error message.
497 2009-09-10 Sebastien Pouliot <sebastien@ximian.com>
499 * security-core-clr.c: Fix default_platform_check so it can run
500 the runtime coreclr tests (without an infinite recursion when
501 throwing an exception).
503 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
505 object.c (mono_delegate_ctor_with_method): Guard against null method.
507 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
509 * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
510 that should be replaced with error handling later.
512 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
514 * marshal.c (mono_delegate_end_invoke): Fix warning.
516 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
518 * loader.c (mono_field_from_token): Properly handle invalid
521 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
523 * pedump.c (verify_image_file): Skip types that can't be
526 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
528 * verify.c: Look for recursive valuetypes only against the
529 type been initialized as this is a lot simpler and works.
531 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
533 * verify.c: Ensure that fields are properly loaded before
536 2009-09-10 Bill Holmes <billholmes54@gmail.com>
538 * object.c (mono_object_get_virtual_method) : Call
539 mono_cominterop_get_invoke if the object is a COM object.
541 Code is contributed under MIT/X11 license.
543 2009-09-09 Rodrigo Kumpera <rkumpera@novell.com>
545 * verify.c: Check for recursive valuetype definitions.
547 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
549 Use inheritance-aware interface offsets. Inherited types use the same offsets
550 of their parents. This reduce offset duplication in case more than one type in
551 the inheritance tree explicitly implements the same interface.
553 This also removes a source of vtable bubbles found in #532409. An abstract type
554 isn't required to provide abstract methods to all interfaces it implements, which
555 resulted in a bubble with the previous scheme as the child would get a non-full
556 vtable from its parent. We fail all concrete types with vtable bubbles, so this
559 This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
560 it's expected to not cause any significant increase beyond that.
562 * class.c (setup_interface_offsets): Compute super class iface offsets
563 first to force sharing.
565 * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
566 dumping only the relevant ones.
568 * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
569 methods a new slot regardless if they belong to an interface or not. This allows
570 an inherited type to override the iface method separately from the class one.
572 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
574 * threadpool.c: make the Sleep() alertable to prevent delays exiting
575 applications that take less than 2s to execute.
578 2009-09-04 Zoltan Varga <vargaz@gmail.com>
580 * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
582 * object.c (mono_get_runtime_callbacks): New helper function to return
583 the runtime callbacks.
585 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
586 mono_get_runtime_build_info () as the display name.
588 2009-09-03 Zoltan Varga <vargaz@gmail.com>
590 * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
591 argument, since NEWARR expects a native int. Fixes #481559.
593 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
595 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
596 against broken SRE methods.
598 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
600 * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
601 a NULL variable. Abort early on failure.
603 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
605 * class.c (can_access_type): Fail visibility test for non nested
606 types with nested visibility.
608 2009-09-02 Sebastien Pouliot <sebastien@ximian.com>
610 * assembly.c (parse_public_key): Avoid allocating (and not
611 freeing) the public key array when it's not requested by the
613 * threads.c (mono_thread_manage, mono_thread_create_internal,
614 ves_icall_System_Threading_Thread_Thread_internal): Free
615 allocated memory on error.
617 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
619 * icall.c, icall-def.h: Remove some dead code from early SRE changes.
621 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
623 * class.c (mono_class_setup_fields): Remove duplicated local variable
625 Rename gklass to gtd to reflect the fact that it points to the generic
627 Remove the duplicated call to mono_class_setup_fields on gtd and move
628 the error check to the beginning.
630 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
632 * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
633 Remove cruft of the previous patch.
635 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
637 * metadata-verify.c (verify_method_table): Check for abstract + final.
640 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
642 * verify.c (verify_class_fields): Check for duplicate fields.
644 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
646 * metadata-verify.c: Verify the typeref table for duplicates.
648 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
650 This reverts r140936 and properly handles interfaces with static methods. The
651 right fix is to ensure vtables without bubles which is an easier to verify
652 constraint. We should avoid such special cases as of the reverted patch as those
653 only make the runtime more brittle.
655 * class.c (mono_class_setup_vtable_general): Revert previous change that handle
656 static methods on interfaces.
658 * class.c (setup_interface_offsets): Use the number of virtual methods when
659 calculating interface offsets instead of the number of methods. This way we
660 avoid bubles on the layout.
662 2009-08-31 Rodrigo Kumpera <rkumpera@novell.com>
664 * metadata-verify.c (verify_metadata_header): Some very smart
665 obfuscators like to add extra stream headers. Ignore them.
667 2009-08-30 Zoltan Varga <vargaz@gmail.com>
669 * class.c (mono_class_setup_vtable_general): Verify interfaces with static
672 2009-08-29 Rodrigo Kumpera <rkumpera@novell.com>
674 * metadata-verify.c: Verify for duplicated types.
676 2009-08-28 Rodrigo Kumpera <rkumpera@novell.com>
678 * metadata-verify.c (verify_typedef_table): Verify for nested types
679 without an entry on the nested class table.
681 2009-08-28 Zoltan Varga <vargaz@gmail.com>
683 * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
684 <tom_hindle@sil.org>. Add locking around hash table accesses.
686 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
688 * verify.c (mono_verifier_verify_class): Verify all interface if
689 really are interfaces. Fixes #534184.
691 2009-08-27 Rodrigo Kumpera <rkumpera@novell.com>
693 * pedump.c: Initialize all types during metadata validation so we report
694 errors only detected as part of class initialization.
696 2009-08-26 Rodrigo Kumpera <rkumpera@novell.com>
698 * metadata-verify.c (verify_method_table): PInvoke requires method to
699 be static. Fixes #534189
701 2009-08-26 Zoltan Varga <vargaz@gmail.com>
703 * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
706 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
708 * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
709 for holes or bad methods. Fixes #525314.
711 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
713 * class.c (setup_interface_offsets): Don't allocate slot
714 for the same interface multiple times. This creates bubbles
715 that waster space and make vtable verification harder.
717 The same interface get a slot multiple times since we need
718 to get the closure of all implemented interfaces, which means
719 the same interface is reported multiple times.
721 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
723 * verify.c (mono_verifier_verify_class): Don't check the fields
724 of generic instances since the context on which they got expanded
725 might lead to false positives.
727 Such thing happens when a generic type is inflated in the context
728 of a generic method and the inflated type of a field turns into a
729 generic method argument, which causes the checking code to think
730 it's an invalid class when it's not.
732 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
734 * verify.c (mono_type_is_valid_in_context): Verify if type
735 is NULL and remove duplicate test.
737 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
739 * verify.c (mono_verifier_verify_class): Check fields for
740 invalid generic arguments.
742 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
744 * class.c (verify_class_overrides): Verify if for static
745 and non virtual methods.
747 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
749 * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
750 Check for errors after retrieving the vtable.
752 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
754 * class.c (mono_class_setup_vtable_general): Verify
755 if method overrides are valid before processing them.
757 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
759 * marshal.c (mono_array_to_lparray): Fix minimal build with
762 * marshal.c (mono_free_lparray): Same.
764 2009-08-21 Mark Probst <mark.probst@gmail.com>
766 * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
767 the hash function for the ares_htable.
769 2009-08-20 Rodrigo Kumpera <rkumpera@novell.com>
771 * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
772 bit for assembly flags. MS is ok with it but there is no spec anywhere
775 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
777 * class.c (mono_class_create_from_typedef): Emit profiler events
780 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
782 * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
783 Release memory on failure.
785 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
787 * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
790 * metadata.c (get_constraints): Use a single-linked table as we don't
791 traverse it backward. Fail and return FALSE if only of the contraint types
794 * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
795 to mono_metadata_load_generic_param_constraints except for having a return value.
796 This has to be done since the later is part of the public API.
798 * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
801 * loader.c (mono_get_method_from_token): Properly check the loading of constraints
804 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
806 * metadata-verify.c (is_valid_method_header): Add work-around to deal
807 with MS broken behavior of emmitting EH section sizes without the
810 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
812 * metadata.c (mono_type_create_from_typespec): Don't allocate image
813 memory until we're sure that we'll need it. This avoids leaking for
814 broken types or duplicated instantiation.
816 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
818 * metadata-verify.c (is_valid_method_header): Fix stupid formating
821 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
823 * metadata-verify.c (is_valid_method_header): Fix number of clauses
824 and expected size calculation.
826 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
828 * class.c (mono_class_get_field_idx): Add fixme for broken
829 behavior for types with multiple fields with the same name.
830 I would rather fix it, but have no idea on how to generate
831 such artifact for testing.
833 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
835 * verify.c (verifier_load_field): We should allow references to
836 fields to be made using the generic type definition. It's up to
837 the loader system to fail invalid ops.
839 * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
842 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
844 * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
846 * metadata-internals.h: Fix declaration of
847 mono_metadata_interfaces_from_typedef_full.
849 * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
850 heap_alloc_result parameter that controls if the result should be
853 * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
854 array be g_malloc'd and properly document this public API function.
856 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
858 * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
859 remove METHOD_HEADER_TINY_FORMAT1.
861 * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
863 * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
865 Both spec and MS uses only 2 bits to enumerate the kind of header.
866 So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
867 is superfluous, only used for tiny headers with odd code lengths.
869 This change also make sure that mono doesn't wronly interpret bit 2
870 of fat header flags, which is currently reserved.
872 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
874 * metadata.c (do_mono_metadata_parse_type): Do error
875 checking for element types. Don't abort if presented
876 with a broken type kind.
878 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
880 * metadata.c (mono_metadata_parse_method_signature_full):
881 Gracefully fail bad vararg signatures.
883 2009-08-18 Christian Hergert <chris@dronelabs.com>
886 * class.c: Fix warnings for uninitialized variables.
888 2009-08-18 Christian Hergert <chris@dronelabs.com>
890 * icall.c: Fix _NSGetEnviron method declaration warning.
892 2009-08-18 Christian Hergert <chris@dronelabs.com>
895 * reflection.c: Make bitwise checks explicit.
897 2009-08-18 Christian Hergert <chris@dronelabs.com>
900 * marshal.c: Fix printf warnings.
902 2009-08-18 Zoltan Varga <vargaz@gmail.com>
904 * reflection.c (encode_cattr_value): Fix a warning.
906 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
908 * metadata.c (mono_metadata_parse_array_full): Fix memory leak
911 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
913 * loader.c (mono_method_signature): Don't assert on broken
914 signature. Print a more useful error message.
916 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
918 * loader.c (mono_method_get_marshal_info): Assert if
919 signature is invalid. Bounds check stores to the
922 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
924 * loader.c (field_from_memberref): Fix warning.
926 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
928 * loader.c (mono_method_get_param_names): Check if signature
929 is null. Don't store beyond the size of the name array.
931 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
933 * loader.c (mono_get_method_constrained): Check if signature
936 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
938 * loader.c (mono_loader_set_error_bad_image): Improve
941 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
943 * loader.c (mono_get_method_full): Convert an assertion
946 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
948 * class-internals.h, class.c: Better naming and documentation.
950 2009-08-17 Zoltan Varga <vargaz@gmail.com>
952 * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
955 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
957 * loader.c (mono_method_get_signature_full): Fail gracefully if signature
960 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
962 * loader.c (mono_loader_error_prepare_exception): Handle missing field
963 errors with no class set.
965 * loader.c (field_from_memberref): If the field signature is of the wrong
966 type fail with a MissingFieldException instead of a BadImageException as
967 this is the behavior observed on MS.
969 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
971 * loader.c (field_from_memberref): Don't crash if either the field
972 signature or the typespec class are invalid.
974 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
976 * verify.c (verifier_load_field): Don't allow field related
977 ops to reference fields on generic type definition.
979 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
981 * metadata-verify.c: Add new warning level for errors specified
982 by ECMA 335 but that MS ignores.
984 * metadata-verify.c (verify_method_table): Make compiler controled
985 visibility + (rt)specialname error a warning as MS ignores this. Ignoring
986 this check is safe because the end result will only be some visibility
987 exceptions been thrown.
989 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
991 * verify.c (get_boxable_mono_type): Don't allow the
992 use of the generic type definition on boxed type positions.
996 2009-08-14 Mark Probst <mark.probst@gmail.com>
998 * threadpool.c: Make sure no cross-domain references remain in
999 ares_htable or the arrays that are thrown away when resizing.
1001 2009-08-14 Mark Probst <mark.probst@gmail.com>
1003 * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
1004 list of classes for which we have to unregister reflection_info
1005 with the GC and which are not in the namespace cache.
1007 * reflection.c (mono_reflection_initialize_generic_parameter): Add
1008 the class to the list.
1010 2009-08-14 Mark Probst <mark.probst@gmail.com>
1012 * domain.c (mono_domain_free): Unregister the GC roots in
1015 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
1017 * reflection.c (mono_reflection_type_get_handle): Fix typo.
1019 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
1021 * class.c: Add mono_class_get_field_from_name_full which does
1022 the same as mono_class_get_field_from_name but does check field
1025 * class-internals.h: Export mono_class_get_field_from_name_full as
1026 part of the internal API.
1028 * loader.c (field_from_memberref): Search fields by name and signature
1029 as it's valid to have two fields with same name but different types.
1033 2009-08-10 Rodrigo Kumpera <rkumpera@novell.com>
1035 * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
1037 * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
1039 * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
1042 2009-08-13 Zoltan Varga <vargaz@gmail.com>
1044 * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
1046 * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
1048 2009-08-12 Mark Probst <mark.probst@gmail.com>
1050 * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
1051 to sgen-scan-object.h, which can be included and parameterized via
1054 * Makefile.am: sgen-scan-object.h added.
1056 2009-08-12 Mark Probst <mark.probst@gmail.com>
1058 * gc.c: #define GC_dont_gc if we're compiling with SGen.
1060 2009-08-12 Mark Probst <mark.probst@gmail.com>
1062 * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
1063 before clearing a domain in the GC.
1065 2009-08-12 Mark Probst <mark.probst@gmail.com>
1067 * exception.c (mono_exception_from_name_domain): Actually create
1068 the exception in the specified domain.
1070 * appdomain.c (mono_domain_create_appdomain_internal): Create the
1071 OutOfMemoryException a bit later so that the domain is inialized
1072 "enough" that it works.
1074 2009-08-12 Mark Probst <mark.probst@gmail.com>
1076 * threads.c (thread_cleanup): Clean up the cached_culture_info
1077 array to prevent cross-domain references.
1079 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
1081 * metadata.c: more documentation for MonoType accessors.
1083 2009-08-11 Raja R Harinath <harinath@hurrynot.org>
1085 Fix incorrect size definitions where the tail array isn't a list
1087 * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
1089 * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
1090 * metadata.h (MONO_SIZEOF_TYPE): Likewise.
1091 * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
1093 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1096 * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
1098 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1102 * metadata-internals.h:
1104 * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
1106 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1113 * reflection.c: #define for sizeof in MonoType and
1114 MonoMethodSignature.
1116 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1119 * domain-internals.h: add and use #define's instead of sizeof()
1120 for MonoJitInfo and MonoJitInfoTable.
1122 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
1125 * class.h: use #define instead of sizeof() for MonoRemoteClass.
1127 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1132 * class-internals.h:
1133 * generic-sharing.c:
1134 * marshal.c: use a #define instead of sizeof() for a few
1135 structures that use a zero-length array.
1137 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com>
1139 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
1140 to handle inflated generic methods.
1142 * appdomain.c: Bump corlib version.
1144 * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
1147 * reflection.c (fixup_method): Same
1149 * reflection.c (resolve_object): Same.
1151 * reflection.c (inflate_method): Replace a g_assert_not_reached with a
1152 g_error and a decent message.
1154 2009-08-06 Massimiliano Mantione <massi@ximian.com>
1156 * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
1157 from the object because it could not yet be available globally
1158 (it happens if the profiler tries to create a gchandle on the
1159 MonoThread object of a thread that is still registering itself
1162 2009-08-04 Rodrigo Kumpera <rkumpera@novell.com>
1164 * reflection.c (mono_generic_class_get_object): Initialized the
1165 managed type arguments array.
1167 * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
1169 * appdomain.c: Bump corlib version.
1171 2009-08-04 Zoltan Varga <vargaz@gmail.com>
1173 * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
1176 2009-08-03 Zoltan Varga <vargaz@gmail.com>
1178 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
1179 Avoid a crash if synch_cs is not set.
1181 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
1182 Handle the case when the handle is 0.
1184 * appdomain.c: Bump corlib version.
1186 2009-08-02 Zoltan Varga <vargaz@gmail.com>
1188 * reflection.c (mono_type_get_object): Fix a warning.
1190 2009-08-01 Mark Probst <mark.probst@gmail.com>
1192 * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
1193 descriptor here. We assume it's already been computed.
1195 * generic-sharing.c (instantiate_other_info): Compute the GC
1196 descriptor for info type MONO_RGCTX_INFO_KLASS.
1198 2009-08-01 Mark Probst <mark.probst@gmail.com>
1200 * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
1201 type, so don't use MONO_OBJECT_SETREF to set a field.
1203 2009-08-01 Mark Probst <mark.probst@gmail.com>
1205 * gc.c: We were missing one case where invoking a finalizer would
1206 not reset the domain. Also, in the finalizer thread loop, assert
1207 that we're in the root domain.
1209 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1211 * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
1212 if the type is not an array.
1214 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1216 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
1217 method bound to the declaring type of the method. Raise an exception
1218 if the type is not a generic param.
1220 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
1222 * class.c (print_unimplemented_interface_method_info): Print the
1225 * class.c (mono_class_setup_vtable_general): When dealing with a
1226 generic instance first check if the generic type definition is
1229 2009-02-11 Tom Hindke <tom_hindle@sil.org>
1231 * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
1233 * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
1235 * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
1237 * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
1239 * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
1241 Code is contributed under MIT/X11 license
1243 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
1245 * verify.c: Fix naming of stelem and ldelem.
1247 2009-07-30 Mark Probst <mark.probst@gmail.com>
1249 * generic-sharing.c: Replace the templates lock with the loader
1250 lock because of very hard to resolve deadlock issues.
1252 2009-07-30 Zoltan Varga <vargaz@gmail.com>
1254 * icall.c (ves_icall_Type_GetMethodsByName): Use
1255 mono_class_get_vtable_size () instead of accessing klass->vtable_size
1256 directly. Fixes #525338.
1258 * class.c (mono_class_get_vtable_size): New helper function.
1260 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
1261 the field belongs to the type. Fixes #525733.
1263 2009-07-30 Mark Probst <mark.probst@gmail.com>
1265 * sgen-gc.c: When we stop a thread and its stack top is not within
1266 its allocated stack (because it's in an altstack signal handler),
1267 restart it and stop it again, until it is.
1269 2009-07-30 Mark Probst <mark.probst@gmail.com>
1271 * sgen-gc.c: Take a thread's stack top and registers from the
1272 sigcontext in the suspend signal handler.
1274 * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
1275 stuff to sgen-archdep.h.
1277 * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
1278 caller, because have code in sgen-archdep.h to acquire that data.
1280 2009-07-29 Massimiliano Mantione <massi@ximian.com>
1282 * profiler.c, profiler.h, profiler-private.h:
1283 Added support for keeping track of code chunks and buffers.
1285 2009-07-29 Rodrigo Kumpera <rkumpera@novell.com>
1287 * metadata-verify.c: Fix endianness problems on decoding functions.
1288 Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
1290 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
1292 * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
1293 schema for vectors and one dimension SZARRAY.
1295 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
1297 * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
1298 schema for vectors and one dimension SZARRAY.
1300 2009-07-27 Mark Probst <mark.probst@gmail.com>
1302 * icall-def.h, thread-types.h, threads.c: New separate icalls for
1303 Interlocked.(Compare)Exchange with object arguments, which invoke
1306 2009-07-26 Miguel de Icaza <miguel@novell.com>
1308 * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
1309 passed invalid arguments. Fixes another crasher in the
1310 Silverlight test suite.
1312 * class.c (mono_class_array_element_size): Return 0 for the size
1313 of the class; This fixes the crasher exposed by :
1315 typeof (void).MakeArrayType ();
1317 * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
1318 if there is no method to dereference. Put all the code that
1319 depends on this inside the if (method) block.
1321 This fixes the crasher exposed by Microsoft's Silvelright CLR test
1322 suite ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
1324 With this change, we pass the test.
1326 * reflection.c (mono_reflection_sighelper_get_signature_local):
1327 Only dereference the assembly if it has been set. Fixes a
1328 crasher exposed by #525328
1330 2009-07-25 Mark Probst <mark.probst@gmail.com>
1332 * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
1333 don't perform the store in mono_gc_wbarrier_generic_nostore().
1334 Remove the second argument (value), which is not needed.
1336 2009-07-24 Zoltan Varga <vargaz@gmail.com>
1338 * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
1341 * boehm-gc.c: Ditto.
1343 2009-07-24 Mark Probst <mark.probst@gmail.com>
1345 * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
1346 not perform the store itself. Introduce
1347 mono_gc_wbarrier_generic_nostore(), which is the same as
1348 mono_gc_wbarrier_generic_store(), except it doesn't perform the
1351 2009-07-24 Mark Probst <mark.probst@gmail.com>
1353 * icall.c (ves_icall_System_Array_SetGenericValueImpl):
1354 mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
1355 we still need the memcpy().
1357 2009-07-22 Mark Probst <mark.probst@gmail.com>
1359 * sgen-gc.c: Align array bounds calculation to mono_array_size_t
1360 so that big arrays are handled correctly. Always use
1361 safe_object_get_size() to calculate array object sizes, which
1362 takes bounds into account.
1364 2009-07-22 Mark Probst <mark.probst@gmail.com>
1366 * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
1367 GC descriptor is computed before we use it.
1369 2009-07-22 Mark Probst <mark.probst@gmail.com>
1371 * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
1372 write barrier if necessary.
1374 2009-07-22 Mark Probst <mark.probst@gmail.com>
1376 * icall-def.h, icall.c, thread-types.h: New separate icall for
1377 VolatileWrite(object&,object) that uses a write barrier.
1379 * console-unix.c, file-io.c, icall.c, threads.c: Use write
1380 barriers in icalls which write to "ref" or "out" arguments.
1382 2009-07-21 Zoltan Varga <vargaz@gmail.com>
1384 * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
1385 handler in a separate icall, to reduce the size of the wrappers.
1387 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1389 * metadata-verify.c (is_valid_typespec_blob): Fix error message.
1391 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1393 * metadata-verify.c (parse_field): Allow byref field.
1395 * metadata-verify.c (parse_locals_signature): Allow byref locals.
1397 * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
1399 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
1401 * verify.c (do_cast): Fail for any non reference type that isn't boxed.
1404 2009-07-20 Robert Jordan <robertj@gmx.net>
1406 * cominterop.c (cominterop_get_managed_wrapper_adjusted):
1407 Fix invalid IL in valuetype handling (STOBJ must push the
1408 corresponding class). Fixes bug #523149.
1410 Code is contributed under MIT/X11 license.
1412 2009-07-20 Geoff Norton <gnorton@novell.com>
1414 * gc.c: Use proper semaphores where available on posix and darwin.
1416 2009-07-19 Geoff Norton <gnorton@novell.com>
1418 * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
1420 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
1422 * refletion.c (is_sre_usertype): Change name to is_usertype and
1423 invert it's result so it returns true if the type is an user type
1424 and not the opposite.
1426 * reflection.c (is_*_type): Change all of those to use new macro
1427 check_corlib_type_cached that cached the type lookup so we don't
1428 need to do string comparisons all the type. Changed the signature
1429 to take a MonoClass instead.
1431 * reflection.c: Change mono_image_create_token and resolve_object
1432 to use is_sre_* functions.
1434 2009-07-18 Mark Probst <mark.probst@gmail.com>
1436 * sgen-gc.c: Check for writes to the stack in the managed
1439 2009-07-18 Mark Probst <mark.probst@gmail.com>
1441 * sgen-gc.c: When a thread is unregistered, don't free its remsets
1442 but put them on a list which is processed with the other thread's
1445 2009-07-18 Mark Probst <mark.probst@gmail.com>
1447 * sgen-gc.c: Fix and enable the internal allocator instead of
1448 using malloc/free (which causes deadlocks).
1450 2009-07-16 Rodrigo Kumpera <rkumpera@novell.com>
1452 * refletion.c: Fix builds with SRE disabled by adding a minimal
1453 implementation of mono_reflection_type_get_handle.
1455 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1457 * refletion.c: Make mono_reflection_type_get_handle non static.
1459 * object-internals.h: Export mono_reflection_type_get_handle.
1461 * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
1462 unmanaged handle using mono_reflection_type_get_handle.
1464 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1466 * refletion.c: Replace all reads of MonoReflectionType::type with
1467 calls to mono_reflection_type_get_handle. Only the functions that
1468 deal with constructing TypeBuilder::type have not been changed
1469 because they have to deal with NULL values.
1471 This is a first step into supporting reflection types that don't
1472 map directly into their unmanaged counterpart.
1474 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1476 * metadata-verify.c (parse_locals_signature): Don't complain
1477 on signature with zero locals since MS generates it and doesn't
1480 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
1482 * reflection.c (mono_image_get_array_token): Resolve return
1483 type using mono_reflection_type_get_handle.
1485 * reflection.c (mono_image_get_array_token): Resolve array method
1486 parent type using mono_reflection_type_get_handle.
1488 2009-07-14 Zoltan Varga <vargaz@gmail.com>
1490 * reflection.c (mono_image_basic_init): Applied patch from
1491 <Dax@daxxfiles.net>. Set the public key token from the assembly
1492 builder. Fixes #518909.
1494 * appdomain.c: Bump corlib version.
1496 2009-07-13 Zoltan Varga <vargaz@gmail.com>
1498 * class.c (mono_class_needs_cctor_run): Make this return false if
1499 the class has no cctor.
1501 2009-07-13 Mark Probst <mark.probst@gmail.com>
1503 * sgen-gc.c: When the minor GC needs to allocate a new section,
1504 invoke the major GC afterwards.
1506 2009-07-14 Bill Holmes <billholmes54@gmail.com>
1508 * process.c (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
1509 Applying the window_style field to the SHELLEXECUTEINFO struct.
1511 Code is contributed under MIT/X11 license.
1513 2009-07-13 Mark Probst <mark.probst@gmail.com>
1515 * sgen-gc.c: Fix the race condition in the unmanaged allocator by
1516 locking earlier. Fix it in the managed allocator by making sure
1517 that no thread is stopped there before the GC runs. If we do stop
1518 a thread there, we restart it and let it run a but, until it stops
1521 * gc-internal.h, gc.c: Function for getting the IP from a signal
1522 context via a function registered by mini.
1524 2009-07-11 Zoltan Varga <vargaz@gmail.com>
1526 * object-internals.h (MonoIntPtr): New structure describing a boxed
1529 * object.c (mono_runtime_invoke_array): Handle ptr arguments and
1530 returns. Fixes #519953.
1532 * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
1534 2009-07-09 Mark Probst <mark.probst@gmail.com>
1536 * class-internals.h, generic-sharing.c: New RGCTX info type for
1537 getting a remoting invoke with check wrapper.
1539 2009-07-07 Geoff Norton <gnorton@novell.com>
1541 * icall-def.h: Fix the enable-minimal build.
1543 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1545 * object-internals.h: Add MonoReflectionDerivedType.
1547 * reflection.c: Implement support for PointerType.
1548 Fixed tons of warnings.
1550 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1552 * object-internals.h: Add MonoReflectionByRefType.
1554 * reflection.c: Implement support for ByRefType.
1556 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1558 * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
1560 * object-internals.h: Add MonoReflectionArrayType and
1561 mono_reflection_create_unmanaged_type.
1563 * reflection.c: Implement support for ArrayType.
1565 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
1567 * metadata-verify.c (is_valid_method_header): Parse EH block
1570 2009-07-03 Mark Probst <mark.probst@gmail.com>
1572 * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
1573 processing the disappearing links, and process disappearing links
1574 in a loop until no new objects are copied.
1576 2009-07-03 Mark Probst <mark.probst@gmail.com>
1578 * object.c (handle_enum): Invoke the write barrier when copying
1579 value type instances.
1581 * sgen-gc.c: Register remsets for unmanaged write barriers only
1582 when the address written to is actually on the heap. This makes
1583 set_value() in object.c work without requiring that the result be
1586 2009-07-02 Rodrigo Kumpera <rkumpera@novell.com>
1588 The runtime wrappers are all bound to a given type that must
1589 exist in the same image. For regular images we use the <Module>
1590 type, which is required to exist for all images.
1592 The <Module> type can't be used for dynamic images because it
1593 might not exist at the time the wrapper is required, so we create
1594 a synthetic type to use instead.
1596 The current code works because of the 2 stage setup of MonoClass,
1597 but once this is gone it will no longer work.
1599 * icall-def.h: Add ModuleBuilder::set_wrappers_type.
1601 * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
1603 * object-internals.h: Export mono_image_set_wrappers_type icall
1604 as part of the internal API.
1606 * marshal.c (get_wrapper_target_class): If the image is dynamic,
1607 use MonoDynamicImage::wrappers_type instead of the <Module> type.
1609 reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
1610 image wrappers_type to the provided value.
1612 2009-07-01 Rodrigo Kumpera <rkumpera@novell.com>
1614 * appdomain.c (deregister_reflection_info_roots): No need
1615 to use the image lock here.
1617 2009-07-02 Mark Probst <mark.probst@gmail.com>
1619 * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
1621 2009-06-29 Zoltan Varga <vargaz@gmail.com>
1623 * threads.c: Store the thread start argument in a hash table instead of
1624 registering it as a root, as libgc doesn't support unregistering roots
1625 under windows, leading to 'too many root sets' errors when many threads
1628 * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
1629 shutdown, they can still be referenced by the other dying objects.
1632 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1634 * socket-io.c: DontLinger does not allow LingerOptions.
1636 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1638 * metadata-verify.c: The spec doesn't mention that it's possible to add
1639 custom attribute to a generic parameter. Fixed.
1641 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1643 * class.c (inflate_generic_type): Don't crash while trying to output a message
1644 on why we're aborting.
1646 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1648 * socket-io.c: DontLinger can take an int or a boolean too.
1650 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
1652 * gc.c: check for a null argument to SuppressFinalize () and
1653 ReRegisterForFinalize ().
1655 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1657 * loader.c (method_from_methodspec): Call into the verifier to check
1660 * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
1662 * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
1663 part of the internal API.
1665 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1667 * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
1670 * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
1672 * verify-internals.h: Export mono_verifier_verify_typespec_signature as
1673 part of the internal API.
1675 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1677 * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
1680 * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
1683 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1684 part of the internal API.
1686 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1688 * metadata-verify.c: Use is_valid_blob_object to verify blob validity
1689 when doing basic verification.
1691 This check must be done since the runtime peeks into signatures in much
1692 more places than it does decoding so it makes sense to ensure that all
1693 pointers to blob objects are well formed.
1695 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1697 * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
1698 Use proper overflow dectection. Fix usage of it.
1700 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1702 * loader.c (field_from_memberref): Call into the verifier to check
1705 * loader.c (mono_method_get_signature_full): Same.
1707 * loader.c (method_from_memberref): Same.
1709 * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
1711 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1712 part of the internal API.
1714 2009-06-25 Mark Probst <mark.probst@gmail.com>
1716 * threadpool.c (mono_thread_pool_add): If the domain is unloading
1717 or unloaded, still return an AsyncResult, but don't add it to the
1720 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1722 * threads.c: fix missing colon when DEBUG is defined.
1724 2009-06-25 Mark Probst <mark.probst@gmail.com>
1726 * threadpool.c: Don't add new calls to a threadpool if the domain
1727 of the call is unloading or unloaded. When dequeuing a job, null
1728 the reference in the queue.
1730 2009-06-25 Mark Probst <mark.probst@gmail.com>
1732 * sgen-gc.c (null_link_in_range): Add the dislink for the old
1733 generation if an object was moved.
1735 2009-06-25 Sylvain Dupont <duposyl@gmail.com>
1737 * cominterop.h cominterop.c marshal.c: Added support for marshalling out
1738 parameters of type SAFEARRAY[VARIANT].
1740 * reflection.c (encode_marshal_blob): Properly generate element type
1741 (SafeArraySubType marshal attribute option).
1743 Code is contributed under MIT/X11 license.
1745 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
1747 * reflection.c: in mono_method_clear_object () really ensure all the
1748 objects are removed.
1750 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1752 * loader.c (mono_method_signature): Call into the verifier to check
1753 the method signature.
1755 * metadata-verify.c (verify_method_table): Move signature verification
1756 to verify_method_table_full.
1758 * metadata-verify.c: Add mono_verifier_verify_method_signature.
1760 * verify-internals.h: Export mono_verifier_verify_method_signature as
1761 part of the internal API.
1763 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1765 * loader.c (mono_method_get_header): Call into the verifier to
1766 check the method header.
1768 * metadata-verify.c: Add mono_verifier_verify_method_header.
1770 * verify-internals.h: Export mono_verifier_verify_method_header as
1771 part of the internal API.
1773 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1775 * class.c (mono_class_find_enum_basetype): Call into the verifier to
1776 check the field signature. Replace an assert with an explicit check.
1778 * class.c (mono_class_setup_fields): Call into the verifier to check
1779 the field signature.
1781 * metadata-verify.c: Add mono_verifier_verify_field_signature.
1783 * verify-internals.h: Export mono_verifier_verify_field_signature as
1784 part of the internal API.
1786 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1788 * class.c (mono_class_find_enum_basetype): Simplify this function
1789 by moving code outside of the loop and not decoding static fields.
1791 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1793 * metadata-verify.c (verify_typedef_table): Check the extends
1794 token here. Move to here a flags check from verify_typedef_table_full.
1796 2009-06-24 Zoltan Varga <vargaz@gmail.com>
1798 * metadata-verify.c (is_valid_method_header): Fix a warning.
1800 * metadata-internals.h (MonoImage): Remove the unused
1801 static_rgctx_invoke_wrapper_cache.
1803 * image.c marshal.c: Ditto.
1805 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1807 * image.c (do_mono_image_load): Enable table data verification.
1809 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1811 * metadata-verify.c (is_valid_constant): Fix nullref check.
1813 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
1815 * metadata-verify.c (is_valid_constant): Fix string bounds check.
1817 2009-06-22 Mark Probst <mark.probst@gmail.com>
1819 * sgen-gc.c: Managed allocation with pthreads TLS.
1821 * threads.c, threads-types.h: Functions for the JIT to tell the
1822 runtime whether it supports the MONO_TLS opcode.
1824 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1826 * metadata-verify.c (verify_param_table): Fix a crash for assemblies
1829 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1831 * metadata-verify.c (is_valid_constant): Fix the string length check.
1832 Use safe overflow checking. Add decent error messages.
1834 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1836 * metadata-verify.c: Move remaininh blob checks to the offline
1839 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
1841 * metadata-verify.c: Move more blob checks to the offline verification
1844 2009-06-22 Bill Holmes <billholmes54@gmail.com>
1846 * object-internals.h : Adding interrupt_on_stop field.
1848 * threads.c (mono_thread_request_interruption) : On Windows exit the
1849 thread if interrupt_on_stop is set.
1851 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
1852 Removing old interrupt logic and setting the interrupt_on_stop for the
1853 thread when calling accept.
1855 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
1856 setting the interrupt_on_stop for the thread when calling accept.
1858 Contributed under MIT/X11 license.
1860 2009-06-20 Martin Baulig <martin@ximian.com>
1862 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
1864 2009-06-21 Zoltan Varga <vargaz@gmail.com>
1866 * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
1867 running in no-exec mode.
1869 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1871 * metadata-verify.c (verify_method_table): Move header
1872 checking to verify_method_table_full.
1874 * metata-verify.c (mono_verifier_verify_full_table_data):
1875 Call verify_method_table_full.
1877 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1879 * metadata-verify.c (verify_field_table): Move signature
1880 checking to verify_field_table_full.
1882 * metata-verify.c (mono_verifier_verify_full_table_data):
1883 Call verify_field_table_full.
1885 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1887 * metadata-verify.c (verify_typedef_table): Move remaining
1888 stuff to verify_typedef_table_full.
1890 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1892 * metadata-verify.c: Kill is_corlib from VerifyContext.
1893 It is only used by the offline mode.
1894 So we better remove it from the runtime path.
1896 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1898 * metadata-verify.c: Add new mono_verifier_verify_full_table_data
1899 function that perform the offline metadata verification steps.
1901 * metadata-verify.c (verify_typedef_table): Move some checks to
1902 verify_typedef_table_full and make it been called by new function
1903 mono_verifier_verify_full_table_data.
1905 * pedump.c: Call mono_verifier_verify_full_table_data.
1907 * verify-internals.h: Export mono_verifier_verify_full_table_data as
1908 part of the internal API.
1910 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1912 * metadata-verify.c (typedef_is_system_object): Fix System.Object
1915 * metadata-verify.c (verify_implmap_table): Fix implmap invalid
1916 flags bits. SupportLastError was confused as bit 7 instead of 6.
1918 * metadata-verify.c (verify_implmap_table): Fix import scope verification
1919 to check against the module ref table instead of module.
1921 * metadata-verify.c (verify_implmap_table): Fix corlib check.
1923 * pedump.c: Call mono_image_load_names.
1925 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
1927 * image.c: Extract mono_image_load_names from do_mono_image_load.
1929 * metadata-internals.h: Export mono_image_load_names as part of
1932 2009-06-19 Zoltan Varga <vargaz@gmail.com>
1934 * metadata.c (mono_metadata_cleanup): Free the generic method cache
1935 first, as it could reference data in the other caches.
1937 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
1939 * metadata-verify.c: Finished with method header verification.
1941 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
1943 * metadata-verify.c: Added more header verification code.
1944 Now only EH clauses are missing.
1946 2009-06-17 Zoltan Varga <vargaz@gmail.com>
1948 * marshal.c (get_runtime_invoke_type): Don't share primitive types
1951 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
1953 * metadata-verify.c: Initial method header verification.
1955 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
1957 * metadata-verify.c (verify_import_table): The IAT contents
1958 might end been patched by the windows DL when running with
1961 2009-06-15 Rodrigo Kumpera <rkumpera@novell.com>
1963 * class.c (mono_class_from_typeref): If the enclosing type is not
1964 found return null instead of crashing. Fixes #508487.
1966 2009-06-15 Atsushi Enomoto <atsushi@ximian.com>
1968 * normalization-tables.h : updated to the latest unicode charcter
1970 * appdomain.c : bump corlib version.
1972 2009-06-14 Zoltan Varga <vargaz@gmail.com>
1974 * class.c (mono_class_from_name): Fix support for assembly references
1975 in the EXPORTEDTYPE table. Fixes #511704.
1977 2009-06-13 Geoff Norton <gnorton@novell.com>
1979 * domain.c: Ensure that mono_domain_assembly_open actually opens the
1980 assembly in the target domain.
1982 2009-06-12 Robert Jordan <robertj@gmx.net>
1984 * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
1985 because "this" of the managed signature has become an
1986 ordinary parameter in the unmanaged signature.
1988 2009-06-12 Zoltan Varga <vargaz@gmail.com>
1990 * class-internals.h (struct _MonoGenericContainer): Add an 'image'
1991 field for owner-less generic containers.
1993 * reflection.c (mono_reflection_initialize_generic_parameter): Set the
1994 image field of the owner-less generic containers created here.
1996 * metadata.c (mono_metadata_load_generic_params): Ditto, the
1997 contain is ownerless until the caller sets its owner.
1999 * metadata.c (type_in_image): Handle owner-less generic containers
2002 2009-06-11 Zoltan Varga <vargaz@gmail.com>
2004 * image.c (mono_image_close): Support debug_assembly_unload for
2007 2009-06-11 Andrés G. Aragoneses <aaragoneses@novell.com>
2009 * class.c: Fix some typos in comments.
2011 2009-06-11 Zoltan Varga <vargaz@gmail.com>
2013 * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
2015 * threads.c (mono_thread_execute_interruption): Avoid creating the
2016 abort exception object while holding the synch_cs lock.
2018 2009-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2020 * metadata-verify.c: Verify basic cattr content.
2022 2009-06-10 Zoltan Varga <vargaz@gmail.com>
2024 * reflection.c (add_exported_type): Don't set the FORWARDER flag on
2027 * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
2028 support for nested types. Fixes #511704.
2030 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2032 * metadata-verify.c: Verify methodspec signatures.
2034 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2036 * metadata-verify.c: Verify typespec signatures.
2038 2009-06-09 Zoltan Varga <vargaz@gmail.com>
2040 * metadata.c (free_inflated_method): Call
2041 mono_marshal_free_inflated_wrappers (), which was missed earlier.
2043 2009-06-08 Miguel de Icaza <miguel@novell.com>
2045 * mono-config.c: Small change to report the PPC64/ILP32 model.
2047 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2049 * metadata-verify.c (parse_type): Check szarray.
2051 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2053 * metadata-verify.c (parse_type): Check fnptr.
2055 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2057 * metadata-verify.c (parse_type): Check generic instances.
2059 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2061 * metadata-verify.c (parse_type): Check array shape.
2063 2009-06-05 Robert Jordan <robertj@gmx.net>
2065 * class.c (mono_class_create_from_typedef): Check only for
2066 mscorlib's System.Array.
2068 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2070 * metadata-verify.c (parse_type): Check pointer, class/valuetype
2073 * metadata-verify.c (parse_field): Check the signature.
2075 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2077 * metadata-verify.c: Implement locals signature check.
2079 2009-06-04 Marek Safar <marek.safar@gmail.com>
2081 * domain.c: Add .NET 4.0 Beta 1 version.
2083 2009-06-04 Bill Holmes <billholmes54@gmail.com>
2085 * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
2086 For QueryInterface on CCWs consider the base class
2089 Code is contributed under MIT/X11 license.
2091 2009-06-04 Zoltan Varga <vargaz@gmail.com>
2093 * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
2095 * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
2098 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
2099 adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
2101 * generic-sharing.c (inflate_other_data): Ditto.
2103 2009-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2105 * metadata-verify.c: Implement property signature check.
2107 2009-06-04 Mark Probst <mark.probst@gmail.com>
2109 * sgen-gc.h: Register saving support for PPC.
2111 2009-06-04 Mark Probst <mark.probst@gmail.com>
2113 * sgen-gc.c: Fixed a pthread TLS screwup.
2115 2009-06-04 Mark Probst <mark.probst@gmail.com>
2117 * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
2120 2009-06-04 Mark Probst <mark.probst@gmail.com>
2122 * sgen-gc.c: Disable TLA and managed allocation if the __thread
2123 keyword is not supported.
2125 2009-06-04 Zoltan Varga <vargaz@gmail.com>
2127 * marshal.c metadata.c: Applied patch from Ulrich Weigand
2128 <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
2129 the inflated method is freed. Fixes #508389.
2131 The code is contributed under the MIT/X11 license.
2133 2009-06-03 Zoltan Varga <vargaz@gmail.com>
2135 * marshal.c (get_wrapper_target_class): New helper function.
2136 (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
2137 the <Module> class of the image. Fixes #509049.
2139 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2141 * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
2142 Check if the thread was interrupted and proccess it straight away.
2143 Makes abortion much more responsive.
2145 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2147 * threads.c (mono_thread_execute_interruption): Use atomic cas with
2148 MonoThread::interruption_requested to match it's counterpart.
2150 Fixes a hang in abort-stress-1 on a 2 core x86.
2152 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
2155 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2157 Change MonoImage::name_cache to be protected by the image lock
2158 instead of the loader lock.
2160 * appdomain.c (deregister_reflection_info_roots): Protect access
2163 * class.c (mono_image_init_name_cache): Change from the loader lock
2164 to the image lock. Check if the cache wasn't already created.
2166 * class.c: Change from the loader to the image lock.
2168 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
2169 the code to hold the image lock while iterating over name_cache and
2170 not go into mono_array_new holding it.
2172 * metadata-internals.h: Add a comment about this change.
2174 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2176 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
2177 Under the 2.0 profile raise the loader error.
2181 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2183 * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
2184 of ldind opcode for generic instances so we don't fail for direct wrappers.
2185 This only affect direct calls.
2187 2009-05-31 Zoltan Varga <vargaz@gmail.com>
2189 * reflection.c (create_dynamic_mono_image): Fix warnings.
2191 * generic-sharing.c (other_info_equal): Ditto.
2193 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2195 * metadata-verify.c: Implement field signature check.
2197 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2199 * metadata-verify.c: Implement standalone signature check.
2201 2009-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2203 * metadata-verify.c: Implement methodref signature check.
2205 2009-05-28 Zoltan Varga <vargaz@gmail.com>
2207 * object-internals.h (MonoRuntimeCallbacks): New structure containing
2208 callbacks supplied by the runtime.
2210 * object.c (mono_install_callbacks): New internal function to install
2213 * object.c (mono_create_ftnptr): Move the implementation of this to
2216 * object.c (mono_get_addr_from_ftnptr): Ditto.
2218 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2220 * metadata-verify.c (parse_return_type): Proper byref check.
2221 * metadata-verify.c (is_valid_method_signature): Check for zero arity
2222 generic signatures and method params.
2224 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2226 * metadata-verify.c (decode_signature_header): Fix bounds check.
2228 * metadata-verify.c (parse_custom_mods): Check custom mods.
2230 * metadata-verify.c (parse_type): Do initial basic verification
2233 * metadata-verify.c (is_valid_method_signature): Parse the generic
2236 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
2238 * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
2239 discarded based on their most specific definition so we set the method_slots
2240 array before checking if the method is acceptable or not.
2244 2009-05-26 Mark Probst <mark.probst@gmail.com>
2246 * icall.c: Free the old array when resizing a mono_ptr_array.
2248 2009-05-26 Mark Probst <mark.probst@gmail.com>
2250 * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
2251 for the hashes whose keys are managed objects.
2253 2009-05-26 Mark Probst <mark.probst@gmail.com>
2255 * object-internals.h, threads.c: Set the execution context on
2256 thread start here, not in corlib.
2258 * appdomain.c: Bump corlib version.
2260 2009-05-27 Martin Baulig <martin@ximian.com>
2262 * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
2263 if `_mono_debug_using_mono_debugger' is set to make things work
2264 properly when embedding Mono.
2266 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2268 * class.c (mono_class_setup_fields): Don't mark simd types as having
2269 16 bytes alignment as the whole runtime doesn't support.
2271 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
2273 * metadata-verify.c (safe_read): Use endian safe read macros.
2275 2009-05-25 Zoltan Varga <vargaz@gmail.com>
2277 * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
2278 it is read-only when using full aot.
2280 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2282 * metadata-verify.c (is_valid_method_signature): Verify parts
2283 of the return type. Provide an error message in case of failure.
2285 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2287 * metadata-verify.c (is_valid_method_signature): Verify the call conv.
2289 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
2291 * metadata-verify.c: Include the size prefix in the bounds check.
2293 2009-05-22 Miguel de Icaza <miguel@novell.com>
2295 * icall.c: Remove warnings.
2297 * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
2298 prevent auto-detection based on GCC defines.
2302 * metadata-verify.c: Do not include signal.h
2304 * generic-sharing.c, marshal.c: Add returns to avoid some warning
2305 messages. Not sure why the g_assert_not_reached is not enough to
2309 * appdomain.c: Remove code that is not used when
2310 DISABLE_SHADOW_COPY is set.
2312 * image.c: use g_getenv
2314 2009-05-21 Miguel de Icaza <miguel@novell.com>
2316 * reflection.c: Remove code that it not used with
2317 DISABLE_REFLECTION_EMIT is defined.
2319 2009-05-21 Zoltan Varga <vargaz@gmail.com>
2321 * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
2324 2009-05-20 Miguel de Icaza <miguel@novell.com>
2327 (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
2328 the ifdef here and instead put that on io-layer
2330 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2332 * metadata-verify.c: Verify the generic param constraint table.
2334 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2336 * metadata-verify.c (verify_generic_param_table): Fix
2337 thinko on the valid flags bits for generic params.
2339 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2341 * metadata-verify.c: Verify the methodspec table.
2343 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2345 * metadata-verify.c: Verify the generic param table.
2347 2009-05-19 Mark Probst <mark.probst@gmail.com>
2349 * sgen-gc.c: Store and use the count with REMSET_VTYPE.
2351 2009-05-19 Mark Probst <mark.probst@gmail.com>
2353 * sgen-gc.c: Use generation enum more consistently and use the
2354 correct generation in mono_gc_register_for_finalization().
2356 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
2358 * metadata-verify.c: Verify the nested class table.
2360 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
2362 * metadata-verify.c: Verify the manifest resource table.
2364 2009-05-17 Zoltan Varga <vargaz@gmail.com>
2366 * debug-helpers.c (dis_one): Add little-endian support for ldstr.
2368 2009-05-16 Zoltan Varga <vargaz@gmail.com>
2370 * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
2371 wrappers, this is now done in the JIT.
2373 * class.c (mono_set_generic_sharing_supported): New internal function.
2374 (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
2376 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2378 * metadata-verify.c: Verify the exported type table.
2380 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2382 * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
2384 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2386 * metadata-verify.c: Verify the file table.
2388 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2390 * metadata-verify.c (verify_assembly_table): Fix an error message.
2392 * metadata-verify.c: Verify the assemblyref table.
2394 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
2396 * metadata-verify.c (verify_assembly_table): Fix the valid
2397 bits mask for flags.
2399 2009-05-15 Zoltan Varga <vargaz@gmail.com>
2401 * debug-helpers.c (mono_method_full_name): Print generic parameters of
2402 generic methods as well.
2404 2009-05-15 Geoff Norton <gnorton@novell.com>
2406 * gc.c: MachO/Darwin supports and uses semaphores fine for this
2407 use-case and is significantly more performant than the wapi layer.
2409 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2411 * metadata-verify.c: Verify the assembly table.
2413 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2415 * metadata-verify.c: Fix rows limit check.
2417 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2419 * metadata-verify.c: Verify the fieldrva table.
2421 2009-05-13 Mark Probst <mark.probst@gmail.com>
2423 * sgen.c: Speed up weak links and finalizers by grouping them by
2426 2009-05-13 Mark Probst <mark.probst@gmail.com>
2428 * marshal.c (delegate_hash_table_add): When overwriting an entry,
2429 free the old GCHandle (only applies to SGen).
2431 2009-05-13 Zoltan Varga <vargaz@gmail.com>
2433 * loader.c (mono_get_method_from_token): Avoid the expensive call to
2434 mono_metadata_load_generic_params () for non-generic methods.
2436 2009-05-12 Mark Probst <mark.probst@gmail.com>
2438 * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
2439 New function for returning a monitor's weak link if it has one.
2441 * sgen-gc.c: Remove an object's monitor's weak link (if it has
2442 one) when clearing a domain. These can still be around because
2443 the object might not have been collected.
2445 2009-05-12 Zoltan Varga <vargaz@gmail.com>
2447 * gc.c: Fix a warning.
2449 2009-05-12 Kornél Pál <kornelpal@gmail.com>
2451 * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
2452 prevous wait that resulted in a deadlock on Windows when initializing
2453 the runtime form DllMain. Also results in improved startup time.
2454 (finalizer_thread): Get rid of thread_started_event.
2455 * threads.c, threads-types.h (mono_thread_create_internal): Return the
2456 resulting MonoThread.
2458 Contributed under MIT/X11 license.
2460 2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
2462 * metadata-verify.c: Verify the implmap table.
2463 Don't require that #US and #Strings be present.
2465 2009-05-11 Sebastien Pouliot <sebastien@ximian.com>
2467 * security-core-clr.c: Delegate checks are done at creation time,
2468 not a invocation time. Fix exception for Telerik Silverlight demo
2470 2009-05-11 Mark Probst <mark.probst@gmail.com>
2472 * sgen-gc.c (need_remove_object_for_domain): Remove the special
2473 case for the Thread class.
2475 * threads.c: Do clean-up of abort exception/state in
2476 thread_cleanup() instead of Thread.free_internal(). Also clean up
2477 current_appcontext. The reason we have to do that is because
2478 those references might point into another domain and if that
2479 domain is unloaded before the thread is finalized, they point to
2482 2009-05-10 Andreas Faerber <andreas.faerber@web.de>
2484 * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
2487 Contributed unter MIT/X11 license.
2489 2009-05-09 Miguel de Icaza <miguel@novell.com>
2491 * verify.c, metadata-verifier.c: Add support for disabling the
2492 verifier in some builds.
2494 [ Sorry, my previous commit accidentally commited some work in
2497 2009-05-08 Zoltan Varga <vargaz@gmail.com>
2499 * class.c (mono_class_setup_fields): Set class->field.first for
2502 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
2504 * metadata-verify.c: Verify the typespec table.
2506 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
2508 * metadata-verify.c: Verify the module table.
2510 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2512 * metadata-verify.c: Verify the methodimpl table.
2514 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2516 * metadata-verify.c: Verify the property table.
2518 2009-05-06 Zoltan Varga <vargaz@gmail.com>
2520 * debug-helpers.c (mono_method_desc_match): Add support for generic
2523 2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
2525 * metadata-verify.c: Verify the propertymap table.
2527 2009-05-04 Rodrigo Kumpera <rkumpera@novell.com>
2529 * metadata-verify.c: Verify the event table.
2531 * metadata-verify.c (search_sorted_table): Fix offset
2534 2009-05-02 Zoltan Varga <vargaz@gmail.com>
2536 * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
2538 2009-05-01 Mark Probst <mark.probst@gmail.com>
2540 * gc.c (mono_gc_run_finalize): Don't set the domain too late,
2541 because mono_delegate_free_ftnptr() needs it.
2543 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2545 * metadata-verify.c: Verify the eventmap table.
2547 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2549 * metadata-verify.c: Verify the standalonesig table.
2551 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2553 * metadata-verify.c: Verify the field layout table.
2555 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2557 * class.c (mono_type_get_name_recurse): Don't crash
2558 for ownerless generic params.
2560 * debug-helpers.c (mono_type_get_desc): Correct the format
2561 for ownerless generic params.
2563 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2565 * metadata-verify.c: Verify the class layout table.
2567 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2569 * metadata-verify.c: Verify the decl security table.
2571 2009-04-30 Mark Probst <mark.probst@gmail.com>
2573 * domain.c (mono_domain_set_internal_with_options): Don't do
2574 anything if the old domain is the same as the old one. Fixes
2577 2009-04-30 Mark Probst <mark.probst@gmail.com>
2579 * appdomain.c: Deregister the reflection_info roots when unloading
2582 * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
2583 memory allocated by a domain and frees its disappearing links.
2585 * boehm-gc.c, null-gc.c: Empty implementation of
2586 mono_gc_clear_domain().
2588 2009-04-30 Mark Probst <mark.probst@gmail.com>
2590 * appdomain.c (clear_cached_vtable): Free the static fields memory
2593 2009-04-30 Mark Probst <mark.probst@gmail.com>
2595 * gc.c: Set the correct domain when invoking finalizers.
2597 * appdomain.c: Set the correct domain when creating threads.
2599 2009-04-30 Mark Probst <mark.probst@gmail.com>
2601 * sgen-gc.c: Fix skip size for vectors.
2603 2009-05-03 Martin Baulig <martin@ximian.com>
2605 * mono-debug-debugger.c
2606 (mono_debugger_check_breakpoints): Check class init handlers even
2607 if we don't have any method load handers.
2609 2009-04-30 Zoltan Varga <vargaz@gmail.com>
2611 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
2612 returning refonly assemblies if refonly is FALSE. Fixes #499013.
2614 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
2616 * metadata-verify.c: Verify the field marshal table.
2618 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
2620 * metadata-verify.c: Verify the custom attribute table.
2622 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2624 * metadata-verify.c: Verify the constant table.
2626 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2628 * metadata-verify.c: Verify the memberef table.
2630 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2632 * metadata-verify.c (get_coded_index_token): Remove
2635 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2637 * metadata-verify.c: Verify the interfaceimpl table.
2639 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
2641 * verify.c: Improve error message.
2643 * debug-helpers.c (mono_type_get_desc): Harden the code that
2644 deals with VAR and MVAR.
2646 2009-04-28 Zoltan Varga <vargaz@gmail.com>
2648 * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
2651 2009-04-23 Tom Hindle <tom_hindle@sil.org>
2653 * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
2654 changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
2656 2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
2658 * security-core-clr.c: Avoid redundant checks for platform code,
2659 e.g. check for method and for class (very common) and check
2660 for class and outer class (less common)...
2662 2009-04-27 Zoltan Varga <vargaz@gmail.com>
2664 * reflection.c: Avoid returning random cattrs for synthetic methods.
2667 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2669 * assembly.c: assemblies in the GAC should never be shadow-copied.
2671 2009-04-26 Mark Probst <mark.probst@gmail.com>
2673 * domain.c, domain-internals.h: Disable
2674 track_resurrection_{objects,handles}_hash in MonoDomain if using
2677 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2679 * metadata-verify.c: Verify the param table.
2681 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2683 * metadata-verify.c (verify_typedef_table): Range check FieldList and
2686 * metadata-verify.c (verify_method_table): Proper check the ParamList
2689 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2691 * metadata-verify.c (verify_method_table): Check for runtime
2692 implemented functions such as delegate .ctors. Remove spurious
2695 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2697 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
2699 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2701 Don't allocate MonoGenericInfo for ownerless generic params.
2702 * class-internals.h (MonoGenericParam::info): Move field to ...
2703 (MonoGenericParamFull): ... this. New struct.
2704 (MonoGenericContainer::type_params): Change type to
2705 MonoGenericParamFull.
2706 (MonoGenericParam, MonoGenericContainer): Update accessors.
2707 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
2708 'info' field for ownerless generic param.
2709 (mono_metadata_load_generic_params): Update to changes.
2710 * reflection.c (mono_reflection_create_generic_class): Likewise.
2711 (reflection_methodbuilder_to_mono_method): Likewise.
2712 (mono_reflection_initialize_generic_parameter): Likewise.
2714 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2716 Don't use MonoGenericParamInfo for ownerless generic params.
2717 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
2718 use ParamInfo class at all.
2719 (mono_class_from_generic_parameter): Use them.
2720 (make_generic_param_class): Fix a couple of instances where 'pinfo
2721 == NULL' wasn't handle.
2723 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2725 * class.c (make_generic_param_class): Carve out of ...
2726 (mono_class_from_generic_parameter): ... here.
2728 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
2730 Simplify mono_class_from_generic_parameter
2731 * class-internals.h (MonoGenericParamInfo::token): New field.
2732 * metadata.c (mono_metadata_load_generic_params): Initialize it
2734 * class.c (mono_class_from_generic_parameter): Use it instead of
2735 searching through metadata.
2737 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2739 * metadata-verify.c: Add verification of the method table.
2741 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2743 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
2744 Delegate::Invoke optimization.
2746 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2748 * appdomain.c (mono_domain_create_appdomain_internal): Free the
2749 string returned by get_shadow_assembly_location_base.
2751 * appdomain.c (get_shadow_assembly_location_base): Add a comment
2752 about caller's ownership.
2754 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2756 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
2757 reflection memory on domain unload.
2759 * domain.c (mono_domain_free): Don't free refobject_hash, let the
2760 reflection cleanup code do it.
2762 * domain-internals.h: Add mono_reflection_cleanup_domain.
2764 This fixes a memory leak for managed mirrors of reflection objects
2767 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
2769 * metadata-verify.c: Implement more verification of the field table.
2771 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
2773 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
2774 doesn't try to parse the input assembly, which can be broken.
2776 2009-04-23 Mark Probst <mark.probst@gmail.com>
2778 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
2779 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
2780 by using the lowest bit in the link to store whether the link is
2781 tracked. Move the track_resurrection hashes into boehm-gc.c.
2783 2009-04-22 Miguel de Icaza <miguel@novell.com>
2785 * Makefile.am: Split the console support in platform specific code
2786 and put together a framework for making this easy in the future so
2787 that we can start splitting code instead of having a mess of PLATFORM_WIN32
2789 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2791 * pedump.c: Fix a warning.
2793 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2795 * verify.c (mono_delegate_type_equal): Compare valuetypes using
2796 mono_class_from_mono_type to avoid bad interactions with the dual representation
2797 of the generic type definition.
2799 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
2801 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
2802 get the MonoClass for the call context type as it might be a generic
2807 2009-04-21 Mark Probst <mark.probst@gmail.com>
2809 * object-internals.h: The Thread object has no execution_context
2812 * threads.c, threadpool.c, threads-types.h: Accessor functions for
2813 the execution context.
2815 * appdomain.c: Bump corlib version.
2817 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2819 * verify.c (do_newobj): Improve error message.
2821 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2823 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
2824 is nested in the filter block.
2826 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
2827 block is not fully nested.
2831 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2833 * verify.c (verify_type_compatibility_full): Compare MonoClass and
2834 not MonoType to check for equality of valuetypes as the generic type
2835 definition allows for two different encodings: the generic type definition
2836 class or a generic instance over the GTD arguments.
2840 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2842 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
2844 * verify.c (do_initobj): Improve error message.
2846 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
2848 * metadata-verify.c: Enable pe verification as the issue with #496453
2849 is that the authenticode data directory have a different unspecified
2850 format. Ignore it for now.
2852 * pedump.c: Run the metadata verifier together with the IL verifier.
2856 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
2858 * metadata-verify.c: Temporarily disable pe verification due to #496453.
2860 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2862 * class.c (can_access_type): Check visibility against
2863 the element type for pointers and arrays.
2867 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2869 * metadata-verify.c: Fix cli and table verification to use information
2870 from the MonoImage. A lot of duplicated code got killed.
2872 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
2875 This patch starts to integrate the metadata verifier with the runtime code.
2877 This patch causes major regression in functionality for the metadata verifier
2878 as cli and table verification are disabled since they require to be ported to
2879 use MonoImage information.
2881 * image.c (do_mono_image_load): Split the code in this function
2882 into mono_image_load_pe_data and mono_image_load_cli_data.
2883 Add care_about_pecoff parameter to not load pecoff data.
2884 Call into the metadata verifier for pecoff and cli verification.
2886 * image.c (mono_image_open_raw): New function that doesn't perform
2887 any parsing of the image contents.
2889 The reason for the 3 new functions is to give pedump better control
2890 into the interaction with the verifier.
2892 * metadata-internals.h: Add new functions from image.c as part of the
2895 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
2896 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
2897 to make those functions work together with the runtime.
2899 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
2900 true if the image needs to be verified.
2902 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
2904 * pedump.c: Use new metadata verifier API.
2906 2009-04-19 Zoltan Varga <vargaz@gmail.com>
2908 * object.c (mono_install_vtable_trampoline): Make this receive a
2909 trampoline creation function instead of trampoline, allowing the JIT
2910 to use a different trampoline for each vtable.
2912 2009-04-18 Mark Probst <mark.probst@gmail.com>
2914 * object.c (mono_raise_exception): Don't reset the thread abort
2915 exception state here.
2917 2009-04-18 Mark Probst <mark.probst@gmail.com>
2919 * icall-def.h: New icall for getting the thread abort exception
2922 * object.c, thread.c, object-internals.h: A thread's abort
2923 exception state is now a GC handle. To get the object it stands
2924 for, we must move it into the current app domain, if it's
2925 different than the one where it originated from.
2927 * appdomain.c: Bump corlib version.
2929 * domain.c, domain-internals.h: New function for setting the
2930 domain and migrate the thread abort exception or not.
2932 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2934 * metadata-verify.c: Add initial verification of the
2937 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2939 * metadata-verify.c: Add a macro to conditionally enable
2940 dumping of verification information. Add make_coded_token
2941 and search_sorted_table to enable search sorted tables
2942 by a given coded token.
2944 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2946 * metadata-verify.c: Add array mapping from table index
2947 to description offset. Add get_col_offset and get_col_size
2950 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2952 * metadata-verify.c: Add remaining table descriptions offsets.
2953 Add remaining coded index descriptions.
2955 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2957 * metadata-verify.c: Fixed constant table description.
2958 Fixed calculation of HasCustomAttribute coded index size.
2959 Fixed calculation of size for many table indexes.
2961 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2963 * pedump.c (dump_metadata): Dump table offset instead
2964 of useless pointer in memory.
2966 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
2968 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
2970 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2972 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
2973 a missing of for interface types.
2975 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2977 * metadata-verify.c (verify_pe_optional_header): Add comment of why
2978 the code is commented.
2980 * metadata-verify.c (verify_resources_table): Remove spurious printf
2981 and don't fail if there are unmanaged resources. Gmcs generates a useless
2982 one for all assemblies - I bet it's some MS compatibility junk.
2984 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2986 * metadata-verify.c (verify_typedef_table): Verify the extends field.
2988 * metadata-verify.c (mono_image_verify): Add a is_corlib.
2990 * verify-internals.h: Same.
2992 * pedump.c: Fix for mono_image_verify new signature.
2994 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
2996 * metadata-verify.c (verify_typedef_table): Verify for some invalid
2999 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3001 * metadata-verify.c (verify_module_table): Ignore the generation field.
3003 2009-04-15 Martin Baulig <martin@ximian.com>
3005 * debug-mono-symfile.c
3006 (mono_debug_symfile_lookup_location): Don't print a warning for
3007 unknown extended opcodes if they're within 0x40 and 0x7f.
3009 2009-04-15 Zoltan Varga <vargaz@gmail.com>
3011 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
3012 invoke signatures returning an enum. Fixes #494847.
3014 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3016 * metadata-verify.c: Initial code to verify the typedef table.
3018 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3020 * verify.c (mono_method_verify): Don't fail if an unconditional branch
3021 with non empty stack happens before the beginning of a try block.
3025 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3027 * metadata-verify.c: Verify typename and typenamespace fields of
3030 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
3032 * metadata-verify.c: Initial code to verify the typeref table.
3034 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
3036 * verify.c (verify_delegate_compatibility): Fix error message.
3038 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
3040 * security-core-clr.c: Fix typo
3042 2009-04-14 Zoltan Varga <vargaz@gmail.com>
3044 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
3045 a MonoGHashTable to keep its values alive.
3046 (emit_marshal_boolean): Fix a warning.
3048 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
3050 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
3051 not have any interface configured for IPv4/IPv6.
3053 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
3055 * assembly.c: fix typo in error message.
3057 2009-04-14 Zoltan Varga <vargaz@gmail.com>
3059 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
3060 allocating the location holding the this argument to prevent
3061 'too many root sets' errors.
3063 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
3064 to mark fields as special static.
3065 (mono_field_static_get_value): Handle special static fields.
3066 (mono_field_static_set_value): Ditto.
3068 * class-internals.h (struct _MonoClassField): Document this.
3070 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3072 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
3073 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
3074 case. This will handle when managed code returns null to native code.
3076 Code is contributed under MIT/X11 license.
3078 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3080 * object.c (build_imt_slots): Changing a free to a g_free to match
3081 the g_malloc0 in add_imt_builder_entry that allocated this memory.
3083 Code is contributed under MIT/X11 license.
3085 2009-04-13 Bill Holmes <billholmes54@gmail.com>
3087 * marshal.c (emit_marshal_boolean): Adding code to ensure that
3088 the correct TRUE value is passed through the marshaling layer.
3090 Code is contributed under MIT/X11 license.
3092 2009-04-13 Zoltan Varga <vargaz@gmail.com>
3094 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
3095 correctly. Fixes #492330.
3097 * marshal.c: Fix the embedding of object pointers into JITted code in
3098 the native-to-managed wrappers by allocating some GC tracked memory, and
3099 embedding the address of that.
3101 2009-04-11 Zoltan Varga <vargaz@gmail.com>
3103 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
3104 pointers into the vtable.
3106 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
3108 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
3110 * verify.c (verify_ldftn_delegate): Improve error message.
3112 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
3114 * reflection.c (my_mono_class_from_mono_type): Remove.
3116 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
3118 Prepare to reduce memory usage of owner-less generic parameters (1/n)
3119 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
3120 and constraints fields into ...
3121 (MonoGenericParamInfo): ... this.
3122 (mono_generic_param_info, mono_generic_container_get_param_info):
3124 * class.c, debug-helpers.c, icall.c: Update to changes.
3125 * metadata.c, reflection.c, verify.c: Likewise.
3127 2009-04-09 Zoltan Varga <vargaz@gmail.com>
3129 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
3131 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
3133 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
3134 booleans with sbytes.
3136 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3138 * class.c (can_access_instantiation): Verify accesibility of element types
3139 for arrays and pointers.
3141 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
3143 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
3147 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3149 * verify.c (do_invoke_method): Improve error messages.
3151 2009-04-08 Bill Holmes <billholmes54@gmail.com>
3153 * verify.c: Fixing the MSVC build.
3155 Code is contributed under MIT/X11 license.
3157 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
3159 * security-core-clr.c: Simplify get_reflection_caller not to call
3160 mono_method_get_last_managed (another stack walk) and adjust the
3161 callers to handle a (should not happen) NULL return value.
3163 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3165 Add accessors to some MonoGenericParam fields
3166 * class-internals.h (mono_generic_param_owner): New accessor.
3167 (mono_generic_param_num): Likewise.
3168 (mono_type_get_generic_param_owner): New helper.
3169 (mono_type_get_generic_param_num): New helper.
3170 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
3172 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3174 * class-internals.h (mono_generic_container_get_param): New wrapper.
3175 * class.c, icall.c, metadata.c, verify.c: Use it.
3177 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
3180 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
3181 the standard case/loop. In particular, don't complain about
3182 references to generic type definitions.
3184 2009-04-07 Zoltan Varga <vargaz@gmail.com>
3186 * debug-helpers.c (dis_one): Decode string arguments.
3188 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3190 * pedump.c (dump_verify_info): Dump type name correctly.
3192 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3194 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
3195 are larger than code size.
3197 This can happen in valid code if the try/catch block is not followed by any instruction
3198 and do a backward branch on the leave instruction.
3202 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
3204 * security-core-clr.c: Fix typo while comparing second method names
3205 in can_avoid_corlib_reflection_delegate_optimization
3207 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
3209 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
3213 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
3215 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
3216 a MVAR using a class context.
3220 2009-04-06 Zoltan Varga <vargaz@gmail.com>
3222 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
3224 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
3226 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
3227 functions supplied by the JIT for the SGEN GC.
3229 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
3231 2009-04-06 Massimiliano Mantione <massi@ximian.com>
3233 monitor.c (mono_monitor_try_enter_internal):
3234 Added calls to profile monitor contentions.
3235 Also duplicated a small piece of code (the "get the monitor" logic)
3236 from the fast path to the slow path, and changed the relevant goto
3237 statements, so that monitor acquisition events can be emitted from the
3238 slow path (this is by Paolo Molaro).
3240 2009-04-06 Massimiliano Mantione <massi@ximian.com>
3242 * profiler.c, profiler.h, profiler-private.h:
3243 Added support for profiling monitor contentions.
3245 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
3247 * metadata-verify.c: Verify the modules table.
3249 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
3251 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
3252 using the context of the method been verifier and not of the method been called.
3254 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
3255 safely inflate generic types.
3257 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
3259 * security-core-clr.c: Change the strategy for checking the
3260 "reflection using delegates optimization" to avoid unneeded
3261 attributes in multiple class libraries.
3263 2009-04-02 Mark Probst <mark.probst@gmail.com>
3265 * sgen-gc.c: Remove object element in the disappearing link struct
3266 by storing the object pointer in the link.
3268 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3270 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
3272 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3274 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
3276 * verify.c (mono_method_verify): Do proper bounds checking of exception
3279 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
3281 * loader.c (mono_field_from_token): Don't crash if the field parent could
3284 2009-03-31 Mark Probst <mark.probst@gmail.com>
3286 * sgen-gc.c: Execute critical finalizers after ordinary
3289 * class-internals.h, domain.c: Add CriticalFinalizerObject to
3292 2009-03-31 Jb Evain <jbevain@novell.com>
3294 * verify.c (do_ldstr): don't check if a string is in the user strings
3295 heap if the current image is dynamic.
3297 2009-03-31 Mark Probst <mark.probst@gmail.com>
3299 * sgen-gc.c: Wait until the last finalizer has executed when
3300 returning from WaitForPendingFinalizers.
3302 2009-03-31 Martin Baulig <martin@ximian.com>
3304 * mono-debug-debugger.h (MonoDebuggerEvent): Add
3305 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
3306 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
3307 (mono_debugger_event_create_appdomain): New function.
3308 (mono_debugger_event_unload_appdomain): New function.
3310 * appdomain.c (mono_domain_create_appdomain_internal): Call
3311 mono_debugger_event_create_appdomain().
3313 2009-03-31 Martin Baulig <martin@ximian.com>
3315 * mono-debug-debugger.c
3316 (mono_debugger_register_class_init_callback): Also register the
3317 class init callback if the class is already initialized to make
3318 things work with shadow copied assemblies.
3320 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
3322 * security-core-clr.c
3323 (mono_security_core_clr_ensure_reflection_access_field): Let
3324 critical code access the field (just like we do for methods). Use
3325 check_field_access helper.
3326 (mono_security_core_clr_ensure_reflection_access_method): Use
3327 check_field_access helper.
3329 2009-03-31 Mark Probst <mark.probst@gmail.com>
3331 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
3332 call the run-finalize function directly.
3334 * gc.c, gc-internal.h: Make run_finalize() non-static.
3336 2009-03-31 Mark Probst <mark.probst@gmail.com>
3338 * sgen-gc.c: Use a separate struct for disappearing links.
3340 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
3342 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
3343 * MaxIOVectorLength enabled, just ignore them.
3346 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
3348 * metadata-verify.c: Fix eglib build.
3350 2009-03-30 Zoltan Varga <vargaz@gmail.com>
3352 * threads-types.h: Fix the win32 build.
3354 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
3356 * class.c: move coreclr inheritance/override checks to
3358 * security-core.clr.c|h: add code from class.c with additional
3359 documentation. Fix override check when the method is not critical.
3361 2009-03-28 Zoltan Varga <vargaz@gmail.com>
3363 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
3364 (match_class): Ditto.
3366 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
3368 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
3370 * metadata-verify.c: Implement table layout row size calculation. Verify
3371 the total size of the tables.
3373 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
3375 * metadata-verify.c: Verify heap sizes and size to decode row counts.
3377 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
3380 * console-io.[ch]: added new mono_console_init() to make sure that
3381 file descriptors 0, 1 and 2 are opened.
3384 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
3386 * appdomain.h: Export a new callback type and a new function to
3387 set this callback. This allow a mono host to provide it's own
3388 definition for "platform code".
3389 * metadata-internals.h: Add a core_clr_platform_code flag on
3390 _MonoImage to (cache and) know if it is representing platform
3392 * image.c (do_mono_image_open): Set core_clr_platform_code flag
3393 on platform code images.
3394 * security-core-clr.c|h
3395 (mono_security_set_core_clr_platform_callback): Allow the host
3396 to provide it's own platform check definition.
3397 (mono_security_core_clr_determine_platform_image): Detect if an
3398 image is platform code (using the specified callback).
3399 (mono_security_core_clr_is_platform_image): Return cached value
3402 2009-03-27 Zoltan Varga <vargaz@gmail.com>
3404 * threads.c (mono_create_thread): New helper function to wrap CreateThread
3405 which has different parameter types for the 'tid' argument in windows and
3408 * appdomain.c attach.c threads.c: Use the new helper.
3410 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
3412 * metadata-verify.c: Verify valid table bits.
3414 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
3416 * metadata-verify.c (verify_metadata_header): Store size in the size field.
3418 * metadata-verify.c: Add initial table schema verification.
3420 2009-03-26 Zoltan Varga <vargaz@gmail.com>
3422 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
3423 obtain the refclass argument needed by mono_param_get_objects (). Fixes
3426 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
3428 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
3430 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
3432 * security-core-clr.c: Add/update documentation
3434 2009-03-26 Zoltan Varga <vargaz@gmail.com>
3436 * marshal.c (emit_marshal_object): Generate code to throw an exception
3437 instead of throwing it. Fixes #488670.
3439 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
3441 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
3442 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
3443 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
3444 and add a call to mono_security_core_clr_ensure_delegate_creation
3445 to do the extra checks required by CoreCLR.
3446 * security-core-clr.c|h: Add function to check delegate creation,
3447 both in the binding and accessibility, under CoreCLR.
3449 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
3451 * reflection.c (mono_reflection_create_dynamic_method): when
3452 coreclr is enabled make sure that every resolved object are
3453 checked (e.g. field and method access).
3454 * security-core-clr.c|h: Add function to check objects resolved
3455 when a dynamic method is created.
3457 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3459 * metadata-verify.c: Cache directory rva translations.
3461 * metadata-verify.c: Add cli-header and streams verification.
3463 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3465 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
3466 the wrong offset (8 instead of 6).
3468 2009-03-23 Zoltan Varga <vargaz@gmail.com>
3470 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
3471 methods, return the native function address itself. Fixes
3474 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
3476 * console-io.c: some of the values for control characters might not be
3479 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
3481 * exception.c|h: Add helpers to create [Field|Method]AccessException
3482 * icall.c: Add required coreclr check calls for field reflection.
3483 Move the existing (method) check logic into security-core-clr.c
3484 * security-core-clr.c: Add functions to check if the access of a
3485 field or method is allowed when reflecting under coreclr. This is
3486 mostly done using a stack walk to find the "real" caller: i.e. the
3487 code that is calling the reflection
3489 2009-03-20 Zoltan Varga <vargaz@gmail.com>
3491 * gc-internal.h: Change location of gc_wrapper.h
3493 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
3495 * class.c: Simplification to coreclr checks for overrides that
3496 makes it easier to set breakpoints.
3498 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
3500 * security-core-clr.c|h: (mono_security_core_clr_class_level,
3501 mono_security_core_clr_method_level): Avoid potential
3502 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
3503 user/application code) and make it easier to set breakpoints
3505 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3507 * metadata-verify.c: Reject cli header tables that mono don't handle.
3509 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3511 * pedump.c: Fix CLI header dumping.
3513 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3515 * metadata-verify.c: More CLI header verification.
3517 2009-03-19 Zoltan Varga <vargaz@gmail.com>
3519 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
3521 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
3523 * metadata-verify.c: Initial verification of the CLI header.
3525 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
3527 * metadata-verify.c (verify_resources_table): Fix verification of zero
3528 sized resource section and id entries count.
3530 2009-03-18 Zoltan Varga <vargaz@gmail.com>
3532 * icall.c: Handle user types in many Type icalls. Fixes #486303.
3534 2009-03-17 Jb Evain <jbevain@novell.com>
3536 * profiler.c: call mono_gc_base_init from mono_profiler_load.
3538 2009-03-17 Zoltan Varga <vargaz@gmail.com>
3540 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
3541 (mono_gc_make_descr_for_array): Ditto.
3543 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
3545 * verify.c (mono_verifier_is_class_full_trust): Add support for
3546 CoreCLR security mode where trusted assemblies are defined as
3549 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3551 * metadata-verify.c: Add minimal PECOFF resource verification.
3553 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3555 * metadata-verify.c: Be less restrictive with some coff fields.
3557 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
3559 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
3560 params as boxed values on stack. Fixes #485706.
3562 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3564 * console-io.c: the termios values may vary in different flavors of unix.
3566 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3568 * console-io.[ch]: return the entire set of control characters when
3569 initializing the terminal.
3570 * appdomain.c: bump corlib version.
3572 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
3574 * mono-perfcounters.c: added support for in-process custom
3575 performance counters.
3577 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3579 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
3581 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3583 * metadata-verify.c: Verify the data pointed by the import table.
3585 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
3587 * metadata-verify.c (load_data_directories): Store data
3590 * metadata-verify.c: Verify the import table.
3592 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3594 * metadata-verify.c: Verify data directories.
3596 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3598 * metadata-verify.c: Check section header flags.
3600 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3602 * appdomain.c: if the assembly name is a shadow-copied file, return
3603 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
3604 in mono_make_shadow_copy.
3605 * icall.c: if the assembly name is a shadow-copied file, replace it
3606 with the original assembly path.
3608 Bug #484244 fixed. NUnit tests for corlib can be run without
3611 2009-03-12 Zoltan Varga <vargaz@gmail.com>
3613 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
3614 entries when the table is reallocated.
3616 * icall.c: Allocate the memory used by the mono_ptr_array macros using
3617 mono_gc_alloc_fixed () since it contains GC refs.
3619 2009-03-10 Zoltan Varga <vargaz@gmail.com>
3621 * reflection.c (ensure_complete_type): New helper function to call
3622 type resolve handlers for unfinished dynamic types.
3623 (resolve_object): Call it for MonoClassFields. Fixes #483852.
3625 2009-03-09 Zoltan Varga <vargaz@gmail.com>
3627 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
3630 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
3632 * appdomain.c (get_shadow_assembly_location): Fix memleak.
3634 2009-03-08 Zoltan Varga <vargaz@gmail.com>
3636 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
3637 between GCHandles of type WeakTrackResurrection and the objects they
3640 * gc.c: Partly implement the sematics of GCHandles of type
3641 WeakTrackResurrection: these handles should only be cleared after the
3642 finalizer of the object they are pointing to has ran.
3644 2009-03-06 Mark Probst <mark.probst@gmail.com>
3646 * icall.c: Partially revert r126631 because using the jump
3647 trampolines for generic shared methods makes it superfluous.
3649 2009-03-06 Zoltan Varga <vargaz@gmail.com>
3651 * threads.c (handle_store): Create the 'threads' hash table with the proper
3652 MONO_HASH_VALUE_GC type.
3654 2009-03-05 Zoltan Varga <vargaz@gmail.com>
3656 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
3659 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
3660 and LAST_GC_TRACKED as a GC root.
3662 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
3664 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
3665 the static data even if it consists of 1 reference.
3667 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
3668 if there is a GC descriptor.
3670 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
3671 instead of through the GC since they contain no object references.
3673 2009-03-05 Mark Probst <mark.probst@gmail.com>
3675 * generic-sharing.c (instantiate_other_info): Always return a jump
3676 trampoline for method code.
3678 2009-03-05 Marek Habersack <mhabersack@novell.com>
3680 * culture-info-tables.h: generated to include the en-tt culture.
3682 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3684 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
3685 capture the thread context.
3687 * object.c (mono_async_result_new): Cache the invoke wrappers to
3688 ExecutionContext::Capture.
3690 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
3692 * marshal.h: Add a prototype for what mono_compile_method returns
3693 for invoke wrappers.
3695 * gc.c: Use the new prototype declaration.
3697 2009-03-04 Geoff Norton <gnorton@novell.com>
3699 * boehm-gc.c: Add some MONO_LOG tracing for the GC
3701 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
3703 2009-03-04 Martin Baulig <martin@ximian.com>
3706 (mono_debugger_runtime_invoke): Removed.
3708 * mono-debug-debugger.c
3709 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
3711 2009-03-02 Martin Baulig <martin@ximian.com>
3714 (mono_debugger_unhandled_exception): Removed.
3715 (mono_debugger_handle_exception): Removed.
3716 (mono_debugger_throw_exception): Removed.
3719 (mono_debug_debugger_version): Bump to 5.
3721 * mono-debug-debugger.c: Moved the exception handling code to
3722 ../mini/debug-mini.c
3724 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3726 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
3727 finalize_objects_hash.
3729 * gc.c: Use the separate lock to access the finalize_objects_hash field.
3731 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
3734 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
3737 * image.c (mono_image_close): Free it.
3739 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
3740 allowing a creation of a wrapper which invokes its method using a CALLVIRT
3741 on the this argument.
3743 * gc.c (run_finalize): Optimize the calling of the finalizers.
3745 2009-03-03 Martin Baulig <martin@ximian.com>
3747 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
3748 of the `MonoGenericInst' changes.
3750 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
3752 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
3753 mono_array_class_get_cached to reduce locking contention. Extract
3756 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
3757 intermediary managed arrays. Use caching version of mono_array_new
3758 to allocate the result array.
3760 * icall.c (ves_icall_Type_GetEvents_internal): Same.
3762 * icall.c (ves_icall_Type_GetNestedTypes): Same.
3764 * locales.c (create_names_array_idx): Use mono_array_new_cached
3765 to reduce locking contention.
3767 2009-03-03 Zoltan Varga <vargaz@gmail.com>
3769 * object.c (mono_method_add_generic_virtual_invocation): Put back the
3770 thunk builder code for the non-interface case.
3772 2009-03-02 Zoltan Varga <vargaz@gmail.com>
3774 * object.c (get_generic_virtual_entries): New helper function to collect
3775 the virtual generic method instances which need to be added to an IMT
3777 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
3778 Instead of creating a new IMT thunk, reset the vtable slot to the
3779 trampoline, the thunk will be created the next time the trampoline is called.
3780 (build_imt_slots): Add support for virtual generic methods in interfaces by
3781 adding to the IMT thunk all the methods registered using
3782 mono_method_add_generic_virtual_invocation ().
3784 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
3785 (struct _MonoIMTCheckItem): Ditto.
3787 * object.c (mono_method_add_generic_virtual_invocation): Take a
3788 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
3789 the IMT thunk to include all items.
3791 * object.c (mono_class_create_runtime_vtable): Add a missing
3792 mono_loader_unlock ().
3794 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3796 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3798 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
3800 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3802 * object-internals.h: Rename _MonoReflectionEvent to
3803 MonoReflectionMonoEvent so it reflects the right managed type.
3804 Add a MonoReflectionEvent that correctly represents System.EventInfo.
3807 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
3810 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
3812 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
3813 intermediary managed arrays. Use caching version of mono_array_new
3814 to allocate the result array.
3816 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3818 * reflection.c: Use cached version of mono_array_new alongside
3819 the mono_reflection_get_custom_attrs_by_type call path.
3821 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3823 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
3824 intermediary managed arrays. Use caching version of mono_array_new
3825 to allocate the result array.
3827 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
3829 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
3831 * icall.c: Add small implementation of a growable stack bound array.
3833 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
3835 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
3836 intermediary managed arrays. Use caching version of mono_array_new
3837 to allocate the result array.
3839 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
3841 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
3842 helps Enum::CompareTo to be implemented without reboxing all enums
3843 to their underlying type.
3844 2009-02-27 Zoltan Varga <vargaz@gmail.com>
3846 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
3847 since it acquires a global lock leading to scalability problems.
3849 * profiler.c: Make the stat profiler work with multiple appdomains, this
3850 currently only works when no appdomains are unloaded.
3852 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
3854 * appdomain.c: make the check to avoid copying when the assembly is
3855 already shadow copied actually work.
3857 2009-02-26 Zoltan Varga <vargaz@gmail.com>
3859 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3861 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
3862 changes to the managed side.
3864 2009-02-25 Zoltan Varga <vargaz@gmail.com>
3866 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
3867 classes + a separate lock for it, as it is used frequently at runtime, not
3868 just during metadata loading/JIT compilation.
3870 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
3873 * object-internals.h (mono_class_from_name_cached): New macro to cache
3874 the results of the lookup locally without having to declare a static
3875 variable to hold it.
3876 (mono_class_get_field_from_name_cached): Ditto.
3877 (mono_array_class_get_cached): Ditto.
3879 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
3882 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
3883 slower search in metadata.
3885 * pedump.c: Fix a warning.
3887 2009-02-23 Zoltan Varga <vargaz@gmail.com>
3889 * reflection.c (encode_locals): Add checks for user types.
3890 (method_encode_clauses): Ditto.
3891 (method_encode_code): Ditto.
3892 (mono_image_create_token): Ditto.
3894 * object-internals.h: Change the type of more fields from MonoReflectionType*
3897 2009-02-22 Zoltan Varga <vargaz@gmail.com>
3899 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
3900 the a thread does not suspend within 100ms.
3902 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
3903 in addition to StopRequested as well.
3905 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
3907 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
3908 search the method_hash before inserting a new entry, to avoid crashes when
3909 the same method is inserted multiple times, causing the old
3910 MonoDebugMethodInfo structure to be freed by the value dtor function.
3912 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3914 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
3915 SO_EXLUSIVEADDRUSE where available.
3917 2009-02-21 Zoltan Varga <vargaz@gmail.com>
3919 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
3920 runtime invoke wrappers, this time it is string ctor wrappers, which
3921 pass a dummy string as 'this' instead of their obj argument. Fixes
3924 2009-02-21 Jb Evain <jbevain@novell.com>
3926 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3927 only get create_culture once.
3929 2009-02-20 Zoltan Varga <vargaz@gmail.com>
3931 * reflection.c (mono_reflection_setup_internal_class): Move the user type
3932 check before the locking.
3934 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
3935 (mono_reflection_create_runtime_class): Ditto.
3936 (mono_reflection_sighelper_get_signature_local): Ditto.
3937 (mono_reflection_sighelper_get_signature_field): Ditto.
3939 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
3940 is a System.MonoType object or similar.
3941 (monotype_cast): New helper function to cast a MonoObject to a
3942 MonoReflectionType object.
3944 * object-internals.h: Change MonoReflectionType* members in structures to
3945 MonoObject* members to force the usage of the monotype_cast () function.
3947 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
3948 structures/arrays. This causes us to assert instead of crashing when
3949 instances of user defined subclasses of System.Type are encountered.
3951 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3955 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
3956 win32 resource loaded from a PE file.
3958 * image.c: fix mono_image_lookup_resource.
3960 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3964 * threads.c: added internal call for WaitHandle.SignalAndWait.
3966 2009-02-19 Bill Holmes <billholmes54@gmail.com>
3968 * cominterop.c : Adding cominterop_type_from_handle and
3969 registering it as an icall. Replacing all references
3970 to type_from_handle.
3972 Code is contributed under MIT/X11 license.
3974 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3976 * Makefile.am: Add lock-tracer.h and lock-trace.c.
3978 * appdomain.c: Call the tracer init function.
3980 * domain-internals.h: Enable the tracer for the domain locks.
3982 * image.c: Enable the tracer for image locks.
3984 * loader.c: Enable the trace for the loader lock.
3987 * lock-tracer.c: Initial implementation of the lock trace utility.
3988 The tracer requires a compile time define to be enabled and a env var
3989 to be enabled at runtime.
3991 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3993 * domain.c (mono_domain_code_foreach): Improve documentation.
3995 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
3998 * generic-sharing.c:
4000 * reflection.c: Adjust locking order to the new semantics where the loader lock
4003 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
4005 * domain.c: Add mono_domain_code_* functions that perform locking
4006 around the domain codeman.
4008 * domain-internals.h: Export those functions.
4010 * object.c: Use new functions instead of acquiring the domain lock.
4012 2009-02-19 Zoltan Varga <vargaz@gmail.com>
4014 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
4015 delegate. Fixes #477396.
4017 2009-02-18 Zoltan Varga <vargaz@gmail.com>
4019 * reflection.c (create_custom_attr): Get rid of alloca.
4021 2009-02-18 Bill Holmes <billholmes54@gmail.com>
4023 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
4024 Adding exception handling for all CCW calls.
4026 Code is contributed under MIT/X11 license.
4028 2009-02-18 Zoltan Varga <vargaz@gmail.com>
4030 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
4032 * marshal.c (emit_marshal_boolean): Add null checks to the new
4033 native->managed marshalling code. Fixes #476247.
4035 2009-02-17 Zoltan Varga <vargaz@gmail.com>
4037 * class.c (mono_class_get_vtable_entry): Move the addition of
4038 static rgctx invoke wrappers for vtable methods here, this simplifies
4039 a lot of code and causes fewer rgctx wrappers to be created.
4041 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
4042 name of the statistics to begin with an uppercase.
4044 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4046 * reflection.c: Revert previous change as it breaks the build.
4048 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4050 * verify.c: Properly handle SZARRAY element type.
4054 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
4056 * reflection.c (mono_image_create_method_token): Correctly encode
4057 MethodDef MemberRefParent token.
4061 2009-02-17 Zoltan Varga <vargaz@gmail.com>
4063 * image.c (mono_image_close): Delete the critical section before
4064 freeing the memory holding it.
4066 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4068 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
4071 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4073 * pedump.c (main): Call mono_marshal_init so pedump
4076 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4078 * loader.c (method_from_memberref): Properly fix #474271 and
4079 don't break the runtime bad.
4081 2009-02-16 Zoltan Varga <vargaz@gmail.com>
4083 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
4084 (mono_domain_alloc0): Ditto.
4086 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4088 * loader.c (method_from_memberref): Don't abort if the array
4089 method is not found. A regular loader failure is more informative
4094 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
4096 *loader.c: Guard MonoImage::method_cache/methodref_cache
4097 using the image lock instead of the loader lock.
4099 * metadata.h: Add comments about which fields are protected by
4102 2009-02-16 Zoltan Varga <vargaz@gmail.com>
4104 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
4106 * generic-sharing.c (mono_method_construct_object_context): Remove the
4107 wrapper_type == NONE assert, it is not needed.
4109 2009-02-15 Zoltan Varga <vargaz@gmail.com>
4111 * reflection.c (clear_cached_object): New helper function.
4112 (mono_method_clear_object): New function to clear the cached reflection
4113 objects for a dynamic method.
4115 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
4116 Partly fixes # 463323.
4118 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
4122 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
4124 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
4126 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
4127 take the image lock instead of the loader lock.
4129 * metadata-internals.h: Export new functions.
4131 2009-02-12 Miguel de Icaza <miguel@novell.com>
4133 * domain.c (app_config_parse): Remove another use of stat that is
4134 not necessary as g_file_get_contents already does the presence
4137 2009-02-13 Zoltan Varga <vargaz@gmail.com>
4139 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
4141 * marshal.c: Move the bstr handling code to cominterop.c.
4143 * marshal.c: Remove some COM interop code missed previously.
4145 2009-02-12 Miguel de Icaza <miguel@novell.com>
4147 More Paolo patches from the Wii port:
4149 * security.c: Remove ves_icall_System_Environment_get_UserName
4152 * icall.c: And put ves_icall_System_Environment_get_UserName
4155 * appdomain.c (mono_set_private_bin_path_from_config): Remove
4156 redundant call to stat that was only used to test for the file
4157 existence. Patch from Paolo.
4159 * gc.c (run_finalize): If COM is disabled, do not link in
4160 mono_marshal_free_ccw.
4162 * generic-sharing.c: Use alloca.h here as well.
4164 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
4166 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
4168 2009-02-13 Zoltan Varga <vargaz@gmail.com>
4170 * cominterop.c cominterop.h: New files.
4172 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
4173 function/typedefs which are needed by cominterop.c global.
4175 2009-02-12 Mark Probst <mark.probst@gmail.com>
4177 * generic-sharing.c: Don't take the loader lock to guard image
4180 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4182 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
4183 called without the loader lock which is required to guard MonoImage:tokens.
4185 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4191 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
4193 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4195 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
4196 Rework the code to use regular mono_image_alloc/0.
4198 * loader.c: Rework the code to use regular mono_image_alloc/0.
4200 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
4202 2009-02-12 Bill Holmes <billholmes54@gmail.com>
4204 * object-internals.h : Fixing a typo in the
4205 MonoReflectionComVisibleAttribute struct.
4207 * marshal.c (cominterop_com_visible): Check the implemented
4208 interfaces for ComImport.
4210 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
4211 assume that bools should be treated as VARIANTBOOLs.
4213 * marshal.c (emit_marshal_boolean): Adding cases for
4214 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
4216 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
4217 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
4219 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
4220 should be treated as VARIANTBOOLs.
4222 Code is contributed under MIT/X11 license.
4224 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4226 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
4227 allocation with the image lock.
4229 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4231 This patch is the last of a series to remove explicit reference of MonoImage::mempool
4232 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
4234 * object.c: Add mono_string_to_utf8_image.
4236 * object-internals.h: Export mono_string_to_utf8_image.
4238 * reflection.c: Rework all explicit references to the the image mempool to go thought
4239 the mono_image_alloc set of functions.
4241 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4243 This patch is the third of a series to remove explicit reference of MonoImage::mempool
4244 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
4245 and generics-sharing.c.
4247 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
4248 as first argument. Note that this function remains broken as it doesn't perform locking around the
4251 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
4253 * image.c: Add g_slist_append_image.
4255 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
4256 the supplied image for allocation. Move code into mono_metadata_field_info_full.
4258 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
4259 Fix all related code to do the same.
4261 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
4263 * metadata-internals.h: Fix the signatures.
4265 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
4267 This patch is the second of a series to remove explicit reference of MonoImage::mempool
4268 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
4269 and similar to work using MonoImage.
4271 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
4274 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
4276 * class.c (mono_metadata_signature_deep_dup): Same.
4278 * class.c (inflate_generic_type): Same.
4280 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
4282 * metadata.c (mono_metadata_signature_dup_full): Same.
4284 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
4285 mono_metadata_signature_dup_full.
4287 * metadata.c (mono_metadata_type_dup): Same.
4289 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
4291 * reflection.c: Same.
4293 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
4295 * metadata-internals.h: Fix the signatures.
4297 * class-internals.h: Same.
4299 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4301 This patch is the first of a series to remove explicit reference of MonoImage::mempool
4302 and use mono_image_alloc set of functions instead.
4304 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
4305 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
4308 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
4310 * class.c (g_list_prepend_mempool): Removed.
4312 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
4314 * image.c: Add g_list_prepend_image.
4316 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
4318 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
4321 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4323 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
4326 * image.c (mono_image_init): Init the lock field.
4328 * image.c (mono_image_init): Cleanup the lock field.
4330 * image.c: Add mono_image_(un)lock functions.
4332 2009-02-11 Mark Probst <mark.probst@gmail.com>
4334 * class.c, class-internals.h: mono_method_get_context_general()
4335 combines the functionality of mono_method_get_context() and
4336 mini_method_get_context().
4338 * generic-sharing.c, domain-internals.h:
4339 mono_method_construct_object_context() and
4340 mono_domain_lookup_shared_generic() moved from mini.
4342 * icall.c (ves_icall_InternalInvoke): Handle the case where the
4343 method doesn't have the correct instantiation because it's shared
4344 generic code. Fixes #473999.
4346 2009-02-11 Zoltan Varga <vargaz@gmail.com>
4348 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
4350 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
4352 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
4354 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
4356 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
4358 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
4359 and recheck the cache for dups after it.
4361 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
4363 Fixes one of the deadlocks found in #473150.
4365 2009-02-11 Bill Holmes <billholmes54@gmail.com>
4367 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
4368 For Win32, add additional break conditions for accept.
4370 Code is contributed under MIT/X11 license.
4372 2009-02-10 Zoltan Varga <vargaz@gmail.com>
4374 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
4375 lazily initialize the native wrapper cache.
4376 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
4377 cache, since they are different from the normal wrappers.
4379 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
4381 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
4382 AOT compiled native wrappers.
4384 2009-02-09 Geoff Norton <gnorton@novell.com>
4387 * security-core-clr.c: Allow enabling core-clr from the embedding
4390 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4392 * socket-io.c: when requesting all the local ips, if there are no
4393 interfaces up and running, MS returns 127.0.0.1.
4395 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4397 * mono-perfcounters-def.h: processor time is an inverse time.
4400 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4402 * socket-io.c: an empty host name returns the list of local IPs.
4403 Fixes bug #386637 part 1/2.
4405 2009-02-07 Zoltan Varga <vargaz@gmail.com>
4407 * verify.c (mono_class_interface_implements_interface): Call
4408 mono_class_setup_interfaces ().
4409 (merge_stacks): Ditto.
4411 2009-02-06 Zoltan Varga <vargaz@gmail.com>
4413 * class.c (mono_class_setup_interfaces): New function to lazily initalize
4415 (mono_generic_class_get_class): Don't initalize klass->interfaces.
4416 (mono_generic_class_get_class): Ditto.
4418 2009-02-06 U-QUACK\miguel <miguel@quack>
4420 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
4421 they live in security.c
4423 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
4424 another bit from Paolo's code.
4426 2009-02-06 Zoltan Varga <vargaz@gmail.com>
4428 * object.c (build_imt_slots): Add a small optimization to avoid inflating
4429 methods which will be discarded by add_imt_builder_entry ().
4431 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
4434 * loader.c: Add a statistics for the size of the memberref signature cache.
4436 * loader.c (find_cached_memberref_sig): New helper function.
4437 (cache_memberref_sig): Ditto.
4439 * loader.c: Cache the result of parsing memberref signatures, since otherwise
4440 they will be parsed again for every generic instantiation, leading to unbounded
4443 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4445 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
4446 parameters of generic methods.
4448 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
4449 after the original method is copied to the inflated method.
4450 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
4452 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
4453 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
4455 * class.c metadata.c: Update after the changes above.
4457 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
4459 * metadata-verify.c: Simplified error handling and added
4460 section table validation.
4462 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4464 * class-internals.h (MonoClassExt): New structure containing rarely used
4465 fields of MonoClass.
4466 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
4467 through a new 'ext' field.
4469 * class.c (mono_class_alloc_ext): New helper function to allocate
4472 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
4474 2009-02-05 Mark Probst <mark.probst@gmail.com>
4476 * object.c (mono_object_get_virtual_method): Properly inflate
4477 generic methods. Fixes #472692.
4479 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
4481 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
4482 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
4483 for the parent type, the created type must be ready to be used on a generic
4485 We fill this_arg/byval_arg if the parent is a generic instance to make sure
4486 we won't have duplicated entries in generic_inst_cache.
4490 2009-02-05 Miguel De Icaza <miguel@novell.com>
4492 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
4493 replace with plain BSD per the comments on the bug MONO77637.
4495 2009-02-05 Zoltan Varga <vargaz@gmail.com>
4497 * class.c (mono_class_get_generic_class): New accessor function.
4498 (mono_class_get_generic_container): Ditto.
4500 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
4501 fields, similar to the ones in MonoMethod.
4503 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
4504 (mono_class_create_from_typedef): Set klass->is_generic if needed.
4506 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
4508 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
4509 the same information as element_class->byval_arg.
4511 * class.c reflection.c: Remove references to class->byval_arg.
4513 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
4514 klass->enum_basetype directly.
4516 * verify.c metadata.c object.c icall.c reflection.c: Use
4517 mono_class_enum_basetype () instead of accessing klass->enum_basetype
4520 2009-02-04 Miguel de Icaza <miguel@novell.com>
4522 * icall-def.h: Remove internal calls for sockets when
4523 DISABLE_SOCKET is defined, file system writing features when the
4524 OS only support reading and not writing data and Policy support if
4525 the Policy is disabled.
4527 * image.c (do_mono_image_open): Apply Paolo's patches for using
4528 mono_file_map_ APIs here.
4530 * assembly.c: Add support for platforms to avoid prefix
4533 2009-02-04 Zoltan Varga <vargaz@gmail.com>
4535 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
4538 * class.c (mono_class_inflate_generic_class): New helper function.
4540 * class.c: Use mono_class_inflate_generic_class in a few places. Add
4541 statistics for inflated methods/classes.
4543 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
4545 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
4546 the call is made from Delegate.CreateDelegate () for the invoke method of
4549 * loader.c: Add a statistics for the memory occupied by inflated signatures.
4551 * metadata.c (mono_metadata_signature_size): New helper function.
4553 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
4556 * metadata.c (inflated_method_in_image): Avoid calling
4557 mono_method_signature () if the method does not already have a signature.
4559 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4561 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
4562 valuetype is compatible with target type, check by inheritance as a
4563 VT is not really compatible with System.ValueType, for example.
4565 * verify.c (do_invoke_method): Improve error message.
4567 * verify.c (do_box_value): If boxing a nullable, use the type argument
4570 * verify.c (do_newobj): Improve error message.
4574 2009-02-03 Miguel de Icaza <miguel@novell.com>
4576 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
4578 2009-02-03 Mark Probst <mark.probst@gmail.com>
4580 * generic-sharing.c: Don't hold domain lock when calling
4581 instantiate_other_info(). Fixes #471958.
4583 * domain-internals.h, loader.c: Describe locking policy of domain
4584 lock vs loader lock.
4586 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4588 * verify.c (mono_delegate_signature_equal): Make it possible to check
4589 first-arg-bound delegates to static method.
4591 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
4592 static methods with the first arg bound.
4596 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4598 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
4601 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
4602 under strict mode. Any type, when boxed can be seen as a reference type.
4606 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
4608 * object.h: The lower bound of an array is a signed integer value.
4609 Introduce mono_array_lower_bound_t typedef. It should be used instead of
4610 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
4612 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
4613 calculate the upper bound.
4617 2009-02-02 Miguel de Icaza <miguel@novell.com>
4619 From Paolo's work, refactored, cleared up:
4621 * threadpool.c, icall.c: ifdef code that requires a working socket
4624 * metadata.c (mono_metadata_field_info): Do not attempt to return
4625 a value from a function declared as void.
4627 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
4628 from the console stack.
4630 * assembly.c: use strrchr instead of rindex.
4632 * class.c, object.c, marshal.c, icall.c, reflection.c: include
4633 alloca.h on systems that have it.
4635 * environment.c: Avoid code that uses stuff from
4638 * appdomain.c: Include sys/time.h.
4640 * console-io.c: include sys/ioctl.h if it is available.
4642 2009-02-03 Zoltan Varga <vargaz@gmail.com>
4644 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
4646 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
4649 * marshal.c: Set mb->skip_visibility instead of setting it on the method
4650 after it was created and cached, as the later is not thread safe.
4652 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4654 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
4655 called while the debugging module is not initialized. Fixes #471669.
4657 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
4659 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
4663 2009-02-02 Mark Probst <mark.probst@gmail.com>
4665 * generic-sharing.c (lookup_or_register_other_info): Make sure the
4666 loader lock is not taken while the templates lock is held. Fixes
4669 2009-02-02 Mark Probst <mark.probst@gmail.com>
4671 * metadata.c (type_in_image): Added a check to fix a monodis
4674 2009-02-02 Zoltan Varga <vargaz@gmail.com>
4676 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
4679 * object.c (mono_runtime_invoke_array): Ditto.
4681 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
4682 freeing wrappers of dynamic methods.
4684 * loader.c (mono_free_method): Call it. Fixes #463323.
4686 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
4687 methods taking vtype/byref arguments, to fix yet another bug caused by
4688 the sharing of runtime invoke wrappers. Partly fixes #471259.
4690 2009-02-01 Zoltan Varga <vargaz@gmail.com>
4692 * debug-mono-symfile.c (check_line): Return NULL instead of returning
4693 <first file in file table>:1 when the IL offset does not have an associated
4696 2009-01-31 Zoltan Varga <vargaz@gmail.com>
4698 * mono-debug.c (mono_debug_lookup_locals): New function to return local
4699 variable info for a method.
4701 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
4703 2009-01-30 Jb Evain <jbevain@novell.com>
4705 * pedump.c: reuse code from monodis to make sure pedump honors
4706 MONO_PATH, which is needed to verify net_2_1 assemblies.
4708 2009-01-29 Zoltan Varga <vargaz@gmail.com>
4710 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
4711 there is no line number info.
4713 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
4715 Avoid some MonoType allocations
4716 * reflection.c (mono_reflection_initialize_generic_parameter):
4717 Reuse MonoType from param->pklass rather than allocating one.
4718 (mono_dynamic_image_free): Update to changes.
4720 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4722 Rearrange some code to improve consistency
4723 * reflection.c (mono_reflection_setup_generic_class): Move body ...
4724 (mono_reflection_initialize_generic_parameter): ... here.
4726 2009-01-28 Zoltan Varga <vargaz@gmail.com>
4728 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
4729 with type constraints as an experiment.
4731 * boehm-gc.c (on_gc_notification): Update mono_stats.
4733 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
4735 Avoid some allocations
4736 * class-internals.h (_MonoGenericInst::type_argv): Convert from
4737 pointer to tail array to avoid extra allocation.
4738 * metadata.c (free_generic_inst): Update to changes.
4739 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
4742 2009-01-27 Zoltan Varga <vargaz@gmail.com>
4744 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
4745 return TRUE if the two type objects are the same.
4747 2009-01-26 Zoltan Varga <vargaz@gmail.com>
4749 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
4750 (mono_class_native_size): Use klass->marshal_info->min_align instead of
4751 klass->min_align, since klass->min_align contains the managed alignment,
4752 while the native alignment can be different, like for longs on x86.
4755 * class-internals.h (MonoMarshalType): Add a min_align field.
4757 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
4759 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
4762 2009-01-26 Zoltan Varga <vargaz@gmail.com>
4764 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
4765 some comments about the usage of the used_regs field.
4767 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
4770 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
4772 * appdomain.c: return NULL instead of throwing FileNotFoundException
4773 when LoadAssembly() fails.
4775 2009-01-23 Mark Probst <mark.probst@gmail.com>
4777 * metadata.c (mono_metadata_generic_param_equal): Only compare the
4778 image if the owner is NULL. Fixes the AOT failures.
4780 2009-01-23 Zoltan Varga <vargaz@gmail.com>
4782 * metadata.c (mono_metadata_load_generic_params): Initialize the
4783 MonoGenericParam structure using memset so the image field is initialized
4786 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4788 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
4791 2009-01-21 Zoltan Varga <vargaz@gmail.com>
4793 * class.c (mono_class_setup_vtable_general): In the generic instance
4794 optimization, set method->slot for abstract virtual methods. Fixes part of
4797 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4799 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
4800 which signals that the unloading has started but all appdomain services must
4803 * appdomain.c (mono_domain_unload): The initial state for unloading now
4804 is unloading_start and we switch to unloading after the managed call to
4805 AppDomain::DomainUnload has finished.
4807 The new unloading state has to be created because managed code in the
4808 DomainUnload event can depend on things like the threadpool still working.
4809 The domain must remain fully functional while the event executes.
4811 This shown as an issue due to Process::WaitForExit, which waits for
4812 async reads of stdout and stderr to complete. Since those are processed
4813 in the threadpool the code deadlocks because the DomainUnload callback
4814 waits for the async read finished event, which should have been set by a
4815 threadpool job but has been discarded due to the domain been in unload
4818 2009-01-21 Mark Probst <mark.probst@gmail.com>
4820 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
4823 2009-01-21 Mark Probst <mark.probst@gmail.com>
4825 * reflection.c (resolve_object): For fields, inflate the class and
4826 then get the field in the inflated class.
4828 2009-01-20 Mark Probst <mark.probst@gmail.com>
4830 * object-internals.h (struct _MonoException): Added a comment
4831 explaining the new use of trace_ips.
4833 2009-01-20 Mark Probst <mark.probst@gmail.com>
4835 * generic-sharing.c (inflate_other_data): Inflate array methods
4838 * loader.c, class-internals.h: Rename search_in_array_class() to
4839 mono_method_search_in_array_class() and make it non-static.
4841 2009-01-19 Zoltan Varga <vargaz@gmail.com>
4843 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
4844 Hopefully fixes #458168.
4846 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
4848 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
4849 as it is performed elsewhere.
4851 Code is contributed under MIT/X11 license
4853 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
4855 * mono-perfcounters-def.h: Add counters for asp.net requests total and
4857 * object.c (mono_raise_exception): Increment the exceptions total
4858 counter when an exception is thrown.
4859 * class-internals.h: Add a location for storing the total number of
4860 asp.net requests served.
4861 * mono-perfcounters.c: Implement update support for asp.net counters
4862 from the class libraries. Implement read support for asp.net counters
4863 and exceptions total counter.
4865 2009-01-19 Zoltan Varga <vargaz@gmail.com>
4867 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
4868 accessing klass->methods. Fixes #467385.
4870 2009-01-18 Zoltan Varga <vargaz@gmail.com>
4872 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
4873 for byval arguments without an [Out] attribute. Fixes #467212.
4875 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
4876 Fix compilation under android.
4878 * sgen-gc.c: Instead of scanning gray objects after all roots have been
4879 processed, scan them directly after they are copied, to achieve better locality
4882 * socket-io.c: Applied patch from Koushik Dutta
4883 (koush@koushikdutta.com). Disable IPV6 when running under android.
4885 2009-01-18 Zoltan Varga <vargaz@gmail.com>
4887 * icall.c (ves_icall_InternalExecute): Add write barriers.
4889 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
4892 * sgen-gc.c: Implement write barriers in IL code.
4894 2009-01-17 Geoff Norton <gnorton@novell.com>
4896 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
4898 2009-01-17 Geoff Norton <gnorton@novell.com>
4900 * image.c: When unloading the image->references table, there can be gaps
4901 in it. Ensure that we iterate every entry to avoid leaking assembly references
4902 when unloading an appdomain.
4904 2009-01-16 Zoltan Varga <vargaz@gmail.com>
4906 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
4907 speed up ptr-in-nursery checks.
4909 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
4910 threads_lock () to prevent deadlocks.
4912 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
4913 does not need to be scanned during minor collections, since writes to it
4914 must use write barriers.
4916 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
4918 * metadata-verify.c: Add pe nt header verification.
4920 2009-01-15 Zoltan Varga <vargaz@gmail.com>
4922 * gc.c: Fix a few warnings when using SGEN.
4924 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
4926 * metadata-verify.c: Add pe optional header verification.
4928 2009-01-15 Zoltan Varga <vargaz@gmail.com>
4930 * sgen-gc.c: Add support for user defined marker functions, used by
4931 MonoGHashTable to avoid registering a GC root for every hash node.
4933 2009-01-14 Zoltan Varga <vargaz@gmail.com>
4935 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
4936 non-pinned roots into separate hashes to avoid having to traverse them
4937 in functions which are only interested in one kind.
4939 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
4941 * metadata-verify.c: Add pe header machine field verification.
4943 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
4945 * metadata-verify.c: Add pe header size verification.
4947 2009-01-14 Zoltan Varga <vargaz@gmail.com>
4949 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
4950 using the GC, they don't contain references.
4952 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
4954 2009-01-13 Geoff Norton <gnorton@novell.com>
4956 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
4957 AppDomains created on the native side can be cleaned up on the native side.
4959 2009-01-13 Geoff Norton <gnorton@novell.com>
4961 * appdomain.c: Ensure that we call mono_context_init for the embedding api
4962 as well as the managed api.
4964 2009-01-13 Geoff Norton <gnorton@novell.com>
4966 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
4967 with a MonoAppDomain initialized against it.
4969 2009-01-13 Zoltan Varga <vargaz@gmail.com>
4971 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
4973 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
4975 * marshal.c: Avoid setting the exception clauses after a method has been entered
4976 into the wrapper caches. Fixes #465700.
4978 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
4980 (mono_mb_create_method): Set the clauses from the method builder.
4982 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
4984 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
4985 Patch from Makoto Kishimoto.
4987 2009-01-13 Zoltan Varga <vargaz@gmail.com>
4989 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
4990 encoding them as ROOT_DESC_COMPLEX.
4991 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
4993 2009-01-12 Zoltan Varga <vargaz@gmail.com>
4995 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
4996 no longer point to the nursery.
4998 * sgen-gc.c: Add a few comments/FIXMEs.
5000 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
5002 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
5003 initialization of the various _method variables thread safe. Fixes
5006 2009-01-12 Mark Probst <mark.probst@gmail.com>
5008 * domain.c, domain-internals.h: Remove the shared_generics_hash
5009 and its lookup functions.
5011 2009-01-12 Bill Holmes <billholmes54@gmail.com>
5013 * socket-io.c: Fixing the MSVC build.
5015 Code is contributed under MIT/X11 license.
5017 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
5019 * metadata-verify.c: Add pe header watermark verification.
5021 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5023 * metadata-verify.c: Add lfanew verification.
5025 2009-01-12 Jb Evain <jbevain@novell.com>
5027 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
5028 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
5030 2009-01-10 Zoltan Varga <vargaz@gmail.com>
5032 * socket-io.c: Fix the build.
5034 * environment.c: Fix an #ifdef.
5036 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5038 * threadpool.c (async_invoke_thread): Handle the wait function returning
5039 WAIT_IO_COMPLETION as well.
5040 (async_invoke_io_thread): Ditto.
5042 2009-01-09 Bill Holmes <billholmes54@gmail.com>
5044 * threads.c: Fixing the Windows build.
5046 Code is contributed under MIT/X11 license.
5048 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5050 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
5052 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
5053 the thread to wait again.
5055 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5057 * metadata-verify.c: Initial skeleton of the metadata verifier.
5059 * pedump.c: Add support for the metadata verifier.
5061 * verify-internal.h: Export the whole assembly metadata verifier function.
5063 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
5065 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
5067 2009-01-09 Zoltan Varga <vargaz@gmail.com>
5069 * Makefile.am: Upgrade dtrace-prelink.sh location.
5071 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
5073 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
5074 well. Otherwise the shutdown deadlock that happens on unix will can happen
5076 If the main thread code finishes too fast it's possible that the finalizer
5077 thread won't have executed yet, won't record itself as the finalizer thread
5078 and the shutdown sequence will wait on it forever.
5080 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
5082 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
5085 2009-01-08 Miguel de Icaza <miguel@novell.com>
5087 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
5088 Robert Jordan for pointing this out.
5090 2009-01-08 Christian Prochnow <cproch@seculogix.de>
5093 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
5094 ves_icall_System_IO_DriveInfo_GetDriveType.
5096 2009-01-07 Miguel de Icaza <miguel@novell.com>
5098 * icall.c: Wrap calls to mono_strtod in CriticalSection
5099 invocations when using eglib, to work around #464316.
5101 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
5103 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
5104 return value of GetCurrentDirectory to never access unitialized memory.
5106 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
5108 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
5109 return value of GetCurrentDirectory and expand the buffer if needed.
5113 2009-10-07 Tom Hindle <tom_hindle@sil.org>
5115 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
5116 Adding a call to mono_init_com_types.
5118 Code is contributed under MIT/X11 license.
5120 2009-01-07 Geoff Norton <gnorton@novell.com>
5122 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
5123 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
5124 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
5125 be the value of the ip buffer.
5127 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5129 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
5130 interfaces_packed here.
5132 Fixes part of #463294.
5134 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5136 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
5138 Fixes part of #463294.
5140 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5142 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
5143 is a boxed complex as well.
5145 Fixes part of #463294.
5147 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
5149 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
5150 control if a methodspec should be created for the generic method definition from external assemblies.
5151 Caching of methodspec is done using the handleref hash table.
5155 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
5157 * loader.c (find_method): When searching the interfaces of a class
5158 check the transitive closure of implemented interfaces.
5162 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
5164 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
5166 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
5168 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
5169 interfaces calculation to fill_valuetype_array_derived_types.
5171 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
5172 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
5175 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
5176 interfaces for valuetypes if needed.
5178 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
5179 for their basetype as well. Types are array expanded if rank is > 0.
5183 2008-12-30 Bill Holmes <billholmes54@gmail.com>
5185 * socket-io.h : Changing the signature of
5186 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
5189 * icall-def.h : Changing the signature of
5190 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
5192 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
5193 For Windows only. Avoid blocking when calling accept by
5194 querying for a connection via select. The loop also queries
5195 the thread state every 1000 micro seconds for the thread
5196 stop state. This will avoid the process hanging on shutdown
5197 when using a TcpChannel that is never connected to.
5199 Code is contributed under MIT/X11 license.
5201 2008-12-30 Marek Safar <marek.safar@gmail.com>
5203 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
5205 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
5207 * class.c (get_implicit_generic_array_interfaces): Extract common
5208 code to a helper function making it a lot easier on the eyes.
5210 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
5212 * class.c (get_implicit_generic_array_interfaces): If the internal
5213 enumerator is an interface inflate System.Object instead of itself.
5217 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
5219 * object.c (mono_runtime_invoke_array): Don't assert with
5220 byref nullable types.
5222 * marshal.c (mono_marshal_get_runtime_invoke): To handle
5223 byref nullables we unbox the object and store it on the
5225 We can't use the boxed object since it is the T of Nullable<T>
5226 and the boxed representation of a nullable it's underlying type
5228 We could cheat and create a boxed nullable and use the same
5229 machinery of other byref VTs but this feels like a hack and
5230 using the stack has the bonus of reducing heap pressure.
5234 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
5236 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
5241 2008-12-19 Bill Holmes <billholmes54@gmail.com>
5243 * icall-def.h : Adding an internal call definition for
5244 System.Environment.internalBroadcastSettingChange.
5246 * icall.c : Adding a Windows only implementation to broadcast a
5247 WM_SETTINGCHANGE when an environment variable has changed.
5249 Code is contributed under MIT/X11 license.
5251 2008-12-19 Mark Probst <mark.probst@gmail.com>
5253 * class.c, class-internals.h: Made
5254 mono_class_has_parent_and_ignore_generics() non-static.
5256 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
5258 * image.c: deal with the mmap failing when loading an image.
5260 2008-12-17 Geoff Norton <gnorton@novell.com>
5262 * threadpool.c: Ensure that the io_queue_lock is initialized
5263 in all circumstances, as we always attempt to cleanup against it.
5265 2008-12-17 Miguel de Icaza <miguel@novell.com>
5267 * icall.c (ves_icall_System_Environment_get_Platform): For
5268 compatibility reasons for existing client code we will keep
5269 returning 4 for a while.
5271 For how long will depend on the documentation being updated, and
5272 for us to give client code a chance to be updated.
5274 This reverts the original decison on #433108 since we did not
5275 catch roughly 33 instances of the broken code in our own source
5276 code base, we did not catch failures on the buildbots, and QA did
5277 not bring this as a problem.
5279 Only today I found some customer's code breaking due to our own
5280 class libraries not being fully updated and tracked it down to
5281 this change. I am reverting it because if we could not even get
5282 our story straight in our own code base, how can we hope that our
5283 end user code be fixed?
5285 As of this morning, our Wiki page that documents how to detect
5286 Unix had not been fixed.
5288 2008-12-16 Zoltan Varga <vargaz@gmail.com>
5290 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
5292 * class.c (mono_class_get_fields): Handle loading errors.
5294 2008-12-12 Mark Mason <mmason@upwardaccess.com>
5296 * 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.
5298 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
5300 * mono-perfcounters.c: avoid warning.
5302 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5304 * reflection.c (ensure_runtime_vtable): Work on generic instances and
5305 make sure all interfaces have MonoClass::interface_id set.
5307 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
5308 method table is property set.
5310 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5312 * class.c: New function mono_class_setup_interface_id that setup
5313 MonoClass::interface_id if needed.
5315 * class-internals.h: Export new function.
5317 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5319 * class.c: Add code to sanity check the vtable after setup_vtable_general
5322 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
5324 * icall.c: make Assembly.GetExecutingAssembly work properly when
5325 reflection is used to invoke the method.
5328 2008-12-11 Mark Probst <mark.probst@gmail.com>
5330 * metadata/generic-sharing.c: Look for constraints in all type
5331 arguments, not just the first one.
5333 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5335 * appdomain.c: return the correct CodeBase for an Assembly instance
5336 that was loaded from the shadow-copy directories.
5339 2008-12-10 Zoltan Varga <vargaz@gmail.com>
5341 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
5343 * sgen-gc.c (check_object): New debugging helper function.
5345 * object.c: Fix calls to mono_value_copy_array ().
5347 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5349 * class.c (mono_class_setup_fields): If working on an inflated class
5350 first check if the generic definition did init with success.
5354 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5356 pedump.c (main): Fix a warning.
5358 2008-12-10 Bill Holmes <billholmes54@gmail.com>
5360 * object-internals.h : Adding a definition for
5361 MonoReflectionComVisibleAttribute.
5363 * marshal.c (cominterop_com_visible) : Method added to check the
5364 ComVisible attribute of a class.
5366 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
5367 cominterop_raise_hr_exception added to consolidate common code
5368 to raise hr exceptions.
5370 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
5371 if a managed class should support IDispatch.
5374 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
5375 Added additional checks for managed object when getting
5376 an IDispatch interface.
5378 Code is contributed under MIT/X11 license.
5380 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
5382 pedump.c (main): Handle mono_get_method () returning NULL.
5384 2008-12-09 Zoltan Varga <vargaz@gmail.com>
5386 * marshal.h: Fix a warning.
5388 2008-12-09 Bill Holmes <billholmes54@gmail.com>
5390 * marshal.c : Adding cominterop_release_all_rcws to release all
5391 runtime callable wrappers held by the runtime.
5393 * marshal.h : Adding declaration for cominterop_release_all_rcws.
5395 Code is contributed under MIT/X11 license.
5397 2008-12-09 Zoltan Varga <vargaz@gmail.com>
5399 * metadata.c (mono_image_alloc_lock): New helper function.
5400 (mono_image_alloc0_lock): Ditto.
5402 * metadata.c: Use the alloc_lock () helper functions for allocating
5403 memory from the image mempool.
5405 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
5407 * class.c (mono_class_from_generic_parameter): Document it's
5408 locking behavior. Fix double checked locking here, we stored in
5409 param->pklass a partially initialized MonoClass and no membar was used.
5411 2008-12-05 Marek Habersack <mhabersack@novell.com>
5413 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
5414 (3) functions are present in the C library use them to do the
5415 job. If they are absent, make sure that the sum of int_part and
5416 dec_part is rounded before returning. This is necessary due to the
5417 division of dec_part by the power of 10 before the final addition
5418 is performed - if the result is not rounded in some cases it will
5419 yield invalid results.
5421 2008-12-04 Zoltan Varga <vargaz@gmail.com>
5423 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
5424 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
5425 instruction instead of a pointer constant.
5427 2008-12-03 Zoltan Varga <vargaz@gmail.com>
5429 * loader.c (mono_method_get_header): Do most of the work outside the
5430 loader lock, to avoid assembly load hook deadlocks.
5432 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
5433 (mono_metadata_parse_type_full): Ditto.
5435 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
5437 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
5438 Make the stack depth fixed. Ensure proper argument passing to the backtrace
5439 funtions. Finally, use a lock to produce well ordered output.
5441 The lock looks silly, as all calls to the corlib mempool should be guarded
5442 with the loader lock, but for some reason this fact doesn't help.
5444 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
5446 2008-12-02 Mark Probst <mark.probst@gmail.com>
5448 * socket-io.c: 64 bit big-endian fixes.
5450 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
5452 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
5453 targets that require strict compatibility between the types.
5455 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
5456 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
5457 Kill the strict argument and create a new one valuetype_must_be_boxed.
5459 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
5460 state that all valuetypes must be boxed.
5464 2008-11-29 Kornél Pál <kornelpal@gmail.com>
5466 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
5467 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
5469 Contributed under MIT/X11 license.
5471 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
5473 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
5474 the inflate_generic_type machinery should handle it.
5476 This avoids a crash when the field's flags is zero and it's type is
5478 What happens is that mono_metadata_parse_type_full will see that opt_attrs
5479 is zero and will return one of the cached built-in primitive types. Since
5480 those types live in read-only memory, the code that copies it crashes.
5482 2008-11-28 Mark Probst <mark.probst@gmail.com>
5484 * object.c: Don't put function descriptors into generalized IMT
5487 2008-11-28 Mark Probst <mark.probst@gmail.com>
5489 * class.c: Enable generic code sharing on PPC64.
5491 2008-11-27 Mark Probst <mark.probst@gmail.com>
5493 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
5496 * generic-sharing.c: Allocate the method template slists from the
5497 image mempool so it doesn't leak.
5499 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
5501 * class.c (generic_array_methods): Release the linked list.
5503 2008-11-27 Mark Probst <mark.probst@gmail.com>
5505 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
5506 invocation to g_utf16_to_utf8().
5508 2008-11-26 Mark Probst <mark.probst@gmail.com>
5510 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
5511 arguments on big endian archs.
5513 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5515 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
5516 the type name (test added in corlib).
5518 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5520 * pedump.c: initialize perf. counters. Fixes a segv.
5522 2008-11-25 Martin Baulig <martin@ximian.com>
5524 * mono-debug-debugger.c
5525 (mono_debugger_runtime_invoke): Return the exception object if an
5526 exception was thrown. Visual Studio displays the exception object
5527 in the locals window.
5529 2008-11-24 Mark Probst <mark.probst@gmail.com>
5531 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
5534 2008-11-24 Mark Probst <mark.probst@gmail.com>
5536 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
5537 MONO_TYPE_U are sizeof (gpointer), too.
5539 2008-11-24 Mark Probst <mark.probst@gmail.com>
5541 * marshal.c (mono_type_native_stack_size): Fixed size and
5542 alignment for reference types.
5544 2008-11-23 Mark Probst <mark.probst@gmail.com>
5546 * class.c (mono_class_generic_sharing_enabled): Disable generic
5547 code sharing for PPC64.
5549 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
5551 * icall.c (mono_method_get_equivalent_method): Make sure
5552 method->klass->methods is inited before looping over it.
5554 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
5556 * object.c: when calling ExecuteAssembly in a newly created domain,
5557 the configuration file and application base are already set up.
5558 Bug #446353 take 2 fixed.
5560 2008-11-20 Zoltan Varga <vargaz@gmail.com>
5562 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
5563 Fixes #444715. Fix a warning.
5565 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
5567 * appdomain.c: write the full path of the assembly to the .ini file
5568 created when "shadow-copying"
5571 2008-11-18 Zoltan Varga <vargaz@gmail.com>
5573 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
5574 if signature==FALSE.
5576 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5578 * marshal.h : Fix the cygwin build.
5579 marshal.c:12442: undefined reference to `_IID_IMarshal'
5581 Code is contributed under MIT/X11 license.
5583 2008-11-17 Bill Holmes <billholmes54@gmail.com>
5585 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
5586 free threaded marshaler when QueryInterface is called on a COM callable
5587 wrapper requesting the IMarshal interface.
5589 Code is contributed under MIT/X11 license.
5591 2008-11-14 Zoltan Varga <vargaz@gmail.com>
5593 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
5595 * reflection.c (mono_type_get_object): Special case the very common
5598 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
5601 2008-11-13 Bill Holmes <billholmes54@gmail.com>
5603 * process.h : Adding method declaration for
5604 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5606 * process.c : Adding implementation for
5607 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5609 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
5610 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5612 Code is contributed under MIT/X11 license.
5614 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
5616 * appdomain.c (unload_thread_main): Clean up threadpool by
5617 calling mono_thread_pool_remove_domain_jobs.
5619 * domain-internals.h (struct _MonoDomain): Add new fields to
5620 help coordinate the cleanup of the threadpool.
5622 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
5623 that cleans up the threadpool of all jobs associated with an appdomain.
5624 It does that by cleaning up the queues and making sure all active
5625 threads are accounted.
5627 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
5628 unloaded or in the process of. Take this is such way that there is
5629 no race condition between another thread starting the unload and the
5630 current thread acknowledging it.
5632 * threadpool.c (async_invoke_thread): Same.
5634 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
5635 firing the new thread.
5637 * threadpool.c (start_tpthread): Same.
5639 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
5641 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
5643 2008-11-06 Jonathan Chambers <joncham@gmail.com>
5645 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
5646 Add support for DuplicateHandle.
5648 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5649 Add support for DuplicateHandle.
5651 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
5652 Add support for DuplicateHandle.
5654 Code is contributed under MIT/X11 license.
5656 2008-11-06 Mark Probst <mark.probst@gmail.com>
5658 * class-internals.h: Make min_align into a whole byte.
5660 * class.c: Set min_align for SIMD types to 16.
5662 2008-11-05 Geoff Norton <gnorton@novell.com>
5664 * attach.c: Default the attacher to enabled for all cases including
5667 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5669 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
5672 2008-11-04 Mark Probst <mark.probst@gmail.com>
5674 * monitor.c, monitor.h: New function for querying offsets of
5675 members of MonoThreadsSync.
5677 2008-11-04 Zoltan Varga <vargaz@gmail.com>
5679 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
5680 to speed up this function and to avoid the boundless memory growth caused by
5681 the signature_dup () calls.
5683 2008-11-02 Zoltan Varga <vargaz@gmail.com>
5685 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
5688 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
5691 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
5693 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5696 * domain-internals.h: made mono_set_private_bin_path_from_config()
5698 * object.c: call the above function after setting the configuration
5699 file path for the root domain.
5702 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5704 * assembly.c: when the assembly is loaded from an absolute path, end
5705 basedir with a directory separator.
5708 2008-10-30 Mark Probst <mark.probst@gmail.com>
5710 * monitor.c (mono_monitor_get_fast_enter_method): If
5711 CompareExchange is not available, don't create the fastpath
5712 instead of asserting. (The method is missing in the 1.1 profile.)
5714 2008-10-30 Mark Probst <mark.probst@gmail.com>
5716 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
5718 * monitor.c, monitor.h: Code for generating Monitor.Enter and
5719 Monitor.Exit IL fastpaths.
5721 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5723 * class.c (mono_class_create_from_typedef): Added Vector2ul.
5725 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
5727 * class.c (mono_class_create_from_typedef): Added Vector2l.
5729 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
5731 * class.c (mono_class_create_from_typedef): Added Vector2d.
5733 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5735 * appdomain.c: translate \ into / for cache_path.
5736 * domain-internals.h: new mono_is_shadow_copy_enabled().
5737 * icall.c: (fill_reflection_assembly_name) do the same path
5738 manipulations that get_code_base does.
5739 (get_code_base) use mono_is_shadow_copy_enabled.
5741 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
5743 * appdomain.c: shadow-copied assemblies go to CachePath +
5744 ApplicationName when both are set. DynamicBase has nothing to do with
5748 2008-10-26 Zoltan Varga <vargaz@gmail.com>
5750 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
5751 STANDALONESIG table.
5753 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
5754 standalone signatures.
5756 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
5757 comparison code: instead of comparing the signatures using a custom
5758 equals function, transform them to a common signature and compare that. This
5759 works better with AOT.
5761 2008-10-25 Zoltan Varga <vargaz@gmail.com>
5763 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
5765 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
5766 call for generic instances.
5767 (mono_class_setup_properties): Call setup_properties () before accessing
5770 * class.c (mono_class_get_virtual_methods): New helper function to iterate
5771 over the virtual methods of a class using metadata if possible, avoiding the
5772 creation of MonoMethod's for non-virtual methods.
5774 * class.c (mono_class_setup_vtable_general): Rewrite this to use
5775 get_virtual_methods () to iterate over the virtual methods of classes.
5777 2008-10-25 Martin Baulig <martin@ximian.com>
5779 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
5781 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5783 * class.c (mono_class_create_from_typedef): Added Vector4i.
5785 2008-10-24 Mark Probst <mark.probst@gmail.com>
5787 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
5788 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
5789 special-casing applies to eliminate the call completely.
5791 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5793 * class.c (mono_class_create_from_typedef): Added Vector8s.
5795 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
5797 * class.c (mono_class_create_from_typedef): Added Vector16sb.
5799 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5801 * icall.c: get rid of annoying warning.
5803 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5805 * threadpool.c: in 1.x, if you change the background status of the
5806 threadpool thread, it's not reset.
5807 Remove unnecessary calls to SetState.
5809 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5811 * threadpool.c: asynchronously create a set of idle threads upon first
5812 use of the threadpool. SetMinThreads will now start the appropriate
5813 number of idle threads if they are not already running. The default is
5814 1 threadpool thread per CPU. Increased the maximum number of threads
5817 2008-10-22 Martin Baulig <martin@ximian.com>
5819 Revert r116521 from Zoltan, it breaks the debugger:
5821 * class.c (mono_class_get_virtual_methods): New helper function to iterate
5822 over the virtual methods of a class using metadata if possible, avoiding the
5823 creation of MonoMethod's for non-virtual methods.
5825 * class.c (mono_class_setup_vtable_general): Rewrite this to use
5826 get_virtual_methods () to iterate over the virtual methods of classes.
5828 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5830 * threads.c: when creating a threadpool thread, set its state to
5832 * threadpool.c: reset the background state of a threadpool thread
5833 after finishing each work item
5836 2008-10-22 Zoltan Varga <vargaz@gmail.com>
5838 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
5840 * class.c (mono_class_setup_vtable_general): Add an optimized version for
5841 generic instances which works by inflating the methods in the container
5844 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
5845 variant which doesn't make a copy if no inflation was done.
5846 (mono_class_setup_fields): Use it.
5848 * metadata.c (mono_metadata_get_shared_type): New helper function to
5849 return a shared instance of a given MonoType.
5851 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
5852 a copy of most non-generic types.
5854 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
5856 * threadpool.c: remove one more GetSystemInfo () call.
5858 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
5860 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
5861 use the code in mono-proclib.h to get processor information.
5863 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5865 * appdomain.c: fixed the logic that determines whether assemblies in a
5866 directory are "shadow-copied" or not. Bug #433483 fixed.
5868 2008-10-22 Zoltan Varga <vargaz@gmail.com>
5870 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
5873 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5875 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
5878 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
5879 reflection.c: Use mono_field_get_name () for accessing a field's name.
5881 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
5884 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
5887 * loader.c (find_method_in_class): Reenable the metadata optimization by
5888 not using it for generic instances.
5890 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
5891 data/def_type fields from MonoClassField into a separate structure.
5892 (struct MonoClassField): Remove data/def_type fields.
5893 (struct _MonoClass): Add a 'field_def_values' array to store the default
5894 values/RVA for fields.
5896 * class.c reflection.c: Update after the changes.
5898 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
5899 for accessing field->data.
5901 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
5903 * loader.c (find_method_in_class): Revert the last change for now as
5904 it breaks Mono.C5 unit tests.
5906 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
5907 'field_generic_types' and 'field_objects' which contain the information
5908 previously stored in MonoInflatedField.
5909 (MonoInflatedField): Delete.
5910 (struct _MonoClassField): Delete 'generic_info' field.
5912 * reflection.c: Store the information which was previously in
5913 field->generic_info in MonoDynamicGenericClass instead.
5915 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
5916 MonoClassField changes.
5918 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
5920 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
5921 store the value inside the data array of the MonoMethodWrapper.
5922 This saves memory, is faster and fixes the lifetime issues (methods
5923 were never removed from the hash previously). May also fix bug#436996.
5925 2008-10-21 Zoltan Varga <vargaz@gmail.com>
5927 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
5928 generic instances, compute the type from the generic definition instead of
5929 looking in field->generic_info.
5931 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
5932 for inflated fields, the only user was get_fieldref_token () which no
5935 * class.c (mono_class_init): Revert the last change as it seems to cause
5938 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
5939 bytes on 64 bit platforms.
5941 * object.c (mono_class_create_runtime_vtable): Fix a warning.
5943 * object.c (mono_class_create_runtime_vtable): Don't initalize
5944 field->data/field->def_type here, it is done lazily by
5945 mono_class_get_field_default_value ().
5947 * icall.c (ves_icall_get_enum_info): Call
5948 mono_class_get_field_default_value () instead of directly accessing
5949 field->data and field->def_type.
5951 * object.c (get_default_field_value): Ditto.
5953 * class.c (mono_field_get_data): Ditto.
5955 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
5956 call for generic instances.
5958 * loader.c (find_method_in_class): If klass != from_class, then inflate
5959 the method with the context of from_class, since the caller assumes this.
5961 2008-10-20 Zoltan Varga <vargaz@gmail.com>
5963 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
5964 for accessing method->slot.
5966 2008-10-20 Cedric Vivier <cedricv@neonux.com>
5968 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
5970 2008-10-19 Zoltan Varga <vargaz@gmail.com>
5972 * class.c (mono_method_get_vtable_index): Use
5973 mono_method_get_vtable_slot () for accessing method->slot.
5975 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
5976 accessing klass->methods.
5978 * class.c (mono_method_get_vtable_slot): New helper function.
5979 (mono_class_get_vtable_entry): Ditto.
5980 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
5981 accessing method->slot.
5983 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
5984 method to get_inflated_method ().
5986 * class.c (mono_class_get_inflated_method): New helper method to obtain
5987 a method of an inflated class without calling setup_methods ().
5988 (mono_class_get_cctor): Use get_inflated_method.
5990 * generic-sharing.c (mono_class_get_method_generic): Ditto.
5992 * marshal.c image.c: Lazily create all the marshal caches.
5994 * image.c (mono_image_init): Move initialization of runtime_invoke
5995 caches to marshal.c.
5997 * marshal.c (get_cache): New helper function to lazily initialize a
5999 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
6001 * debug-helpers.c (mono_method_full_name): Include generic arguments.
6003 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
6005 * loader.c: fixed check for interface type.
6007 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6009 * appdomain.c: check for NULL setup before it's referenced.
6012 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6014 * class.c: remove the unused old vtable setup code.
6016 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6018 * class.c: don't depend on interface order in
6019 setup_interface_offsets (bug #435777).
6020 * reflection.c: sort the InterfaceImpl table (patch from
6021 Jb Evain <jbevain@novell.com>).
6023 2008-10-13 Zoltan Varga <vargaz@gmail.com>
6025 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
6026 the low level assemblies lock.
6028 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
6030 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
6031 object.c, reflection.c, socket-io.c, threads.c: introduced
6032 mono_framework_version () to return the major framewrok version,
6033 changed the code that was using more complex patterns to use it.
6034 Return the correct value for PlatformID for OSX.
6036 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
6038 * icall-def.h, process.h, process.c: added an icall to get info about
6039 processes using mono-proclib.
6041 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
6043 * mono-perfcounters.c: use the mono-proclib functions to
6044 access process information.
6046 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6048 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
6049 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
6050 reflection.c: remove rawbuffer usage: mmap support is more sanely
6051 provided by utils/mono-mmap.
6053 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
6055 * gc.c: use posix semaphores when possible so that
6056 mono_gc_finalize_notify() is signal safe.
6058 2008-10-11 Zoltan Varga <vargaz@gmail.com>
6060 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
6061 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
6062 be #ifdef-ed out, the linker will remove the rest.
6064 * marshal.c: Implement DISABLE_COM.
6066 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
6068 2008-10-11 Miguel de Icaza <miguel@novell.com>
6070 * locales.c (string_invariant_compare_char): Optimization: do not
6071 call g_unichar_type unless we actually need the information.
6073 2008-10-10 Mark Probst <mark.probst@gmail.com>
6075 * object.c, class-internals.h: Also create remoting trampolines
6076 for generic methods. Pass the domain to the remoting trampoline
6077 creation function, too.
6079 2008-10-10 Zoltan Varga <vargaz@gmail.com>
6081 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
6083 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6085 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
6088 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
6091 * locales.c: remove the use of g_strdown. Fixes bug #322313.
6093 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
6095 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
6096 for the least possible amount of time (extending the fix in r113458).
6098 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
6100 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
6102 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6104 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
6105 as possible simd intrinsic types.
6106 Optimized the test to check for the common prefix first.
6108 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
6110 * class.c: back out part of a broken optimization committed on
6111 May 23th (bug #433908).
6113 2008-10-09 Mark Probst <mark.probst@gmail.com>
6115 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
6116 Win32. Should fix #432388 for most cases until we have the new
6119 2008-10-08 Zoltan Varga <vargaz@gmail.com>
6121 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
6122 instead of using inst->id so the hash is stable for AOT.
6124 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6127 * icall.c: create a .ini file for shadow-copied assemblies that
6128 contains the location of the original assembly. Use this to return the
6129 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
6130 Also fix the number of '/' for windows when returning the CodeBase.
6133 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6135 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
6137 Code is contributed under MIT/X11 license.
6139 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6141 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
6142 if if the class vtable needs initialized.
6144 Code is contributed under MIT/X11 license.
6146 2008-10-07 Bill Holmes <billholmes54@gmail.com>
6148 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
6149 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
6150 STRING->BSTR, and CLASS->INTERFACE.
6152 Code is contributed under MIT/X11 license.
6154 2008-10-07 Marek Habersack <mhabersack@novell.com>
6156 * sysmath.h: changed the declaration of the
6157 ves_icall_System_Math_Round2 icall by adding an extra
6158 away_from_zero parameter.
6160 * sysmath.c (ves_icall_System_Math_Round2): added support for
6161 away from zero rounding. The icall now takes an extra boolean
6162 parameter to signal that away from zero operation is requested.
6164 2008-10-06 Zoltan Varga <vargaz@gmail.com>
6166 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
6167 the delegate klass so it can work with full-aot.
6168 (mono_marshal_get_delegate_end_invoke): Ditto.
6169 (mono_marshal_get_delegate_invoke): Ditto.
6171 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
6173 * gc.c, attach.h, attach.c: remove a bad pattern:
6174 add_finalizer_callback () is not implemented correctly, it can't
6175 without adding more overhead to the finalizer loop and it's not
6176 even needed, since we know exactly what we need to call, so there is
6177 no need to do so through an expensive function pointer.
6179 2008-10-04 Zoltan Varga <vargaz@gmail.com>
6181 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
6183 * attach.c (mono_attach_init): Remove the #ifdef.
6185 2008-10-04 Andreas Färber <andreas.faerber@web.de>
6187 * attach.c (mono_attach_init): Don't use
6188 mono_gc_add_finalizer_thread_callback when compiling without GC.
6191 Code is contributed under MIT/X11 license.
6193 2008-10-03 Zoltan Varga <vargaz@gmail.com>
6195 * class.c (mono_class_create_from_typedef): Remove the
6196 #ifndef DISABLE_SIMD stuff.
6198 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
6200 * class-internals.h (MonoClass): Added simd_type bit field.
6202 * class.c (mono_class_create_from_typedef): Check if type is a simd
6205 2008-10-03 Mark Probst <mark.probst@gmail.com>
6207 * object.c (mono_method_add_generic_virtual_invocation): Only add
6208 instantiations to the thunk whose count is at least as large as
6211 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
6213 * icall.c: changed the Type of the exception thrown when trying to
6214 invoke a constructor on an abstract class. Part of the fix for bug
6217 2008-10-02 Mark Probst <mark.probst@gmail.com>
6219 * class.c, class-internals.h (mono_method_get_vtable_index): New
6220 function which returns the index into the vtable and properly
6221 handles inflated virtual generic methods.
6223 2008-10-01 Mark Probst <mark.probst@gmail.com>
6225 * object.c, domain.c, object-internals.h, domain-internals.h:
6226 Generalize IMT thunk machinery to also handle thunks for virtual
6227 generic method invokes. When a virtual generic method is invoked
6228 more than a number of times we insert it into the thunk so that it
6229 can be called without lookup in unmanaged code.
6231 * generic-sharing.c, class-internals.h: Fetching a
6232 MonoGenericInst* for a method from an (M)RGCTX.
6234 2008-10-01 Zoltan Varga <vargaz@gmail.com>
6236 * marshal.c (emit_marshal_string): Applied a variant of a patch by
6237 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
6238 marshalling. Fixes #431304.
6240 2008-10-01 Bill Holmes <billholmes54@gmail.com>
6242 * marshal.c (emit_marshal_variant) : Change the attribute checks to
6243 handle when ref is specified without In or Out.
6245 Code is contributed under MIT/X11 license.
6247 2008-09-30 Mark Probst <mark.probst@gmail.com>
6249 * loader.c (mono_get_method_constrained): Don't expand method with
6250 the class's context, because it's already a method of that class.
6252 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
6254 * attach.c : should be correct build fix.
6256 2008-09-29 Zoltan Varga <vargaz@gmail.com>
6258 * attach.c: Fix the previous change.
6260 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
6262 * attach.c : quick w32 build fix.
6264 2008-09-27 Miguel de Icaza <miguel@novell.com>
6266 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
6267 crashes MonoDevelop: #430455.
6269 2008-09-27 Zoltan Varga <vargaz@gmail.com>
6271 * domain-internals.h (struct _MonoDomain): Move most fields used only by
6272 the JIT do MonoJitDomainInfo in ../mini/mini.h.
6274 * domain.c: Remove initialization/cleanup of the removed fields.
6276 2008-09-27 Mark Probst <mark.probst@gmail.com>
6278 * class.c (mono_class_generic_sharing_enabled): Enable generic
6279 code sharing for PPC.
6281 2008-09-26 Bill Holmes <billholmes54@gmail.com>
6283 * attach.c : Fixing the Windows builds.
6285 Code is contributed under MIT/X11 license.
6287 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6289 * class.c (mono_class_generic_sharing_enabled): Experimentally change
6290 the default generic sharing mode to 'all'.
6292 2008-09-25 Mark Probst <mark.probst@gmail.com>
6294 * generic-sharing.c, class-internals.h: New function for checking
6295 whether a method needs a static RGCTX invoke wrapper. A few
6296 funtions moved from mini/generic-sharing.c.
6298 * icall.c: New function used.
6300 2008-09-25 Mark Probst <mark.probst@gmail.com>
6302 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
6303 Static RGCTX invoke wrapping applies to value type methods, too.
6305 * class.c (mono_class_setup_vtable_general): In generic-shared
6306 value types, wrap methods with a static RGCTX invoke wrapper.
6308 2008-09-25 Zoltan Varga <vargaz@gmail.com>
6310 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
6313 2008-09-24 Zoltan Varga <vargaz@gmail.com>
6315 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
6316 register a callback which is called when the finalizer thread is woken
6318 (finalizer_thread): Call the callback if it exists.
6320 * attach.h attach.c: New files, implementing the attach mechanism.
6322 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
6324 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
6325 by the previous change.
6327 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
6329 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
6330 loader.c, marshal.c, metadata-internals.h, metadata.c,
6331 method-builder.c, object.c, reflection.c: introduced specific functions
6332 to allocate from the domain and image mempools and cleaned up most of
6333 the code to use them (still missing a few in reflection.c).
6334 Keep the loader bytes counter updated.
6336 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
6338 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
6339 loader-related counters.
6341 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
6343 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
6344 added more MS-compatible counters.
6346 2008-09-22 Zoltan Varga <vargaz@gmail.com>
6348 * class.c (mono_class_setup_fields): Call setup_fields before accessing
6349 class->blittable. Fixes #428217.
6351 2008-09-21 Zoltan Varga <vargaz@gmail.com>
6353 * reflection.c (mono_image_get_field_on_inst_token): Call
6354 field_encode_signature () since that handles custom modifiers too.
6357 2008-09-20 Zoltan Varga <vargaz@gmail.com>
6359 * reflection.c (add_custom_modifiers): New helper function to merge custom
6360 modifiers stored in objects to a MonoType.
6361 (fieldref_encode_signature): Encode custom modifiers.
6362 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
6363 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
6365 2008-09-19 Kornél Pál <kornelpal@gmail.com>
6367 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
6368 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
6369 64-bit IL only images because imports are not resolved for IL only images.
6370 Special thanks to Bill Holmes for finding this bug and testing the patch.
6371 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
6373 Contributed under MIT/X11 license.
6375 2008-09-19 Miguel de Icaza <miguel@novell.com>
6377 * mono-config.c (dllmap_start): Add support for the bits keyword
6378 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
6380 2008-09-19 Mark Probst <mark.probst@gmail.com>
6382 * reflection.c (inflate_mono_method): When the class the method is
6383 to be inflated for is itself not inflated, just return the method.
6385 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
6387 * mono-perfcounters.c: use more user friendly process instance names.
6389 2008-09-18 Bill Holmes <billholmes54@gmail.com>
6391 * marshal.c (emit_marshal_variant) : Change the attribute checks to
6392 handle "[in] ref" and "[in][out] ref" cases.
6394 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
6395 to mono_mb_create_method. This was causing problems calling native to
6396 managed passing Variants by value.
6398 Code is contributed under MIT/X11 license.
6400 2008-09-18 Zoltan Varga <vargaz@gmail.com>
6402 * class.c (can_access_internals): Call mono_assembly_load_friends ()
6403 before accessing the friend_assembly_names field.
6405 * assembly.c (mono_assembly_load_friends): Make this callable multiple
6407 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
6408 called lazily when it is needed.
6410 * metadata-internals.h (struct _MonoAssembly): Add
6411 'friend_assembly_names_inited' flag.
6413 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
6415 * mono-perfcounters-def.h: fix the types of a few counters.
6416 * mono-perfcounters.c: implemented the instance names getter
6419 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
6421 * culture-info-table.h : regenerated.
6423 2008-09-17 Robert Jordan <robertj@gmx.net>
6425 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
6426 context bound objects. Fixes #415577.
6428 Code is contributed under MIT/X11 license.
6430 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
6432 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
6433 implementation (bug #423582).
6435 2008-09-16 Zoltan Varga <vargaz@gmail.com>
6437 * object.c (mono_object_get_virtual_method): Handle the case method->slot
6438 is not set. Fixes #426309.
6440 2008-09-16 Jb Evain <jbevain@novell.com>
6442 * class.c (mono_class_from_name): fix the exported type look up
6443 when the type is defined in a referenced assembly.
6445 2008-09-16 Jb Evain <jbevain@novell.com>
6447 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
6448 increment the next index counter on each iteration to make that work
6449 for more than one type forwarder. Unmanaged part to fix #422929.
6451 2008-09-15 Mark Probst <mark.probst@gmail.com>
6453 * object-internals.h: enum ComInterfaceType in
6454 MonoInterfaceTypeAttribute is guint32, not guint16.
6456 2008-09-12 Mark Probst <mark.probst@gmail.com>
6458 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
6461 2008-09-11 Mark Probst <mark.probst@gmail.com>
6463 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
6466 2008-09-11 Mark Probst <mark.probst@gmail.com>
6468 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
6469 Endianness fixes for MonoSymbolFileOffsetTable.
6471 2008-09-10 Bill Holmes <billholmes54@gmail.com>
6473 * process.c (complete_path) : Removing quotes from the
6474 input path. The glib file routines do not handle file paths
6475 that have quotes around them.
6477 Code is contributed under MIT/X11 license.
6479 2008-09-10 Bill Holmes <billholmes54@gmail.com>
6481 * socket-io.h : Adding a comment to provide locations where
6482 changes to MonoSocketAsyncResult need to be synced.
6484 Code is contributed under MIT/X11 license.
6486 2008-09-10 Zoltan Varga <vargaz@gmail.com>
6488 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
6489 parameters as well. Fixes #425001.
6491 2008-09-08 Miguel de Icaza <miguel@novell.com>
6493 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
6496 2008-09-07 Miguel de Icaza <miguel@novell.com>
6498 * console-io.c: Add support for tracking the window size if it
6501 The setup is very simple: the TtySetup function will now return a
6502 pointer to a location in memory that tracks the current console
6503 size. The managed code checks its current value every time its
6504 queried against the last value set, and updates accordingly.
6506 With this setup we can work with multiple consoles, and we do not
6507 require to poke into managed code from a signal handler.
6509 Additionally, the environment for COLUMNS and LINES is now handled
6512 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
6514 2008-09-07 Mark Probst <mark.probst@gmail.com>
6516 * marshal.c (mono_type_native_stack_size): Treat
6517 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
6519 2008-09-04 Jb Evain <jbevain@novell.com>
6521 * class.c (mono_class_is_assignable_from): fix assignability of nullables
6524 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
6526 * verify.c (verify_type_compatibility_full): Revert change
6527 to allow converting a native int to unmanaged pointer be verifiable
6528 under non-strict mode.
6529 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
6531 * verify.c: Added some TODOs.
6533 2008-09-02 Bill Holmes <billholmes54@gmail.com>
6535 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
6536 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
6537 Changed to use GlobalAlloc for the memory returned on Windows platforms.
6539 Code is contributed under MIT/X11 license.
6541 2008-09-02 Jb Evain <jbevain@novell.com>
6543 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
6545 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
6547 reflection.c (typebuilder_setup_fields): Handle classes with
6550 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
6552 class.c (mono_class_setup_events): Add memory barrier due to
6553 double checked locking.
6555 class.c (mono_class_setup_properties): Same.
6557 2008-08-31 Zoltan Varga <vargaz@gmail.com>
6559 * class.c (mono_class_is_assignable_from): Fix the build.
6561 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
6562 before accessing klass->interface_bitmap. Fixes #421744.
6564 2008-08-28 Zoltan Varga <vargaz@gmail.com>
6566 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
6567 the runtime into no-exec mode, useful when running the AOT compiler.
6569 * appdomain.c gc.c object.c: Avoid executing managed code when running
6572 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
6574 * reflection.c (_mono_reflection_get_type_from_info): Handle the
6575 special case when the mono_assembly_loaded () returns NULL because the
6576 search hook is not installed.
6578 2008-08-25 Zoltan Varga <vargaz@gmail.com>
6580 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
6581 crashes in bstr marshalling on linux.
6583 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6585 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
6586 with more than one parameter.
6588 2008-08-24 Miguel de Icaza <miguel@novell.com>
6590 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
6591 start/stop flow control as well when turning off ICANON (allows
6592 C-s and C-q to be read by Console.ReadKey).
6594 2008-08-24 Zoltan Varga <vargaz@gmail.com>
6596 * class.c (mono_class_init): Move the initialization of nested classes
6597 into mono_class_get_nested_types (). Fixes #418433.
6599 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
6602 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
6603 iterating tough the nested classes of a class.
6605 2008-08-23 Zoltan Varga <vargaz@gmail.com>
6607 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
6610 2008-08-22 Miguel de Icaza <miguel@novell.com>
6612 * console-io.c (sigcont_handler): Support signal chaining for
6615 (console_set_signal_handlers): Use best practices with sigaction,
6616 clear the structure before using it.
6618 2008-08-22 Robert Jordan <robertj@gmx.net>
6620 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
6621 Fix the Windows build.
6623 2008-08-22 Zoltan Varga <vargaz@gmail.com>
6625 * class.c (mono_class_generic_sharing_enabled): Make the default
6626 sharing mode 'corlib'.
6628 2008-08-21 Zoltan Varga <vargaz@gmail.com>
6630 * console-io.c (console_set_signal_handlers): Fix a warning.
6632 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
6633 method normally, the JIT will take care of avoiding recursion.
6635 2008-08-20 Bill Holmes <billholmes54@gmail.com>
6637 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
6639 Code is contributed under MIT/X11 license.
6641 2008-08-20 Miguel de Icaza <miguel@novell.com>
6643 * console-io.c (sigcont_handler): We need to restore the entire
6644 termios state, not only the original settings, as things like echo
6645 can be controlled after this (Booish exposes this issue with its
6646 own ReadLine implementation).
6648 Additionally, we need to set the terminal back into keypad_xmit
6651 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
6652 string as a paramter as well. Otherwise we get different
6655 2008-08-20 Zoltan Varga <vargaz@gmail.com>
6657 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
6658 delegates with byref out parameter passing. Fixes #351520.
6660 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
6662 (mono_type_get_desc): Add the type arguments for GENERICINST.
6663 (mono_method_full_name): Stringify the class name using mono_type_full_name
6664 so it picks up generic arguments.
6666 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
6668 * console-io.c: Removed debug output.
6670 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
6672 reflection.c (mono_reflection_create_runtime_class): Alloc
6673 the nested classes linked list using the dynamic image mempool.
6674 Fixes leak in corlib compilation.
6676 2008-08-19 Miguel de Icaza <miguel@novell.com>
6678 * console-io.c: Fix incredibly annoying behavior on the console
6679 after resuming execution after control-z. This affected every
6680 console application.
6682 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
6684 * mempool-internals.h: Header for mono private mempool functions. The first
6685 two function are for allocating glib linked lists using pools.
6687 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
6689 * Makefile.am: Added mempool-internals.h.
6691 2008-08-16 Zoltan Varga <vargaz@gmail.com>
6693 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
6694 (mono_domain_free): Ditto.
6696 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
6697 be used by the JIT to store its domain-specific information, instead of putting
6698 it directly into MonoDomain.
6700 * domain.c (mono_install_create_domain_hook): New helper function to install
6701 a hook which initializes domain->runtime_info.
6703 * domain.c (mono_install_free_domain_hook): Ditto.
6705 2008-08-15 Zoltan Varga <vargaz@gmail.com>
6707 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
6708 asserting if the ares parameter is null.
6710 * mono-perfcounters.c: Fix warnings.
6712 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
6713 is not needed, don't check for interruptions either.
6714 (mono_marshal_get_delegate_end_invoke): Ditto.
6716 2008-08-15 Marek Habersack <mhabersack@novell.com>
6718 * mono-perfcounters.c (predef_readonly_counter): added support for
6719 reading the ASP.NET Requests Queued counter from another process.
6721 2008-08-12 Zoltan Varga <vargaz@gmail.com>
6723 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
6724 MonoImage to simplify the AOT code.
6726 2008-08-10 Zoltan Varga <vargaz@gmail.com>
6728 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
6729 marshalling. Fixes #416078.
6731 2008-08-08 Zoltan Varga <vargaz@gmail.com>
6733 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
6734 it is set, looking up the icall address is deferred to the JIT, since
6735 in embedded scenarios, the icall might not be registered in the runtime
6736 doing the AOT compilation. Backported from the 2.0 branch.
6738 2008-08-08 Zoltan Varga <vargaz@gmail.com>
6740 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
6743 2008-08-05 Marek Habersack <mhabersack@novell.com>
6745 * Makefile.am: added support for cross-compilation.
6747 2008-08-04 Zoltan Varga <vargaz@gmail.com>
6749 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
6751 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
6753 * mono-perfcounters.c: jitted methods and jitted bytes counters.
6755 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
6757 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
6758 mono-perfcounters.c: performance counters implementation.
6760 2008-07-31 Zoltan Varga <vargaz@gmail.com>
6762 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
6763 to gpointer, letting the AOT code decide what to store in it.
6765 2008-07-31 Bill Holmes <billholmes54@gmail.com>
6767 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
6768 mono_class_setup_methods if the methods are not initialized.
6770 Code is contributed under MIT/X11 license.
6772 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6774 * verify.c: Remove some debug code I commited by accident.
6776 * verify.c (mono_method_is_valid_in_context): Change the return value
6777 to make possible to distinguish between invalid and unverifiable.
6779 * verify.c (verifier_load_method): Don't return NULL for unverifiable
6782 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6784 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
6785 constraints. Fixes regression in gtest-253.
6787 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
6789 * verify.c (mono_verifier_verify_class): Don't allow generic types
6790 with explicit layout.
6792 * verify.c (mono_method_verify): Check locals and argument types.
6794 2008-07-29 Zoltan Varga <vargaz@gmail.com>
6796 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
6797 wait if the thread is in StopRequested state.
6799 * class.c (mono_class_from_name): Refactor the module searching code into
6800 a separate function so it can be reused in the AOT case too.
6802 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
6804 * verify.c (mono_type_is_valid_in_context): Improve the error message.
6805 Check both the type and it's generic type definition for loader errors.
6807 * verify.c (mono_method_is_valid_in_context): Don't generate another
6808 error when a type errors occur, this leads to the wrong exception been
6811 2008-07-28 Dick Porter <dick@ximian.com>
6815 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
6816 New internal calls to duplicate and close a process handle.
6818 2008-07-27 Andreas Färber <andreas.faerber@web.de>
6820 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
6822 2008-07-27 Zoltan Varga <vargaz@gmail.com>
6824 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
6826 2008-07-27 Robert Jordan <robertj@gmx.net>
6828 * class.c (mono_class_init): Don't compute class.has_finalize for
6829 valuetypes. Fixes #412477.
6831 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
6833 * verify.c: Implement constraint equivalence checking.
6834 This is required when a generic parameter is used as
6835 argument to a constrained one.
6839 2008-07-24 Zoltan Varga <vargaz@gmail.com>
6841 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6843 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
6845 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
6846 synch with managed object layout.
6848 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
6850 * verify.c (do_branch_op): Handle valuetypes and generic
6853 * verify.c (do_cmp_op): Same.
6857 2008-07-24 Mark Probst <mark.probst@gmail.com>
6859 * generic-sharing.c: Fix memory leaks.
6861 * class.c, class-internals.h: Make
6862 mono_class_inflate_generic_type_with_mempool() non-static.
6864 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
6866 * pedump.c (dump_verify_info): Dump full class name.
6868 2008-07-24 Mark Probst <mark.probst@gmail.com>
6870 * generic-sharing.c: Removed some old code that didn't do anything.
6872 2008-07-24 Massimiliano Mantione <massi@ximian.com>
6873 * profiler.c: Added runtime_initialized_event,
6874 mono_profiler_install_runtime_initialized and
6875 mono_profiler_runtime_initialized. This new hook tells the profiler
6876 when the runtime is sufficiently initialized to be able to call
6877 mono_thread_attach on the root appdomain.
6878 * profiler.h, profiler-private.h: Likewise.
6880 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
6882 * verify.c (do_cast): Do boxing for generic arguments as well.
6884 * class.c (is_nesting_type): Drop generic instantiations before
6885 checking for nesting.
6887 * class.c (can_access_instantiation): Allow access to generic
6890 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
6892 * verify.c (verify_class_for_overlapping_reference_fields):
6893 On some cases, the field size might be zero, guard against that.
6894 Fix the explicit layout check to work as expected.
6896 2008-07-23 Zoltan Varga <vargaz@gmail.com>
6898 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
6899 mono_thread_resume () during shutdown, since the thread we want to abort
6902 2008-07-22 Zoltan Varga <vargaz@gmail.com>
6904 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
6907 * debug-mono-symfile.c: Fix a warning.
6909 * mono-perfcounters.c (get_cpu_times): Fix a warning.
6911 * object.c (mono_class_vtable): Check if exception_type is set, and return
6912 NULL as defined by the function comments.
6914 2008-07-22 Mark Probst <mark.probst@gmail.com>
6916 * mempool.c: Use malloc for every single mempool allocation if the
6917 configure option is set. This makes it easier to track mempool
6918 allocations with tools like Valgrind.
6920 2008-07-22 Jb Evain <jbevain@novell.com>
6922 * reflection.c (create_dynamic_mono_image): emit the same
6923 metadata version that SL2 does when creating a SL2 image.
6925 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
6928 * icall.c: New icall System.Enum:get_hashcode. This function
6929 avoids the overhead of boxing the enum to the underlying type.
6931 2008-07-21 Mark Probst <mark.probst@gmail.com>
6933 * reflection.c (mono_method_get_object): Don't let static RGCTX
6934 invoke wrappers get into MonoReflectionMethods.
6936 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
6938 * object-internals.h:
6939 * object.c: New mono_runtime_class_init_full function
6940 that makes throwing the exception optinal.
6942 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
6943 for the case where the exception object is supplied.
6945 2008-07-16 Kornél Pál <kornelpal@gmail.com>
6947 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
6950 Contributed under MIT/X11 license.
6952 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
6954 * string-icalls.c (ves_icall_System_String_InternalSplit):
6955 Optimize array allocation by caching the MonoClass of the
6958 * icall.c (ves_icall_Type_GetMethodsByName): Same.
6960 * reflection.c (mono_param_get_objects): Same.
6962 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
6965 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
6966 It inflates the given type using the class context.
6968 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
6970 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
6971 the vtable if it already exists.
6973 * object-internals.h: Add mono_class_try_get_vtable as part of the
6976 * reflection.c (mono_type_get_object): Use the MonoObject from the
6977 vtable when possible. Reduces locking contention on reflection heavy
6980 2008-07-15 Zoltan Varga <vargaz@gmail.com>
6982 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
6983 g_bit_nth_msf () since that macro is not implemented in eglib.
6985 2008-07-13 Zoltan Varga <vargaz@gmail.com>
6987 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
6988 on platforms which do not support it.
6990 2008-07-12 Zoltan Varga <vargaz@gmail.com>
6992 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
6994 2008-07-11 Martin Baulig <martin@ximian.com>
6996 * mono-debug-debugger.h
6997 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
6999 * mono-debug-debugger.c
7000 (_mono_debugger_interruption_request): New global volatile variable.
7001 (mono_debugger_check_interruption): New public function.
7004 (mono_thread_current_check_pending_interrupt): Call
7005 mono_debugger_check_interruption().
7006 (mono_thread_interruption_checkpoint_request): Likewise.
7008 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7010 * verify.c: Add more type checks for loaded types. Verify the result
7011 handle from ldtoken.
7013 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7015 * loader.c (field_from_memberref): Don't crash if the field
7018 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7020 * verify.c: Verify if type and method instantiations
7021 don't have invalid VAR or MVAR arguments.
7023 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7025 * verify.c: Fix double free of function pointer list.
7027 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7029 * object.c (mono_string_to_utf8): Comment the new code as it
7032 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
7034 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
7036 2008-07-07 Bill Holmes <billholmes54@gmail.com>
7038 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
7039 is not throw too many times.
7041 Code is contributed under MIT/X11 license.
7043 2008-07-07 Zoltan Varga <vargaz@gmail.com>
7045 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
7046 debugging is turned off.
7048 2008-07-06 Zoltan Varga <vargaz@gmail.com>
7050 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
7052 2008-07-04 Mark Probst <mark.probst@gmail.com>
7054 * class-internals.h, class.c: Added new generic sharing option:
7055 Share only stuff in System.Collections.Generic, which is now the
7058 2008-07-04 Mark Probst <mark.probst@gmail.com>
7060 * generic-sharing.c, class-internals.h: New function for getting a
7061 generic method in a generic class given the corresponding method
7062 for a different instantiation of the class. Partly refactored
7063 from mini-trampolines.c.
7065 * class.c: Make sure generic methods have a class_inst if they are
7066 part of a generic class.
7068 * metadata.c (mono_type_stack_size_internal): Handle type
7071 2008-07-04 Mark Probst <mark.probst@gmail.com>
7073 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
7074 Signifies whether information on the this/vtable/mrgctx variable
7077 2008-07-04 Mark Probst <mark.probst@gmail.com>
7079 * object.c, object-internals.h, icall.c: New function
7080 mono_delegate_ctor_with_method(), which does the same as
7081 mono_delegate_ctor(), but takes an explicit method argument
7082 instead of taking the method from the jit info.
7084 * marshal.c: When creating a delegate with an inflated method take
7085 the "this" argument as the target class for the castclass.
7087 2008-07-03 Mark Probst <mark.probst@gmail.com>
7089 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
7090 mono_jit_info_table_find() to perform very badly in some cases.
7092 2008-07-02 Zoltan Varga <vargaz@gmail.com>
7094 * icall.c (type_from_typename): Handle 'string'.
7096 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
7097 wrappers into the wrapper_hash, since the key is not a MonoMethod.
7099 2008-07-01 Zoltan Varga <vargaz@gmail.com>
7101 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
7103 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
7104 number of available managed allocator types.
7106 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
7107 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
7109 2008-06-30 Zoltan Varga <vargaz@gmail.com>
7111 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
7112 which is a low level lock protecting just the 'jit_code_hash' hash table.
7114 * domain.c: Initialize+cleanup jit_code_hash_lock.
7116 2008-06-30 Kornél Pál <kornelpal@gmail.com>
7118 * coree.c (mono_load_coree): Set coree_module_handle global variable only
7119 after initialization.
7121 * coree.h: Make MonoFixupExe internal.
7123 Contributed under MIT/X11 license.
7125 2008-06-30 Kornél Pál <kornelpal@gmail.com>
7127 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
7128 because that is platform independent. Check NumberOfRvaAndSizes in PE32
7130 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
7131 image being loaded is a CLI image and _CorValidateImage gets called.
7133 * coree.h: Add MonoLoadImage.
7135 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
7136 instead of LoadLibrary.
7138 Contributed under MIT/X11 license.
7140 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
7142 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
7143 for any primitive type.
7145 2008-06-29 Zoltan Varga <vargaz@gmail.com>
7147 * object.c (mono_array_new_specific): Optimize this and the other allocation
7150 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
7151 domains too if mono_dont_free_domains is set.
7153 * domain-internals.h (mono_dont_free_domains): New internal option controlling
7154 whenever to free appdomain data after it has been unloaded.
7156 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
7158 2008-06-28 Zoltan Varga <vargaz@gmail.com>
7160 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
7161 (mono_method_get_equivalent_method): Fix a warning.
7163 * object.c (mono_message_init): Avoid looking up array types for each call.
7165 2008-06-27 Zoltan Varga <vargaz@gmail.com>
7167 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
7170 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
7173 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
7176 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
7179 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
7181 * object.c (mono_value_box): Fix boxing of nullables.
7183 2008-06-26 Kornél Pál <kornelpal@gmail.com>
7185 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
7186 mono_module_handle that is defined by the linker; no initialization required.
7187 * coree.h: Remove mono_module_handle, add __ImageBase, update
7188 mono_image_open_from_module_handle.
7189 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
7190 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
7191 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
7192 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
7193 to 4 GB away from image base address. IA64 version is not tested but was very
7194 easy to implement and should work if we ever need it.
7195 * domain.c (mono_init_internal): Avoid system error message boxes.
7196 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
7197 with has_entry_point. Handle do_mono_image_load fauilre correctly.
7198 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
7199 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
7200 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
7202 Contributed under MIT/X11 license.
7204 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7206 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
7207 as part of the private mono API.
7209 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
7210 Do proper argument checking for methods that belong to generic classes.
7211 Do proper type resolution for GMFH/2.
7214 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7216 * verify.c (do_switch): Fix a memory corruption bug with
7217 the jump index is out of bound.
7219 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7221 * verify.c: Disable debug code.
7223 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
7225 * reflection.c (mono_image_get_methodbuilder_token): Use
7226 mono_image_get_methodspec_token_for_generic_method_definition
7227 instead of mono_image_get_memberref_token. We cache more memberef
7230 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7232 * verify.c: Inflate exception clause types.
7235 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7237 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
7240 * reflection.c (mono_image_get_ctorbuilder_token): Same.
7242 * reflection.c (mono_image_create_method_token): Same.
7244 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
7246 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
7247 It does the same as mono_image_get_methodref_token but works on
7250 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
7251 and always generate a methodspec. This follows the old behavior and fixes
7252 the regressions in System.Core.
7254 2008-06-24 Zoltan Varga <vargaz@gmail.com>
7256 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
7257 don't event mono_class_get () succeeds. Fixes #402182.
7259 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
7261 * metadata-internals.h: Added MonoDynamicImage::methodspec
7262 hashtable to store methodspec tokens created for MethodBuilders.
7264 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
7265 MethodBuilders as open instantiations if a methodspec was requested.
7267 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
7269 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
7271 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
7275 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
7277 * loader.c (method_from_methodspec): Avoid crashing if the
7278 method lookup fails.
7280 2008-06-20 Dick Porter <dick@ximian.com>
7282 * socket-io.c (get_socket_assembly): Cope with Moonlight network
7283 classes being in a different assembly. Fixes bug 399184.
7285 2008-06-20 Zoltan Varga <vargaz@gmail.com>
7287 * loader.c (mono_loader_init): Make this callable multiple times.
7288 (mono_dllmap_insert): Call mono_loader_init () so this works even before
7289 the runtime is initialized. Fixes #401755.
7291 2008-06-19 Dick Porter <dick@ximian.com>
7293 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
7296 2008-06-19 Dick Porter <dick@ximian.com>
7299 * icall-def.h: Implement Socket generic Send() and Receive()
7300 methods. Fixes bug 395168.
7302 2008-06-19 Kornél Pál <kornelpal@gmail.com>
7304 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
7306 Contributed under MIT/X11 license.
7308 2008-06-18 Martin Baulig <martin@ximian.com>
7310 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
7311 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
7312 set to 80.0. The debugger <-> runtime interface is now frozen as
7316 (mono_debug_debugger_version): Bump to 4.
7318 2008-06-18 Martin Baulig <martin@ximian.com>
7320 * debug-mono-symfile.c
7321 (load_symfile): Don't check the minor version.
7323 * debug-mono-symfile.h: Bump the version number to 50.0.
7325 2008-06-18 Martin Baulig <martin@ximian.com>
7327 * debug-mono-symfile.c
7328 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
7329 minimum required version.
7331 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
7333 * reflection.c (mono_custom_attrs_from_property): Fix support for
7334 retriveving cattrs of dynamic inflated generic types.
7336 * reflection.c (mono_custom_attrs_from_event): Same.
7338 * reflection.c (mono_custom_attrs_from_field): Same;
7340 * reflection.c (typebuilder_setup_events): Same cattrs of events.
7342 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
7343 Moved to metadata.c.
7345 * metadata.c: New functions to retrive the equivalent field, event
7346 of property from the generic type definition.
7348 * metadata-internals.h: Added new functions from metadata.c.
7350 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
7352 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
7353 to cached in a mempool is used.
7355 * metadata.c (free_generic_class): In some situations field generic_info type
7356 is not properly dup'ed and leads to double free'ing.
7360 2008-06-17 Mark Probst <mark.probst@gmail.com>
7362 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
7363 this arguments (will be needed later for generic methods).
7366 2008-06-17 Mark Probst <mark.probst@gmail.com>
7368 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
7369 Create a static RGCTX invoke wrapper for methods which require it.
7371 2008-06-17 Mark Probst <mark.probst@gmail.com>
7373 * object.c, class-internals.h: New function for checking whether
7374 an individual field is special static.
7376 2008-06-15 Zoltan Varga <vargaz@gmail.com>
7378 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
7379 linear search since the table is sorted.
7381 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
7384 2008-06-14 Zoltan Varga <vargaz@gmail.com>
7386 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
7387 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
7389 * gc.c (mono_domain_finalize): Allow an infinite timeout.
7391 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
7393 * threads.c (mono_thread_request_interruption): Get rid of locking, use
7394 InterlockedCompareExchange to query and modify
7395 thread->interruption_requested.
7397 * object-internals.h (struct _MonoThread): Change interruption_requested
7398 to a gint32 so it can be modified by atomic operations. Add
7399 'critical_region_level' from the managed side, change small_id to a guint32,
7400 add new set of 'unused' fields.
7402 * appdomain.c: Bump corlib version.
7404 2008-06-13 Zoltan Varga <vargaz@gmail.com>
7406 * class.c (mono_class_from_name): Search modules as well. Fixes
7409 2008-06-13 Mark Probst <mark.probst@gmail.com>
7411 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
7412 templates. Templates are generalized with an additional type_argc
7413 argument. RGCTX templates have type_argc==0, MRGCTX templates
7416 * domain-internals.h, domain.c: New hash table for looking up
7419 * metadata.c, metadata-internals.h: Rename hash and equal
7420 functions for MonoGenericInst's and make them public.
7422 * class-internals.h: New data structures for the MRGCTX. Macros
7423 for distinguishing slots in the RGCTX and the MRGCTX.
7425 2008-06-13 Mark Probst <mark.probst@gmail.com>
7427 * object.c (mono_method_get_imt_slot): Put the same methods of
7428 different instantiations of the same generic interface in the same
7429 IMT slots, to make generic sharing simpler.
7431 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7433 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
7435 * metadata.c (mono_metadata_field_info_with_mempool): Added.
7436 This function works just like mono_metadata_field_info, but
7437 accept a mempool as argument to be used allocating memory.
7439 * marshal.c (mono_marshal_load_type_info): Use new function
7440 to load marshal data into image mempool.
7442 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7444 * class.c (mono_class_inflate_generic_type_with_mempool):
7445 This function allows to inflate a generic type using
7448 * class.c (inflate_generic_type): Take a mempool as argument
7449 and use it to do type dup'ing.
7451 * class.c (mono_class_setup_fields): Field type for generic
7452 generic classes are allocated from the image mempool.
7454 * metadata.c (free_generic_class): Inflated field type is
7455 now allocated in the image mempool.
7457 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
7459 * threads.c (thread_cleanup): Free MonoThread::name.
7461 2008-06-12 Marek Habersack <mhabersack@novell.com>
7463 * appdomain.c (ensure_directory_exists): avoid unnecessary
7464 mkdir(2) calls when the shadow directory already exists.
7465 (mono_make_shadow_copy): copy also satellite assemblies from the
7466 private bin directories.
7468 2008-06-11 Zoltan Varga <vargaz@gmail.com>
7470 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
7472 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
7473 a page boundary. Fixes #396219.
7475 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7477 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
7478 due to double-checked locking.
7480 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7482 * assembly.c (build_assembly_name): Release memory on failure.
7484 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
7486 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7488 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
7491 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7493 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
7496 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7498 * loader.c (field_from_memberref): Check if field signature type is equal
7499 to the non-inflated type of the field. Fixes #398980.
7501 2008-06-11 Zoltan Varga <vargaz@gmail.com>
7503 * assembly.c (mono_assembly_load_from_full): Call
7504 mono_assembly_load_friends () outside the assemblies lock, since it can
7505 acquire the loader lock. Fixes #323696.
7507 * reflection.c (resolve_object): Inflate the inst with the context for
7508 FieldOnTypeBuilderInst. Fixes #399010.
7510 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7512 * reflection.c (mono_image_get_field_on_inst_token): Don't
7513 inflate the field to encode it's signature. If it's a
7514 VAR or MVAR it should stay that way in the signature.
7517 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7519 * reflection.c (resolve_object): Release memory of inflated types.
7521 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7523 * loader.c (mono_method_get_signature_full): Remove assert about
7524 loading a methodspec to a generic method. We have such methods, such as
7525 System.Threading.Interlocked::CompareExchange<T>.
7526 This assert was removed since it crashes the verifier when it checks
7527 methods calling CompareExchange<T>.
7529 2008-06-10 Marek Safar <marek.safar@gmail.com>
7531 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
7532 of Type array and not MonoType.
7534 2008-06-10 Marek Habersack <mhabersack@novell.com>
7536 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
7539 2008-06-10 Martin Baulig <martin@ximian.com>
7541 * debug-mono-symfile.h
7542 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
7543 changes to the file format, but we were generating incorrect
7544 source file indices in the line number table due to a bug, which
7545 made backtraces report an incorrect source file.
7547 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
7549 * mono-debug.c: Moved mono_debug_free_method_jit_info from
7550 mini/debug-mini.c to here.
7552 * mono-debug.c (il_offset_from_address): Free memory from find_method.
7554 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
7555 use it to release structs returned by mono_debug_find_method.
7557 2008-06-10 Zoltan Varga <vargaz@gmail.com>
7559 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
7560 since it needs to set method->slot for all interface methods.
7562 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7564 * class-internals.h: Forgot to add.
7566 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7568 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
7570 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
7571 Lookup the custom attributes from property_hash.
7573 * reflection.c (mono_save_custom_attrs): Save the custom attributes
7574 in property_hash. Allocate all data using the image mempool.
7576 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
7577 for dynamic_custom_attrs to checks if the image is dynamic.
7579 2008-06-09 Zoltan Varga <vargaz@gmail.com>
7581 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
7584 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
7585 runtime functions while holding the domain assemblies lock.
7587 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7589 * verify.c: Reapplied the last bit of the reverted changes.
7591 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
7593 * verify.c: Reapplied more of the reverted changes.
7595 2008-06-09 Martin Baulig <martin@ximian.com>
7597 * debug-mono-symfile.c (load_symfile): Check the major version
7598 first; if it's wrong, don't print the minor version in the error message.
7600 2008-06-09 Zoltan Varga <vargaz@gmail.com>
7602 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
7603 lock instead of the domain lock to avoid deadlocks, since the thread might
7604 already hold the loader lock.
7606 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
7607 (mono_thread_attach): Ditto.
7609 * monitor.c: Use a TLS variable for holding the current thread id instead
7610 of calling pthread_self ().
7611 (mono_monitor_init_tls): New internal function to initialize the TLS
7613 (mono_monitor_try_enter_internal): Put the owner == id check after the
7616 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
7617 missed optimizations when using gcc-4.3.
7619 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
7621 * reflection.c (mono_dynamic_image_free): Free the memory
7622 used by MonoGenericParam in MonoDynamicImage::gen_param.
7624 * reflection.c (mono_reflection_setup_generic_class): Allocate
7625 container from mempool.
7627 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
7628 container from mempool.
7630 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7632 * threads.c (mono_set_pending_exception): New internal function to set the
7633 pending exception of the current thread.
7634 (mono_thread_get_and_clear_pending_exception): Check for
7635 thread->pending_exception as well.
7637 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
7639 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
7640 it can trigger a collection.
7642 2008-06-06 Martin Baulig <martin@ximian.com>
7644 Merged the `debugger-kahalo' branch.
7647 (MONO_DEBUGGER_VERSION): Bumped to 72.
7649 * debug-mono-symfile.h
7650 (MonoSymbolFileMethodIndexEntry): Removed.
7651 (MonoSymbolFileMethodEntry): New public typedef.
7652 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
7653 (MonoSymbolFileSourceEntry): Remove everything except `index' and
7655 (MonoSymbolFileMethodEntry): Removed.
7656 (MonoSymbolFileLexicalBlockEntry): Removed.
7657 (MonoSymbolFileLineNumberEntry): Removed.
7658 (MonoDebugLexicalBlockEntry): Removed.
7659 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
7660 removed `num_il_offsets' and `il_offsets'.
7661 (MonoSymbolFile): Replace `version' with `major_version' and
7663 (MONO_SYMBOL_FILE_VERSION): Replace with
7664 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
7665 `MONO_SYMBOL_FILE_MINOR_VERSION'.
7667 * debug-mono-symfile.c
7668 (mono_debug_symfile_lookup_location): Add support for the new line
7669 number table format.
7671 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7673 * metadata.c (free_generic_class): Release the inflated
7674 MonoClass of dynamic generic classes if it's not a generic
7677 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7679 * verify.c: Reapplied more of the reverted changes.
7681 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7683 * reflection.c (lookup_custom_attr): Clean the cached flag or
7684 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
7687 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
7689 * verify.c: Reapplied a small part of the reverted changes.
7691 2008-06-07 Zoltan Varga <vargaz@gmail.com>
7693 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7695 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
7696 previously in managed code.
7697 (mono_monitor_exit): Ditto.
7698 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
7700 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
7701 the managed definition.
7703 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7705 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
7707 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7709 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
7711 * monitor.c: Add some micro optimizations.
7713 * icall.c (type_from_typename): Handle 'bool'.
7715 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
7717 * verify.c: Implement constructor verification per P III 1.8.1.4.
7720 2008-06-06 Zoltan Varga <vargaz@gmail.com>
7722 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
7723 holding the assemblies lock here too.
7725 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7727 * verify.c: Kill stack_top function.
7729 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7731 * verify.c: Kill stack_get function.
7733 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7735 * verify.c (mono_method_verify): Last change broke the build. Fixed.
7737 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
7739 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
7742 * verify.c (mono_method_verify): Inflate params and locals to avoid
7743 mismatch when checking for compatibility.
7745 2008-06-05 Jonathan Chambers <joncham@gmail.com>
7747 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
7748 Length prefix should be size in bytes. Fix bug #339530.
7750 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
7751 Length prefix should be size in bytes. Fix bug #339530.
7753 Code is contributed under MIT/X11 license.
7755 2008-06-05 Bill Holmes <billholmes54@gmail.com>
7757 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
7759 Contributed under MIT/X11 license.
7761 2008-06-05 Martin Baulig <martin@ximian.com>
7763 * mono-debug-debugger.c
7764 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
7766 2008-06-05 Zoltan Varga <vargaz@gmail.com>
7768 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
7769 while holding the assemblies lock to prevent deadlocks. Handle the case
7770 where the search hook returns NULL but the assembly was still loaded.
7773 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
7774 modify domain state.
7776 2008-06-05 Andreas Färber <andreas.faerber@web.de>
7778 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
7779 * Makefile.am (pedump_LDADD): Post-process object files and
7780 add dtrace-generated object file, if necessary.
7782 Code is contributed under MIT/X11 license.
7784 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7786 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
7788 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7790 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
7792 2008-06-04 Mark Probst <mark.probst@gmail.com>
7794 * threads.c: Try to free everything from the delayed free table
7795 when shutting down threads, and set the variable to NULL after the
7796 table is freed so that calling
7797 mono_thread_hazardous_try_free_all() when shutting down the root
7798 domain doesn't crash.
7800 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
7802 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
7803 the caller if resulting type was inflated.
7805 * class.c (mono_class_create_from_typespec): Free the MonoType if it
7808 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
7811 2008-06-04 Zoltan Varga <vargaz@gmail.com>
7813 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
7814 class library tests.
7816 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
7817 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
7820 2008-06-04 Mark Probst <mark.probst@gmail.com>
7822 * domain.c, domain-internals.h: The JIT infos are now freed by the
7823 JIT info table code. They are freed immediately if there only a
7824 single JIT info table in circulation. If there is more, the free
7825 is delayed via a queue.
7827 * threads.c, threads-types.h: New hazard pointer function for
7828 freeing all freeable delayed items in one sitting.
7830 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7832 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
7834 * reflection.c (typebuilder_setup_properties): Same.
7836 * reflection.c (typebuilder_setup_events): Same.
7838 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7840 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
7841 and use it for allocating memory.
7843 * reflection.c (mono_marshal_spec_from_builder): Same.
7845 * reflection.c: Change code to use new signatures.
7847 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
7849 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7851 * decimal.c (rescale128): Put back one line which was accidently commented
7854 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
7857 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7859 * reflection.c (mono_reflection_generic_class_initialize): Name must
7860 be always malloc'ed so we can free it later on. Do this for field, property
7863 * metadata.c (free_generic_class): Free field, property and event names.
7865 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7867 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
7868 instead of g_memdup.
7870 * reflection.c (typebuilder_setup_fields): Same.
7872 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7874 * decimal.c (rescale128): Optimize this function a bit more.
7876 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7878 * metadata.c (free_generic_class): Release some memory from
7879 SRE generic classes.
7881 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
7883 * reflection.c (mono_image_get_generic_field_token): No reference
7884 to name is kept, free it.
7886 * reflection.c (mono_reflection_generic_class_initialize): Free
7887 more memory of the inflated field.
7889 2008-06-03 Zoltan Varga <vargaz@gmail.com>
7891 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
7894 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
7896 * reflection.c (mono_dynamic_image_free): Release memory used by
7897 MonoDynamicImage::array_methods elements.
7899 * reflection.c (assembly_add_win32_resources): Release memory after
7902 2008-06-02 Zoltan Varga <vargaz@gmail.com>
7904 * decimal.c (log2_32): Use an optimized version for this function too.
7906 * decimal.c (log2_64): Fix this on 32 bit machines.
7908 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
7910 * class.c (mono_dup_array_type): Implement allocation using a mempool.
7912 * class.c (mono_metadata_signature_deep_dup): Same.
7914 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
7917 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
7919 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
7921 * metadata-internals.h: Added mono_metadata_signature_dup_full.
7923 * class-internals.h: Update signatures to take a MonoMemPool.
7925 2008-06-02 Dick Porter <dick@ximian.com>
7927 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
7929 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
7930 FormatMessage API to get the error text. Fixes bug 321827.
7932 2008-06-02 Zoltan Varga <vargaz@gmail.com>
7934 * decimal.c: Add some micro optimizations to make decimal operations faster.
7936 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
7938 * reflection.c (method_encode_clauses): Take a mempool
7939 as parameter and use it to allocate the clause array.
7941 * reflection.c (mono_image_get_field_on_inst_token): Free
7942 the inflated type after encoding it.
7944 * reflection.c (mono_dynamic_image_free): Free each element
7945 of MonoDynamicImage::gen_params.
7947 * reflection.c (reflection_methodbuilder_to_mono_method):
7948 Allocate the generic param array from the mempool.
7949 Allocate signature params from the mempool.
7951 * reflection.c (mono_reflection_generic_class_initialize):
7952 Free inflated fields after been used.
7954 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
7956 * icall.c: Reapply the memory leak fixes as they no
7957 longer make mono crash.
7959 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
7961 * reflection.c (mono_type_get_object): Don't store the suplied
7962 MonoType with type_hash. A caller which pass a type that
7963 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
7964 might end with a pointer to freed memory.
7965 The solution is to use byval_arg or this_arg from the associated
7966 MonoClass of the supplied type.
7968 2008-05-29 Zoltan Varga <vargaz@gmail.com>
7970 * icall.c: Revert the rest of the last change as it breaks the build too.
7972 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7974 * icall.c: Revert a leak fix as it's breaking the build.
7976 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7978 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
7980 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7982 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
7984 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
7986 * icall.c: Fix some memory leaks.
7988 2008-05-29 Dick Porter <dick@ximian.com>
7990 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
7991 async socket operations from the pending list when a socket
7992 closes. Leaving it until the threadpool services the event
7993 exposes a race condition when a socket descriptor is reused.
7996 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
7998 * object.c: Fix negative index check for array alocation.
8000 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8002 * icall.c, marshal.c: Delegate wrappers should skip visibility.
8003 This check is performed by the verifier for IL created delegates
8004 and by Delegate::CreateDelegate for programatically created ones.
8007 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8009 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
8010 Fix code to use mono_array_size_t instead of int.
8012 Based on patch by Luis F. Ortiz.
8013 Contributed under X11 license.
8014 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8016 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8018 * icall.c: Added ves_icall_System_Array_GetLongLength and
8019 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
8022 * icall.h: Export both new functions.
8024 Based on patch by Luis F. Ortiz.
8025 Contributed under X11 license.
8026 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8028 2008-05-28 Martin Baulig <martin@ximian.com>
8030 The debugger now requires exactly r103463.
8032 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
8033 This version is not supported by the debugger, wait for 72.
8035 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8037 * object.h: Changed array related functions to use
8038 mono_array_size_t instead of guint32. Forgot to commit this file.
8040 Patch by Luis F. Ortiz.
8041 Contributed under X11 license.
8042 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8045 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
8047 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
8048 don't define it. Use the number literal instead.
8050 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8052 * icall.c: Changed array related functions to use
8053 mono_array_size_t instead of guint32.
8055 * icall.c (ves_icall_System_Array_GetLength): Check for length
8056 overflow under MONO_BIG_ARRAYS.
8058 Based on patch by Luis F. Ortiz.
8059 Contributed under X11 license.
8060 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8062 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8064 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
8066 Based on patch by Luis F. Ortiz.
8067 Contributed under X11 license.
8068 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8070 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8072 * object.c, object.h: Changed array related functions to use
8073 mono_array_size_t instead of guint32.
8075 Patch by Luis F. Ortiz.
8076 Contributed under X11 license.
8077 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8079 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
8081 * object.h: Introduced mono_array_size_t typedef. This must be used
8082 in all places an array length is expected. This is 64bits wide if
8083 MONO_BIG_ARRAYS is enabled.
8085 Patch by Luis F. Ortiz.
8086 Contributed under X11 license.
8087 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
8089 2008-05-27 Zoltan Varga <vargaz@gmail.com>
8091 * security-manager.c class.c: Set the class exception info by calling
8092 mono_class_set_failure ().
8094 * class.c (mono_class_get_exception_data): New accessor function.
8095 (mono_class_set_failure): Store exception_data in the property hash.
8097 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
8098 the struct as a property.
8100 * loader.c (mono_get_method_full): Store the lookup result for method
8101 tokens in method_cache, the others in methodref_cache to decrease the memory
8102 usage of hash tables.
8104 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
8105 (mono_image_init): method_cache is lazy inited now.
8107 * metadata-internals.h (struct _MonoImage): Change method_cache to
8108 a MonoValueHashTable, add a separate methodref_cache.
8110 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
8112 * number-formatter.h: Fix tables to avoid arithemtic overflow in
8113 Double.ToString as exposed by Bug #383531.
8115 2008-05-26 Zoltan Varga <vargaz@gmail.com>
8117 * number-formatter.h: Make some tables static.
8119 * class.c (mono_method_set_generic_container): New accessor function.
8120 (mono_method_get_generic_container): Ditto.
8122 * class-internals.h (struct _MonoMethod): Remove rarely used
8123 'generic_container' field, store it in the property hash instead. Add
8124 'is_generic' boolean field instead.
8126 * image.c (mono_image_init): Initialize property_hash.
8127 (mono_image_close): Destroy property_hash.
8129 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
8130 hold rarely used fields of runtime structures belonging to this image.
8132 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
8133 to get/set method->generic_container.
8135 * loader.c (mono_get_method_from_token): Avoid loading the method header for
8138 2008-05-25 Zoltan Varga <vargaz@gmail.com>
8140 * class.c (mono_class_inflate_generic_method_full): Don't increase
8141 mono_stats.inflated_method_count for methods found in the cache.
8143 * threads.c (mono_thread_request_interruption): Add a comment about
8146 2008-05-24 Zoltan Varga <vargaz@gmail.com>
8148 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
8149 interface_offsets_packed table.
8151 * class.c (mono_class_init): Remove some dead code.
8153 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
8154 mono_class_setup_vtable () when CAS is active to detect security problems.
8156 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
8158 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
8160 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
8161 parameters as it's irrelevant for delegate checking.
8163 2008-05-23 Zoltan Varga <vargaz@gmail.com>
8165 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
8167 * class.c (mono_class_init): Control the creation of a generic vtable using
8168 a global which is true by default, but set to false by the runtime startup code.
8170 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
8171 Disabled for now since it breaks the embedding API.
8172 Move the setup of class->methods for arrays to mono_class_setup_methods ().
8173 (mono_class_setup_methods): Add a memory barrier.
8175 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
8176 when mono_class_init () doesn't compute the generic vtable.
8178 2008-05-23 Massimiliano Mantione <massi@ximian.com>
8179 * profiler.c: Added mono_profiler_install_statistical_call_chain,
8180 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
8181 to support call chains (backtrace) in the stat profiler.
8182 * profiler.c, profiler-private.h: Likewise.
8184 2008-05-22 Mark Probst <mark.probst@gmail.com>
8186 * generic-sharing.c: Init generic class when a method of it is
8187 requested via a runtime generic context.
8189 2008-05-22 Zoltan Varga <vargaz@gmail.com>
8191 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
8193 * reflection.c (mono_type_get_object): Add a FIXME.
8195 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
8197 * class.c (mono_class_get_method_by_index): New helper function, returning an
8198 entry in the class->methods array.
8200 2008-05-21 Zoltan Varga <vargaz@gmail.com>
8202 * class.c (mono_class_init): Only do the array optimization for szarrays.
8203 Avoid creating a generic vtable for generic instances as well.
8204 (mono_class_get_method_from_name_flags): Don't search in the metadata for
8207 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
8209 * loader.c (mono_get_method_constrained): Inflate the signature
8210 with class context. Fix #325283.
8212 2008-05-21 Zoltan Varga <vargaz@gmail.com>
8214 * object.c (mono_class_create_runtime_vtable): Add a comment.
8216 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
8218 (setup_interface_offsets): Handle the case when this is called twice for arrays.
8219 (mono_class_setup_vtable_general): Add an assert.
8220 (mono_class_init): Avoid creating a generic vtable for arrays.
8222 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
8223 here, let mono_class_init () do that.
8225 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
8226 interfaces in mscorlib.
8228 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
8229 interfaces. Add some comments.
8230 (mono_class_init): Call mono_class_setup_methods () here since it is no
8231 longer called by mono_class_setup_vtable ().
8233 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
8234 not set in class->vtable.
8235 (mono_class_create_runtime_vtable): Reenable the disabled code.
8237 * object.c (mono_class_create_runtime_vtable): Disable the last change for
8238 now as it causes some test failures.
8240 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
8241 if using the vtable trampoline. Also remove some strange code which put the
8242 generic methods themselves into the vtable slots. Remove the AOT init_vtable
8243 stuff as it is no longer needed.
8245 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
8247 * pedump.c: Give make --verify all option check code as well.
8248 Using --verify code won't check for metadata now.
8250 2008-05-19 Martin Baulig <martin@ximian.com>
8252 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
8255 (_mono_debug_using_mono_debugger): New global variable; it's set
8256 directly by the debugger, so mono_debug_using_mono_debugger() also
8257 works after attaching.
8259 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
8261 * object.c (mono_class_create_runtime_vtable): Use memory barriers
8262 as we do double checked locking on MonoClass::runtime_info and
8263 MonoClassRuntimeInfo::domain_vtables.
8265 2008-05-18 Zoltan Varga <vargaz@gmail.com>
8267 * debug-helpers.c (print_field_value): Fix a warning.
8269 2008-05-16 Zoltan Varga <vargaz@gmail.com>
8271 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
8272 set in the AOT case.
8274 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
8276 * class.c (mono_class_setup_vtable_general): Use memory barriers
8277 as we do double checked locking on MonoClass::vtable.
8279 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
8281 * reflection.c (resolve_object): Inflate only if the generic context
8282 is not null. Fixes #389886.
8284 2008-05-15 Jonathan Chambers <joncham@gmail.com>
8286 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
8289 Code is contributed under MIT/X11 license.
8291 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8293 * class.c: Revert unrelated change.
8295 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8297 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
8298 a generic instantiation, use mono_class_from_mono_type instead of playing
8299 with MonoType directly.
8301 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
8303 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
8304 checks must ignore generic instantiations, so mono_class_has_parent is not
8305 suitable. Fixes #390128.
8307 2008-05-14 Zoltan Varga <vargaz@gmail.com>
8309 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
8310 it to avoid registering tokens during metadata generation. Fixes #390023.
8312 2008-05-14 Kornél Pál <kornelpal@gmail.com>
8314 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
8317 Contributed under MIT/X11 license.
8319 2008-05-14 Kornél Pál <kornelpal@gmail.com>
8321 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
8322 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
8323 to fixup the EXE image.
8324 (mono_cleanup): Use mono_close_exe_image.
8325 (mono_close_exe_image): New function.
8326 * image.c: Include "marshal.h".
8327 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
8328 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
8329 counting when the image is loaded outside of mono_image_open_full. Set status
8330 based on GetLastError.
8331 * coree.c: Include required headers. Add init_from_coree.
8332 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
8333 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
8334 (_CorExeMain): Set init_from_coree.
8335 (CorExitProcess): Only call ExitProcess for now.
8336 (CorBindToRuntimeEx): New stub implementation.
8337 (CorBindToRuntime): New function.
8338 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
8339 (MonoFixupExe): ILONLY executables require no fixups.
8340 (mono_set_act_ctx): New function to set activation context.
8341 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
8342 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
8343 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
8344 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
8346 * domain-internals.h: Add mono_close_exe_image.
8348 Contributed under MIT/X11 license.
8350 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
8352 * metadata.c (mono_metadata_compute_size): Correctly calculate field
8353 size for generic param and event tables. Fixes #388977.
8355 2008-05-13 Zoltan Varga <vargaz@gmail.com>
8357 * loader.c (mono_method_signature): Use memory barriers because of the double
8358 checked locking pattern.
8360 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
8361 aborting or aborted as well. Fixes #376391.
8363 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
8364 existing runtime state in the Suspend handler during shutdown.
8366 2008-05-12 Zoltan Varga <vargaz@gmail.com>
8368 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
8370 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
8371 which are starting up or shutting down.
8373 * threads.c (mono_threads_set_shutting_down): Don't return a value since
8374 this function never returns if the runtime is already shutting down.
8376 * icall.c (ves_icall_System_Environment_Exit): Update after
8377 mono_threads_set_shutting_down () signature change.
8379 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
8381 * class.c: Added can_access_instantiation to verify if the instantiation
8382 is visible. Fix access check for nested types as they returned TRUE
8383 before doing type and generic instantiation visibility checks.
8385 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
8387 * reflection.c (mono_reflection_create_generic_class): The created type
8388 must have a different container from its TypeBuilder. Otherwise they
8389 will end sharing generic arguments, which is wrong.
8391 Due to the sharing, making a generic instance of the created type using
8392 the TypeBuider generic arguments resulted in the generic type definition
8393 been returned, which is wrong as well.
8395 As a bonus the code was leaking the type_params array. This memory should
8396 be allocated from the image mempool.
8398 This fixes bug #354047.
8400 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
8402 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
8403 to here as they are now used in assembly.c new code.
8404 Added a skipverification flag to MonoAssembly.
8405 New internal function mono_assembly_has_skip_verification.
8407 * assembly.c: New function mono_assembly_has_skip_verification. It checks
8408 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
8411 2008-05-07 Zoltan Varga <vargaz@gmail.com>
8413 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
8414 needed. Fixes #387034.
8416 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
8418 2008-05-06 Miguel de Icaza <miguel@novell.com>
8420 * assembly.c (mono_assembly_load_reference): Prevent crash while
8421 disassembling Silverlight 2.0 executables while we still do not
8422 have GACed libraries.
8424 2008-05-07 Zoltan Varga <vargaz@gmail.com>
8426 * reflection.c: Special case generic type definitions as well. Fixes #383444.
8428 2008-05-06 Zoltan Varga <vargaz@gmail.com>
8430 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
8431 of the dynamic case. Fixes #387404.
8433 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8435 *verify.c (mono_verifier_is_class_full_trust): If under
8436 verify_all and the verifier mode was not set, only
8437 gac and corlib types are fulltrust. This makes --verify-all
8438 usable to detect unverifiable code, which is the expected
8441 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8443 * verify.h: Ops, commited the header with debug
8446 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
8448 * verify.c (merge_stack): Use the new value on unverifiable
8451 * verify.c (verify_type_compatibility_full): Comparison
8452 of nullable types can't use mono_class_is_assignable_from.
8454 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
8455 that makes all verification errors be reported.
8457 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
8460 2008-05-05 Robert Jordan <robertj@gmx.net>
8462 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
8463 support for value types. See #386415.
8465 * object.c: comments.
8467 Code is contributed under MIT/X11 license.
8469 2008-05-05 Martin Baulig <martin@ximian.com>
8471 * debug-mono-symfile.h
8472 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
8473 for old pre-terrania symbol files.
8475 2008-05-05 Andreas Färber <andreas.faerber@web.de>
8477 * mono-config.c: Add ppc64 architecture.
8479 Code is contributed under MIT/X11 license.
8481 2008-05-05 Andreas Färber <andreas.faerber@web.de>
8483 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
8484 PPC64 uses function descriptors as well.
8486 Code is contributed under MIT/X11 license.
8488 2008-05-04 Zoltan Varga <vargaz@gmail.com>
8490 * object.c (compute_class_bitmap): Ignore literal static fields.
8492 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
8493 var has an invalid format.
8494 (describe_ptr): Add some sanity checks for the vtable.
8495 (add_nursery_frag): Clear unused nursery fragments.
8496 (major_collection): Clear all remaining nursery fragments.
8498 2008-05-03 Robert Jordan <robertj@gmx.net>
8500 * image.c, metadata-internals.h: add thunk_invoke_cache.
8502 * marshal.c, marshal.h: implement
8503 mono_marshal_get_thunk_invoke_wrapper ().
8505 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
8507 Code is contributed under MIT/X11 license.
8509 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
8511 * verify.c (do_leave): Empty the stack.
8513 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
8515 * class.c (mono_class_is_assignable_from): Variance
8516 doesn't work between reference and value types. For example,
8517 given type C<T+>, C<int32> is not assignable to C<object>.
8518 Break the argument checking loop on first error.
8520 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
8522 * icall.c : base64_to_byte_array() needs some more strict
8523 check for sequence of '=' characters. Patch by Santa
8524 Marta (http://deee.g.hatena.ne.jp/santamarta).
8526 Contributed under MIT/X11 license.
8527 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
8529 2008-05-02 Jonathan Chambers <joncham@gmail.com>
8531 * domain.c: Disable LoadLibrary support to fix Win32 build.
8533 Code is contributed under MIT/X11 license.
8535 2008-05-02 Zoltan Varga <vargaz@gmail.com>
8537 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
8538 to help with cache behaviour.
8540 2008-05-01 Miguel de Icaza <miguel@novell.com>
8542 * appdomain.c (mono_domain_from_appdomain): Add new accessor
8545 2008-05-01 Zoltan Varga <vargaz@gmail.com>
8547 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
8549 2008-05-01 Dick Porter <dick@ximian.com>
8551 * process.c (process_get_fileversion): Only pass 16 bits of
8552 language ID to VerLanguageName. Fixes bug 381204.
8554 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
8556 * verify.c (mono_method_verify): Fix the comparison
8557 operator for code bounds check.
8559 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
8561 * verify.c (mono_method_verify): Check the bounds of
8562 all access of the code array.
8564 2008-04-29 Kornél Pál <kornelpal@gmail.com>
8566 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
8568 2008-04-28 Zoltan Varga <vargaz@gmail.com>
8570 * image.c (mono_image_strong_name_position): Fix return value when the rva is
8573 2008-04-28 Kornél Pál <kornelpal@gmail.com>
8575 * loader.c (mono_get_method_from_token, mono_method_signature): Add
8576 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
8577 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
8578 fixup main EXE images when using mono.exe for mixed-mode assembly support.
8579 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
8581 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
8582 runtime initialization from metadata.
8583 * assembly.c: Remove obsolete ceGetModuleFileNameA.
8584 (mono_set_rootdir): Use mono_get_module_file_name.
8585 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
8587 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
8588 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
8589 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
8590 MonoCLIImageInfo. Add support for module handles.
8591 (load_cli_header): Update mono_cli_rva_image_map signature.
8592 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
8593 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
8594 (mono_image_rva_map): Add support for module handles.
8595 (mono_image_ensure_section_idx): Add support for module handles.
8596 (mono_image_close): Add support for module handles.
8597 (do_load_header): Add support for module handles.
8598 (mono_image_open_from_module_handle): New function for internal use.
8599 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
8600 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
8601 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
8603 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
8604 * image.h: Add mono_image_fixup_vtable.
8605 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
8607 * coree.h: New file.
8608 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
8609 unsupported native code.
8610 (mono_marshal_set_callconv_from_modopt): New function splitted from
8611 mono_marshal_get_managed_wrapper.
8612 (mono_marshal_get_managed_wrapper): Use
8613 mono_marshal_set_callconv_from_modopt.
8614 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
8615 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
8616 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
8617 that results in a deadlock when the runtime is loaded in _CorDllMain.
8618 * Makefile.am: Add coree.c and coree.h.
8620 Contributed under MIT/X11 license.
8622 2008-04-28 Mark Probst <mark.probst@gmail.com>
8624 * generic-sharing.c: Search for type arguments in array element
8627 2008-04-28 Mark Probst <mark.probst@gmail.com>
8629 * class-internals.h, generic-sharing.c: New, small runtime generic context.
8631 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
8633 * object.c: Don't setup the RGCTX when the vtable is created,
8634 because we're setting it up lazily now.
8636 2008-04-26 Zoltan Varga <vargaz@gmail.com>
8638 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
8641 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8643 * verify.c (verify_class_for_overlapping_reference_fields):
8644 If class is under fulltrust allow reference types to overllap
8645 if they have the same RVA.
8647 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
8649 * pedump.c: Added new flag valid-only, that makes the verifier
8650 behaves just like --security=validil. It won't fail type load
8651 due to unverifiable restrictions.
8653 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8655 * class-internals.h (struct MonoMethod): Added a verification_success
8656 field to cache verifier executions. Reduced MonoMethod:slot size by
8659 2008-04-23 Zoltan Varga <vargaz@gmail.com>
8661 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
8662 instead of a 'vt' argument to save an indirection and to allow these to be used
8664 (scan_vtype): New helper function to scan an area using a gc descriptor.
8665 (mono_gc_wbarrier_value_copy): Implement this.
8666 (handle_remset): Add support for REMSET_VTYPE.
8667 (find_in_remset_loc): Ditto.
8668 (mono_gc_base_init): Allow some debugging options to be controlled through the
8669 use of the MONO_GC_DEBUG env variable.
8670 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
8671 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
8673 2008-04-23 Martin Baulig <martin@ximian.com>
8675 * domain.c (mono_domain_create): Move the call to
8676 mono_debug_domain_create() down, after allocating the domain id.
8678 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
8680 verify.c (verify_class_for_overlapping_reference_fields): Skip
8681 static fields while verifying for overlapping fields as they
8682 don't matter at all.
8684 2008-04-23 Marek Habersack <mhabersack@novell.com>
8686 * domain-internals.h: added a declaration of
8687 mono_make_shadow_copy.
8689 * assembly.c (mono_assembly_open_full): shadow copying of
8690 assemblies moved to here, so that all the assemblies within the
8691 application domain's private binary directories can be
8692 processed. Fixes bug #380546
8694 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
8695 mono_make_shadow_copy and made non-static. The decision whether
8696 to shadow-copy an assembly is made based on its location - it's
8697 copied if it's in one of the private application domain binary
8698 directories and its different to the target file in the shadow
8699 directory. Fixes bug #380546
8701 2008-04-22 Zoltan Varga <vargaz@gmail.com>
8703 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
8705 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
8708 * reflection.c (mono_image_create_token): Handle
8709 Method/ConstructorOnTypeBuilderInst.
8710 (resolve_object): Ditto.
8711 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
8712 so it can be called from resolve_object. Also handle the case when the inflated
8713 class already has its methods setup.
8715 2008-04-21 Martin Baulig <martin@ximian.com>
8717 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
8719 2008-04-20 Geoff Norton <gnorton@novell.com>
8721 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
8722 pointer dereference.
8724 2008-04-15 Marek Habersack <mhabersack@novell.com>
8726 * appdomain.c (try_load_from): if IOMAP is in effect, call the
8727 portability API to look up the assembly file. Fixes behavior in
8728 situations when the application has a bin/ directory, but the
8729 assembly search patch refers to Bin/ (and thus the requested file
8730 name is Bin/SomeLibrary.dll). Fixes bug #379888
8732 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
8734 verify.c (mono_type_is_generic_argument): Extracted this check
8735 from a dozen places to here.
8737 verify.c: Fixed all issues related to boxing generic arguments
8738 and their constraints.
8740 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
8742 verify.c (mono_class_interface_implements_interface): Fix win32 build.
8744 2008-04-14 Zoltan Varga <vargaz@gmail.com>
8746 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
8747 isn't finished yet. Fixes #363447.
8749 2008-04-13 Zoltan Varga <vargaz@gmail.com>
8751 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
8754 2008-04-13 Jb Evain <jbevain@novell.com>
8756 * domain.c: update the 2.1 profile versions.
8757 Merged from the Moonlight 2 branch.
8759 2008-04-12 Zoltan Varga <vargaz@gmail.com>
8761 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
8762 mscorlibs for the non-refonly case as well.
8764 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
8765 in mono_assembly_load_from_full (). Fixes #378924.
8767 2008-04-11 Geoff Norton <gnorton@novell.com>
8769 * icall.c: The global extern environ doesn't exist on Mac. We
8770 need to call NSGetEnviron instead.
8772 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8774 verify.c: Add generic method constraint verification.
8776 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8778 class.c (mono_class_inflate_generic_method_full): Add a long
8779 explanation to the is_mb_open hack. Remove the FIXME.
8781 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8783 * verify.c (mono_method_verify): Mark all unknown opcodes
8784 as invalid. Mark jmp as unverifiable.
8786 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8788 * verify.c: Add code to do type constraint verification on class instances.
8790 * verify.c (mono_verifier_verify_class): Use the type constraint
8793 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
8795 * class.c (mono_class_get_field_default_value): Don't pass cindex
8796 as hint to mono_metadata_get_constant_index. The local is not initialized
8797 and should contain garbage most of the time. This could only work
8800 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
8802 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
8804 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
8806 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
8808 * class.c (mono_class_from_generic_parameter): Save the token of the
8809 generic param in MonoClass::sizes.generic_param_token.
8811 * reflection.c (mono_custom_attrs_from_class): If the class type is
8812 VAR or MVAR retrieve the attributes of the generic param.
8814 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8816 * class.c (mono_class_init): Do class verification if the verifier
8819 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8821 * verify-internal.h: Added mono_verifier_verify_class.
8823 * verify.c: Added mono_verifier_verify_class. It checks for
8824 classes with explicit layout that have overlapping reference fields.
8826 * pedump.c: Init the verifier state prior to verification. Fixed
8827 command line arguments.
8829 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
8831 * Makefile.am: Added verify-internals.h, hopefully fix the build.
8833 2008-04-08 Zoltan Varga <vargaz@gmail.com>
8835 * verify-internals.h: Fix a warning.
8837 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
8839 * verify-internals.h: New header with the verifier configuration
8840 extracted from mini.c.
8842 * verify.c: Implemented the new functions exported by verify-internals.h.
8844 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
8846 * verify.c: Add proper verification of ckfinite.
8848 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8850 * verify.c (do_conversion): Improved error message to something
8853 * verify.c (check_is_valid_type_for_field_ops): Fix to work
8854 with primitive types.
8856 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8858 * verify.c: Added tail prefix checking. Marked icall
8861 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
8863 * verify.c: Fix the detection of branches to the middle
8866 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
8868 * verify.c: Implemented verification of volatile. and
8869 unaligned. prefix. Check if a type is valid after retrieving it.
8871 2008-04-01 Dick Porter <dick@ximian.com>
8873 * process.c (process_get_fileversion): If there's no string block,
8874 set the file language to en_US. Fixes the other new part of bug
8877 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
8879 * class.c: New functions mono_method_can_access_field_full and
8880 mono_method_can_access_method_full. They perform type visibility
8881 and type site check.
8883 * class-internal.h: Added exported functions.
8885 * verify.c: Use new functions to implement proper visibility checks.
8887 2008-03-29 Zoltan Varga <vargaz@gmail.com>
8889 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
8891 2008-03-28 Dick Porter <dick@ximian.com>
8893 * process.c (process_get_fileversion): Use the first language ID
8894 we see, rather than insisting on an invariant language. Fixes bug
8897 2008-03-28 Zoltan Varga <vargaz@gmail.com>
8899 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
8900 the streams to fix reading of invalid memory later.
8902 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
8905 2008-03-26 Zoltan Varga <vargaz@gmail.com>
8907 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
8908 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
8910 2008-03-26 Massimiliano Mantione <massi@ximian.com>
8911 * threads.h: Added MonoThreadManageCallback type and
8912 mono_thread_set_manage_callback prototype
8913 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
8914 (used to store the mono_thread_manage callback).
8915 * threads.c: Added mono_thread_set_manage_callback, and handle
8916 "MonoThread->manage_callback" in build_wait_tids.
8918 2008-03-26 Dick Porter <dick@ximian.com>
8920 * process.c (process_get_fileversion): Set FileVersionInfo strings
8921 to Empty when the resource doesn't have the particular info.
8924 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
8926 * verify.c (mono_method_verify): Proper prefix validation.
8928 2008-03-25 Zoltan Varga <vargaz@gmail.com>
8930 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
8931 itself in a separate argument instead of throwing them. Fixes #373448.
8933 * appdomain.c: Bump corlib version.
8935 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
8937 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
8939 2008-03-20 Kornél Pál <kornelpal@gmail.com>
8941 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
8944 2008-03-20 Mark Probst <mark.probst@gmail.com>
8946 * generic-sharing.c, class-internals.h: Code for putting
8947 reflection types into the runtime generic context.
8949 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
8951 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
8955 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
8957 * verify.c (VerifyContext): Added instruction prefix data to the struct.
8959 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
8961 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
8963 * verify.c (do_cast): Let the result value keep the boxed status.
8965 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
8967 2008-03-17 Jb Evain <jbevain@novell.com>
8969 * reflection.c: when running on a 2.0 runtime, emit
8970 unconditionally the #~ header version as 2.0, and the
8971 CLI header version as 2.5, for symmetry's sake with csc.
8973 2008-03-16 Zoltan Varga <vargaz@gmail.com>
8975 * class.c: Remove the unused cache_interface_offsets stuff.
8977 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
8978 profiler.c: Fix warnings.
8980 2008-03-16 Mark Probst <mark.probst@gmail.com>
8982 * generic-sharing.c, class-internals.h: Support for putting
8983 methods into the runtime generic context.
8985 2008-03-16 Zoltan Varga <vargaz@gmail.com>
8987 * class.c (mono_class_setup_fields): Ignore calls made to this function for
8988 classes which are generic instances of not-yet finished typebuilders. Fixes
8991 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
8993 2008-03-15 Zoltan Varga <vargaz@gmail.com>
8995 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
8997 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
8998 field, replace it with a hash table in MonoDynamicImage.
9000 * reflection.c (inflate_mono_method): Access the generic definition object from
9001 image->generic_def_objects instead of imethod->reflection_info.
9003 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
9005 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
9007 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
9008 function in reflection.c so it is easier to keep in sync with the dynamic image
9011 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
9012 mono_image_close ().
9014 2008-03-15 Mark Probst <mark.probst@gmail.com>
9016 * class.c (mono_class_generic_sharing_enabled): Disable generic
9017 sharing for all architectures except AMD64 and x86 to fix build.
9019 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
9021 * verify.c: Use the generic definition MonoGenericContext when available.
9022 Remove code for checking generics instance compatibility in favor of
9023 mono_class_is_assignable_from.
9025 2008-03-14 Mark Probst <mark.probst@gmail.com>
9027 * marshal.c, marshal.h, metadata-internals.h, image.c,
9028 wrapper-types.h: New wrapper for invoking a shared static method
9029 without having to pass the runtime generic context argument.
9031 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
9033 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
9035 2008-03-14 Zoltan Varga <vargaz@gmail.com>
9037 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
9039 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
9040 create a token from a FieldOnTypeBuilderInst.
9041 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
9042 (resolve_object): Ditto.
9044 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
9045 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
9047 2008-03-14 Martin Baulig <martin@ximian.com>
9049 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
9051 * debug-mono-symfile.h
9052 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
9053 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
9055 2008-03-10 Martin Baulig <martin@ximian.com>
9057 * debug-mono-symfile.h
9058 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
9059 `lexical_block_table_offset'.
9060 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
9062 (MonoSymbolFile): Added `version'.
9065 (MonoDebugLexicalBlockEntry): Removed.
9066 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
9069 * mono-debug.c (mono_debug_add_method): Don't compute lexical
9070 blocks here; the debugger now does this internally.
9072 2008-02-27 Martin Baulig <martin@ximian.com>
9074 * object.c (mono_runtime_exec_main): Call
9075 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
9076 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
9078 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
9080 * verify.c (verify_type_compatibility_full): Allow native int to be converted
9081 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
9083 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
9085 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
9086 ldftn with a virtual method.
9088 2008-03-13 Geoff Norton <gnorton@novell.com>
9090 * decimal.c: Only include memory.h if the platform has it.
9092 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
9094 * assembly.c, class.c, metadata-internals.h: make sure public key
9095 tokesns are compared in a case-insensitive way. Also, all
9096 the lookups in the GAC use a lowercase public key token
9097 (gaacutil already does the lowercasing on install). Fixes
9100 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
9102 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
9105 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
9107 * image.c: when someone loads a mscorlib from a file, return the
9108 currently loaded mscorlib (fixes bug #369253).
9110 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
9112 * class.c: handle types with no parents by forcing them to have
9113 System.Object as a parent and marking them as broken (this currently
9114 allows the first part of bug #369173 to work as well, likely because
9115 we don't check for typeload exceptions everywhere yet).
9117 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
9119 * class.c: more complete check that types belong to corlib
9120 (fixes second part of bug #369173).
9122 2007-03-10 Bill Holmes <billholmes54@gmail.com>
9124 * generic-sharing.c: Including glib.h for the MSVC builds to define
9125 "inline" to "__inline" before including mono-membar.h.
9127 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
9128 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
9131 Contributed under MIT/X11 license.
9133 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
9135 * verify.c (do_invoke_method): Remove return type validation.
9137 * verify.c (do_ret): Do return type validation at return site instead of
9140 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
9142 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
9144 * verify.c: Some todos cleaned and improved a few error messages.
9146 2008-03-08 Zoltan Varga <vargaz@gmail.com>
9148 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
9150 2008-03-07 Zoltan Varga <vargaz@gmail.com>
9152 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
9153 system types correctly.
9155 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
9158 2008-03-06 Zoltan Varga <vargaz@gmail.com>
9160 * assembly.c (build_assembly_name): Fix a warning.
9162 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
9164 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
9165 the called function takes an object type argument. Fixes storing or
9166 valuetypes across remoting as well as reducing memory usage.
9167 * image.c, metadata-internals.h: remove now unused ldfld_remote and
9168 stfld_remote wrapper caches.
9170 2008-03-06 Zoltan Varga <vargaz@gmail.com>
9172 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
9175 * reflection.c (mono_image_register_token): New helper function to save
9176 a token->object mapping.
9178 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
9181 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
9182 one dimension arrays. Fixes #367670.
9183 (mono_reflection_get_type_internal): Ditto.
9185 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9187 * marshal.c: mono_load_remote_field_new() always returns object.
9188 so use the proper signature (fixes bug #366445).
9190 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9192 * class-internals.h (MonoMethod): Remove unused uses_this flag,
9193 add an 'inline_failure' flag instead.
9195 2008-03-04 Mark Probst <mark.probst@gmail.com>
9197 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
9198 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
9199 contains the location of "this", used for exception handling.
9201 2008-03-04 Zoltan Varga <vargaz@gmail.com>
9203 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
9204 their size on all platforms for perf reasons.
9206 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9208 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
9211 * object-internal.h: Same.
9213 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9215 * reflection.h: Fix the build I just broke.
9217 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9219 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
9220 Test if a token is valid, this remove explicit usage of
9221 MonoDynamicImage::tokens from the verifier code.
9223 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
9225 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
9226 instead of direct access to MonoDynamicImage::tokens.
9228 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9230 * verify.c (token_bounds_check): Fix the build I just broke.
9232 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
9234 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
9236 * verify.c (verifier_load_method): Fixed the errors message.
9238 * verify.c (mono_method_verify): Fixed a debug message.
9240 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
9242 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
9243 mono-perfcounters.h, class-internals.h: support for predefined
9244 writable counters, query of categories and counters, bugfixes.
9246 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
9248 * verify.c (do_refanytype): Verify the refanytype opcode.
9250 * verify.c (mono_method_verify): Use do_refanytype.
9252 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
9254 * verify.c (do_mkrefany): Verify the mkrefany opcode.
9256 * verify.c (mono_method_verify): Use do_mkrefany.
9258 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
9260 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
9261 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
9264 2008-02-27 Zoltan Varga <vargaz@gmail.com>
9266 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
9267 the type load exception.
9269 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
9271 * verify.c: Added a few FIXME for method signatures
9273 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
9274 of mono_method_get_signature and get vararg call working. Removed unused
9275 checks for return value.
9277 * verify.c (do_refanyval): Verify the refanyval opcode.
9279 * verify.c (mono_method_verify): Implemented verification of arglist and
9282 2008-02-27 Zoltan Varga <vargaz@gmail.com>
9284 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
9285 vtypes to marshal.c.
9287 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
9288 it works for AOT as well.
9290 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
9292 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
9293 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
9294 the system time is adjusted.
9296 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
9298 * icall.c, icall-def.h: use the new time functions (fixes the
9299 non-monotonic behaviour of TickCount).
9301 2008-02-26 Zoltan Varga <vargaz@gmail.com>
9303 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
9304 it breaks the build.
9306 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
9307 cattr is not finished yet.
9309 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
9311 * verify.c: Proper token validation for field, method and type.
9313 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
9315 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
9317 * loader.c (method_from_memberref): Generate type load error instead of method missing
9318 if the type is not found.
9320 2008-02-23 Zoltan Varga <vargaz@gmail.com>
9322 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
9323 some of the conversions caused the generation of a marshal directive exception.
9325 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
9327 verify.c: Report which exception should be thrown by the JIT.
9328 Added a lot of FIXME notes.
9330 2008-02-22 Mark Probst <mark.probst@gmail.com>
9332 * generic-sharing.c: Runtime generic context slots are not
9333 instantiated on init anymore. Instead, provide function to do the
9334 instantiating on demand.
9336 * class-internals.h: Added vtable to runtime generic context.
9337 Macros for encoding direct and indirect slot offsets in one
9340 2008-02-21 Mark Probst <mark.probst@gmail.com>
9342 * object.c, generic-sharing.c: Moved some generic sharing code
9343 from object.c to generic-sharing.c.
9345 * generic-sharing.c: Added support for extensible runtime generic
9348 * metadata-internals.h: Two new hash tables in MonoImage for
9349 extensible runtime generic context support.
9351 * domain.c: Unregister generic vtables upon domain unloading.
9353 * image.c: Destroy new hash tables upon image unloading.
9355 * metadata.c: Unregister generic subclasses upon image unloading.
9357 * class-internals.h: New data structure for runtime generic
9358 context template. New fields in the runtime generic context for
9361 * Makefile.am: Added generic-sharing.c.
9363 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
9365 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
9366 there is a pending loader exception, raise it.
9368 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
9371 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
9376 2008-02-20 Zoltan Varga <vargaz@gmail.com>
9378 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
9380 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
9382 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
9383 ref-only requests for compatibility with MS.
9385 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
9387 * reflection.c (mono_custom_attrs_from_method): Don't silently
9388 return an empty list for generic method instances.
9389 (mono_custom_attrs_from_param): Likewise.
9391 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
9392 Raja R Harinath <harinath@hurrynot.org>
9395 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
9396 * class.c (mono_class_inflate_generic_method_full): Initialize it
9397 when a fully-open method is instantiated.
9398 * metadata.c (inflated_method_equal, inflated_method_hash): Update
9400 * reflection.c (inflate_mono_method): Don't create a temporary context.
9402 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
9404 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
9405 Compute correct value, to prepare for imethod->reflection_info going away.
9407 2008-02-19 Zoltan Varga <vargaz@gmail.com>
9409 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
9411 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
9413 * verify.c: Implement skip visibility flag.
9415 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
9417 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
9418 which contains an extra field to tell the kind of exception that should be thrown.
9420 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
9422 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
9424 * loader.c (mono_method_get_param_names): Initialize 'klass' after
9425 'method' is updated.
9427 2008-02-11 Zoltan Varga <vargaz@gmail.com>
9429 * class.c (mono_class_layout_fields): Set class->min_align for classes using
9430 explicit layout as well. Fixes #360375.
9432 2008-02-11 Geoff Norton <gnorton@novell.com>
9434 * loader.c: Guard and dereference against inflated generic methods
9436 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
9438 * class.c: Include Retargetable spec in assembly name.
9439 * assembly.c: Always include PublicKeyToken spec in assembly name
9440 (with value "null" if assembly is not signed), and include
9442 * icall-def.h: Added icall for Assembly.get_fullname.
9443 * icall.c: Added icall returning the fullname of an assembly.
9445 2008-02-09 Zoltan Varga <vargaz@gmail.com>
9447 * class.c (mono_class_setup_vtable_general): Add a missing call to
9448 mono_class_setup_methods () which is needed in the AOT case.
9450 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
9452 * verify.c (mono_type_get_stack_name): Added. Return the name for the
9453 stack type of the given MonoType.
9455 * verify.c (verify_type_compatibility_full): Handle the void type.
9457 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
9458 way stack merging works.
9460 * verify.c (store_local): Improved verification message.
9462 * verify.c (do_branch_op): If the merging is invalid, the method
9463 is unverifiable and not invalid. Improved error message.
9465 * verify.c (merge_stacks): Properly merge a boxed valuetype and
9466 a reference type diferent than System.Object. Improved error
9469 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
9471 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
9473 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
9474 type of an enum even if the argument is byref.
9476 * verify.c: Replace all explicit uses of enumtype and enum_basetype
9477 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
9479 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
9481 *verify.c (verify_type_compatibility_full): Make enum types
9482 compatible with their base types.
9484 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
9485 types are compatible for the special case of a boxed valuetype and
9488 * verify.c (verify_stack_type_compatibility): The function
9489 is_compatible_boxed_valuetype was extracted from here.
9491 * verify.c (push_arg): Only set ctx->has_this_store if the method
9494 * verify.c (do_ldelem): Fixed a typo in an error message and added
9495 strict check for mixing int32 and native int as the array type
9498 * verify.c (merge_stacks): Consider boxed valuetypes in the
9499 compatibility checks.
9501 2008-02-07 Massimiliano Mantione <massi@ximian.com>
9502 * profiler.h: (MonoGCEvent): Added start-stop the world events.
9504 2008-02-06 Massimiliano Mantione <massi@ximian.com>
9505 *class.c: use_new_interface_vtable_code: renamed the env var to have
9506 a "MONO_" prefix, and fix the logic to enable it by default.
9508 2008-02-06 Massimiliano Mantione <massi@ximian.com>
9510 mono_class_setup_vtable_general: rewrote the way in which interface
9511 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
9512 makes the code more maintainable.
9513 For now the old code is still there, and can be activated setting
9514 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
9516 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
9518 * verify.c: guarded some debug functions around and #ifdef.
9520 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
9522 2008-02-06 Zoltan Varga <vargaz@gmail.com>
9524 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
9525 changes for now since they seem to break too many things.
9527 2008-02-05 Mark Probst <mark.probst@gmail.com>
9529 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
9530 mono_marshal_find_nonzero_bit_offset): Added macro and function
9531 for finding the byte- and bit-offset of a bitfield within a
9534 2008-02-05 Zoltan Varga <vargaz@gmail.com>
9536 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
9537 (mono_marshal_get_struct_to_ptr): Ditto.
9539 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
9542 2008-02-03 Zoltan Varga <vargaz@gmail.com>
9544 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
9545 between methods for non-corlib types.
9547 2008-02-02 Geoff Norton <gnorton@novell.com>
9549 * loader.c (mono_method_get_param_names): Populate the parameter name for
9550 generic parameters as well. (Fixes #342536)
9552 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
9554 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
9556 * verify.c (do_invoke_method): Fix for calling with byref structs.
9558 * verify.c (do_cast): push a boxed value type based on the type token and not
9561 2008-01-31 William Holmes <billholmes54@gmail.com>
9563 * process.c (process_module_string_read): Check the size returned form
9564 VerQueryValue to avoid out of memory exception.
9566 2008-01-30 Zoltan Varga <vargaz@gmail.com>
9568 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
9569 Handle properly modules which are not in the moduleref table. Fixes
9572 2008-01-29 Zoltan Varga <vargaz@gmail.com>
9574 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
9575 the dynamic case which is now in managed code.
9576 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
9578 * marshal.c (mono_string_to_bstr): Fix a warning.
9579 (init_com_provider_ms): Ditto.
9581 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
9583 * exception.c (mono_get_exception_out_of_memory): New helper function.
9585 2008-01-28 Jonathan Chambers <joncham@gmail.com>
9587 * marshal.c: Add support for BSTR marshalling
9588 using other COM systems.
9590 Code is contributed under MIT/X11 license.
9592 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9594 * object.c (mono_runtime_invoke_array): reverted previous
9595 commit as it breaks the build.
9597 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9599 * object.c (mono_runtime_invoke_array): Verify arguments for
9600 invalid types. Fixes #348522.
9602 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
9604 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
9605 non-final virtual calls using call.
9607 * verify.c (do_invoke): fixed some TODOs.
9609 * verify.c (push_arg): set has_this_store for "ldarga 0".
9611 2008-01-27 Zoltan Varga <vargaz@gmail.com>
9613 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
9614 which belong to an inflated class. Fixes #356531.
9616 2008-01-26 Robert Jordan <robertj@gmx.net>
9618 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
9619 which resort to FindFirstFile when a certain error condition
9620 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
9621 Code is contributed under MIT/X11 license.
9623 2008-01-24 Jonathan Chambers <joncham@gmail.com>
9625 * marshal.c (emit_marshal_string): Fix out string marshalling
9626 to use specified encoding. Fixes #323900.
9628 Code is contributed under MIT/X11 license.
9630 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
9632 * class.c (mono_class_inflate_generic_method_full): Don't modify
9633 iresult->context after cache check.
9635 2008-01-23 Zoltan Varga <vargaz@gmail.com>
9637 * class.c (mono_class_inflate_generic_method_full): Change the
9638 struct assignments to memcpy for better visibility and add some comments.
9640 2008-01-23 Dick Porter <dick@ximian.com>
9642 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
9643 procedure, and make it work on windows.
9645 2008-01-22 Zoltan Varga <vargaz@gmail.com>
9647 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
9648 a MonoReflectionTypeBuilder since it is always of that type.
9650 * reflection.c (mono_type_get_object): Remove an unneccesary check.
9652 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
9654 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
9656 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
9658 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
9660 * reflection.c (mono_reflection_create_runtime_class): Remove already created
9661 instantiations from the type cache.
9663 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9665 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
9667 * verify.c (do_unbox_value): push a controled mutability managed pointer.
9669 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9671 * verify.c (do_ldstr): added, verifies if the #US token is valid.
9673 * verify.c (mono_method_verify): removed old TODO
9675 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9677 * verify.c (do_newobj): add visibility check.
9679 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
9681 * verify.c (do_load_function_ptr): add visibility check.
9683 2008-01-21 Massimiliano Mantione <massi@ximian.com>
9685 mono_generic_class_get_class: hook profiler events.
9686 mono_field_get_offset: added to support heap-shot in the new profiler.
9687 *class.h: exported mono_field_get_offset.
9689 mono_reflection_setup_internal_class: hook profiler events.
9691 2008-01-20 Zoltan Varga <vargaz@gmail.com>
9693 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
9694 argument here too and use it to avoid checking for pending exceptions if
9697 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
9699 * assembly.c (build_assembly_name): add arg for passing the assembly
9700 flags. Do not consider a PublicKey with value "null" valid.
9701 (mono_assembly_name_parse_full): added boolean argument that will be
9702 set if the assembly name contains a PublicKeyToken spec. Added support
9703 for the Retargetable spec for which only Yes or No are allowed as valid
9704 value. Consider assembly name invalid if Retargetable spec is set, but
9705 either version, culture or public key (token) are not specified.
9706 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
9707 with implementation in assembly.c.
9708 * icall.c (fill_reflection_assembly_name): also copy assembly flags
9709 from MonoAssemblyName.
9710 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
9711 introduced argument for mono_assembly_name_parse_full to know if the
9712 assembly name has a PublicKeyToken spec, and if it has instruct
9713 fill_reflection_assembly_name to use default value for keyToken (if
9714 PublicKeyToken is null).
9716 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9718 * verify.c (mono_method_verify): fixed ovf ops with
9719 float values. They are unverifiable now.
9721 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
9723 * class.c (set_failure_from_loader_error): add BadImageException to the
9724 list of exceptions that can cause a type to fail to load.
9726 * class.c (mono_class_get_exception_for_failure): same.
9728 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
9730 * verify.c (in_any_exception_block): added, check if offset
9731 is part of any exception handling clause.
9733 * verify.c (get_stack_type): added VAR and MVAR types.
9735 * verify.c (do_stobj): better error messages.
9737 * verify.c (do_cpobj): added, check cpobj.
9739 * verify.c (do_initobj): added, check initobj.
9741 * verify.c (do_sizeof): added, check sizeof.
9743 * verify.c (do_localloc): added, check localloc.
9745 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
9747 2008-01-17 Zoltan Varga <vargaz@gmail.com>
9749 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
9750 save_lmf/restore_lmf opcodes.
9752 * threads.c (mono_threads_install_notify_pending_exc): New function to
9753 install a callback notifying the JIT there is a pending exception on a thread.
9754 (mono_thread_request_interruption): Call the new callback.
9755 (mono_thread_get_and_clear_pending_exception): New function to return the
9756 exception pending on a thread.
9758 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
9759 to turn off checking for pending exceptions.
9760 (mono_marshal_get_native_wrapper): Ditto.
9762 2008-01-16 Zoltan Varga <vargaz@gmail.com>
9764 * threads-types.h: Get rid of the unnecessary extern declarations.
9766 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
9768 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
9769 return field from parent class if not private.
9770 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
9771 returns fields from parent class if they are not private.
9772 (method_nonpublic): added function to determine if a given method
9773 should be considered non-public. Returns false for private methods
9774 on parent class, and internal methods from parent on the 1.0 profile.
9775 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
9776 use method_nonpublic function to determine whether method should be
9778 (property_accessor_public): use newly introduced method_nonpublic
9779 function to determine whether accessor is non-public.
9780 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
9781 event from parent class if not private. Only return static event if
9782 Static flag is set, and only return static event from parent class if
9783 FlattenHierarchy flag is set.
9784 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
9785 include non-private events from parent class.
9787 2008-01-16 Zoltan Varga <vargaz@gmail.com>
9789 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
9792 2008-01-16 Wade Berrier <wberrier@novell.com>
9794 * security.c: Add assembly.h header to appease some warnings
9796 2008-01-16 Dick Porter <dick@ximian.com>
9798 * process.c (process_module_string_read): Remove trailing null
9801 2008-01-16 Mark Probst <mark.probst@gmail.com>
9803 * class-internals.h: A new data structure describing the layout of
9804 a runtime generic context (MonoRuntimeGenericContextTemplate).
9806 * metadata-internals.h: Added a hash table to MonoDomain that maps
9807 from open generic classes to their runtime generic context
9810 * object.c: Building of the runtime generic context, including
9811 proper handling of generic type arguments of superclasses.
9812 Building of the runtime generic context according to the template.
9814 2008-01-15 Zoltan Varga <vargaz@gmail.com>
9816 * class.c (mono_class_setup_fields): Set field.count for generic instances.
9819 * image.c (do_mono_image_open): Pass TRUE as last_exists to
9820 mono_portability_find_file (). Fixes #325466.
9821 (mono_image_get_public_key): Fix a warning.
9823 2008-01-14 Zoltan Varga <vargaz@gmail.com>
9825 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
9827 (mono_class_from_name_case): Ditto.
9829 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
9831 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
9832 common storage for the tables used in the System/NumberFormatter class.
9834 2008-01-13 Zoltan Varga <vargaz@gmail.com>
9836 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
9838 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
9840 * verify.c (get_boxable_mono_type): check if the token is valid.
9842 * verify.c (set_stack_value): changed to add an error if an
9843 invalid type is set on stack. Changed all callers due to signature change.
9845 * verify.c (do_stobj): implement stobj validation.
9847 2008-01-11 Zoltan Varga <vargaz@gmail.com>
9849 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
9850 set container->is_method, it was set earlier.
9852 * metadata.c (type_in_image): Handle MVARs which belong to not finished
9855 * reflection.c (mono_reflection_initialize_generic_parameter): Set
9856 is_method of the generic container to TRUE for methods.
9858 2008-01-10 Zoltan Varga <vargaz@gmail.com>
9860 * metadata.c (type_in_image): Handle type parameters properly.
9862 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
9863 memory ownership of this structure.
9865 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
9867 * verify.c (get_boxable_mono_type): make typedref types been just
9868 unverifiable. check for void type.
9870 * verify.c (do_unbox_any): added, verify opcode unbox.any.
9872 * verify.c (do_load_function_ptr): accept method spec tokens.
9874 2008-01-10 Zoltan Varga <vargaz@gmail.com>
9876 * marshal.c (mono_class_native_size): Always set *align even if this is called
9879 2008-01-09 Zoltan Varga <vargaz@gmail.com>
9881 * verify.c (mono_verify_corlib): Remove this as it was not used and was
9884 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
9886 * verify.c: removed some old unused tables. A huge bunch of small fixes
9887 to things found while testing the verifier with mono basic.
9889 * verify.c (dump_stack_value): dump null literal flag to.
9891 * verify.c (verify_type_compatibility_full): fix comparison
9892 for types that have a generic super type.
9894 * verify.c (verify_stack_type_compatibility): fix compatibility
9895 between null literals and reference types. fix compatibility between
9896 boxed valuetypes and object. fix corner case test for enums.
9898 * verify.c (do_cmp_op): proper verification of cgt.un in case
9901 * verify.c (do_invoke_method): fix error message.
9903 * verify.c (do_store_indirect
9905 * verify.c (check_is_valid_type_for_field_ops): proper verification
9906 of managed pointers to valuetypes and boxed valuetypes. proper verification
9909 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
9910 allow token to be a reference type.
9912 * verify.c (do_cast): proper handling of boxes valuetypes.
9914 * verify.c (do_stelem): proper handling of storing a boxed valuetype
9917 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
9918 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
9919 fixed the decoding of unbox_any
9921 2008-01-08 Zoltan Varga <vargaz@gmail.com>
9923 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
9925 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
9927 * verify.c (do_newobj): do delegate verification.
9929 * verify.c (verify_delegate_compatibility): perform delegate
9932 * verify.c (verify_ldftn_delegate): perform tests related to
9935 * verify.c (mono_delegate_signature_equal): perform the
9936 slightly diferent signature comparison required by delegates.
9938 * metadata.c (mono_metadata_type_equal_full): added and exported
9939 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
9940 allows signature only comparison.
9942 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
9945 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
9947 * verify.c: added a bunch of stack_slot_* functions to
9948 make access to stack slot type easier. This is required to
9949 allow optional flags, like null literal, boxed value and
9951 All access paths to IlStackDesc::stype have been changed
9952 to use these new funcions.
9953 Removed a bunch of unused functions and cleared all warnings.
9954 This patch introduces the usage of the this pointer and
9957 2008-01-07 Zoltan Varga <vargaz@gmail.com>
9959 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
9961 2008-01-06 Zoltan Varga <vargaz@gmail.com>
9963 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
9964 match managed version.
9966 * appdomain.c: Bump corlib version.
9968 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
9971 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
9973 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
9974 Set public key token to zero-length byte array if assembly is not
9977 2008-01-05 Zoltan Varga <vargaz@gmail.com>
9979 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
9980 writing a vtype array elem.
9982 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
9984 * assembly.c (build_assembly_name): return FALSE if length of token is
9985 not 16 (if not "null").
9986 (mono_assembly_name_parse_full): return FALSE if value of version,
9987 culture, token or key is 0.
9988 * icall.c (fill_reflection_assembly_name): add boolean arguments to
9989 specify whether public key and public key token must be set to default
9990 value (zero-length byte array) if not available. Set versioncompat to
9991 SameMachine. If public key is available or the default is set, then
9993 (ves_icall_System_Reflection_Assembly_FillName): if no public key
9994 is available, use empty byte array as default value. On the 2.0
9995 profile, use default value for public key token if not set.
9996 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
9997 profile, use default value for public key if not set. On the 2.0
9998 profile, use default value for public key token if not set.
9999 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
10000 default values for public key and public key token.
10002 2008-01-05 Zoltan Varga <vargaz@gmail.com>
10004 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
10005 field to keep it in synch with the managed object.
10007 * marshal.c (emit_marshal_object): Add support for byref marshalling of
10008 delegates. Fixes #351520.
10010 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
10011 contains defined memory.
10013 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
10015 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
10017 * sgen-gc.c (check_consistency): New helper function to do a consistency check
10018 of the GC data structures.
10020 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
10022 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
10024 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
10026 (mono_array_clone_in_domain): Ditto.
10027 (mono_array_clone_in_domain): Ditto.
10029 * threads.c (start_wrapper): Register the thread start argument as a GC root.
10030 (cache_culture): Use a write barrier.
10032 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
10033 (ves_icall_get_property_info): Ditto.
10035 * object.h (MONO_STRUCT_SETREF): New macro.
10037 * class-internals.h (MonoStats): Add some GC statistics.
10039 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
10041 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
10043 * exception.c (mono_exception_from_name_two_strings):
10044 Break from loop after method is found.
10046 2008-01-04 Dick Porter <dick@ximian.com>
10048 * process.c (process_module_string_read): Rename variable to
10049 reflect correct usage, after fixing bug 345972.
10051 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
10053 * verify.c (mono_type_create_fnptr_from_mono_method):
10054 created a MonoType function pointer instance to be used during
10055 verification. The verifier releases this memory at end.
10057 * verify.c (mono_method_is_constructor): extracted repeated
10058 checks for constructor into a single class.
10060 * verify.c (do_push_field): use new extracted method
10061 for constructor check.
10063 * verify.c (do_newobj): same.
10065 * verify.c (do_ldftn): renamed to do_load_function_ptr
10066 and make it verify ldvirtftn too.
10068 * verify.c (mono_method_verify: proper verification
10069 of ldvirtftn. release created MonoMethod instances.
10071 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
10073 * verify.c (token_bounds_check): added.
10075 * verify.c (do_ldftn): added.
10077 * verify.c (mono_method_verify): proper verificartion of ldftn.
10079 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
10081 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
10082 than the table row count. It's the resposibility of the caller to
10083 make the bounds check and raise the correct error.
10085 * metadata.c (mono_metadata_decode_row_col): Same.
10087 * loader.c (mono_get_method_from_token): perform bounds check
10088 on token for methoddef table.
10090 2007-12-29 Miguel de Icaza <miguel@novell.com>
10093 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
10094 assert into a negative result, the managed code already coped with
10097 Some folks on Windows reported this error.
10099 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
10101 * appdomain.c: Bump corlib version.
10103 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
10104 CultureInfo.CreateCulture to create CultureInfo for name.
10105 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
10106 create CultureInfo for name. Fixes bug #347174.
10108 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
10110 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
10113 * verify.c (is_valid_branch_instruction): allow branching to the
10114 first instruction of the protected block.
10116 * verify.c (is_valid_cmp_branch_instruction): same.
10118 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
10119 avoid double initialization.
10121 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
10122 detect which cases the eval stack should just be copied.
10124 * verify.c (mono_method_verify): check if the eval stack
10125 is empty when entering a protected block.
10127 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
10129 * verify.c: added is_clause_in_range, is_clause_inside_range,
10130 is_clause_nested and verify_clause_relationship. They perform
10131 the verifications stated in P1 12.4.2.7.
10133 * verify.c (mono_method_verify): remove some unused variables,
10134 add the new exception clause checks, add instruction border
10135 checks for protected block start/end, improved some error
10136 messages and fixed a bug in the way invalid instruction access
10139 2007-12-26 Zoltan Varga <vargaz@gmail.com>
10141 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
10142 from GC 7.0 if available.
10144 * object.c: Remove an unused define.
10146 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
10148 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
10150 * null-gc.c (mono_gc_make_descr_for_array): Implement.
10152 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
10154 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
10155 to take the same arguments as the other make_descr functions.
10157 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
10159 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
10162 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
10165 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
10166 call to boehm-gc.c.
10168 * boehm-gc.c (mono_gc_register_root): Fix a warning.
10170 * null-gc.c (mono_gc_register_root): Fix a warning.
10172 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
10174 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
10175 (mono_gc_base_init): Call GC_init ().
10177 * null-gc.c: Define mono_gc_register_root () as a no-op.
10179 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10181 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
10183 * verify.c: add prototype for merge_stacks at top
10185 * verify.c (do_switch): added.
10187 * verify.c (merge_stacks): on some cases the stack merging
10188 was not happening properly. Unequal stack sizes at merge
10189 points should be invalid.
10191 * verify.c (mono_method_verify): added more debug info on stack state.
10192 verify switch properly.
10194 2007-12-24 Zoltan Varga <vargaz@gmail.com>
10196 * method-builder.h: New file, moved the mono_mb_ declarations here from
10199 * boehm-gc.c marshal.c: Include method-builder.h.
10201 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
10203 * marshal.c: Remove some code which is now in method-builder.c.
10205 2007-12-23 Zoltan Varga <vargaz@gmail.com>
10207 * method-builder.c: New file, extraction of the method builder functionality
10210 * marshal.c: Move the mb functions into method-builder.c.
10212 * marshal.h marshal.c: Export some mono_mb_... functions.
10214 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
10216 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
10219 * class.c (mono_class_get_full): Check the token type in the dynamic case.
10221 * loader.c (mono_field_from_token): Ditto.
10223 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
10226 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
10229 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
10230 a helper function for setting it.
10232 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
10235 * assembly.c: Significally simplify code now that referenced assemblies are
10236 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
10238 * threads.h: Don't include the internal threads-types.h header file. Fixes
10241 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
10243 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
10244 instructions that were target of branches or are at protected block boundaries.
10246 * verify.c (in_same_block): handle filter clauses.
10248 * verify.c (is_valid_branch_instruction): added. checks the target of
10249 instructions br or brtrue/false.
10251 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
10252 binary branch instructions such as beq and bge.
10254 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
10255 and made it pin the instruction as been part of the exception block.
10257 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
10260 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
10263 * verify.c (do_ret): ret from a protected block is unverifiable and
10266 * verify.c (do_static_branch): verify br and br.s instructions.
10268 * verify.c (merge_stacks): add extra param to support detection
10269 of branches in the middle of instructions.
10271 * verify.c (mono_method_verify): verify branches and exception blocks
10272 that target the middle of instructions. Proper verification of br and br.s.
10274 2007-12-21 Zoltan Varga <vargaz@gmail.com>
10276 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
10277 skip_visibility field.
10278 (reflection_methodbuilder_from_dynamic_method): Ditto.
10280 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
10281 registrations. Fixes #348193.
10283 * threads.h: Move the internal mono_thread_get_pending_exception () to
10284 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
10286 2007-12-20 Zoltan Varga <vargaz@gmail.com>
10288 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
10289 icall registration. Fixes #348193.
10291 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
10292 for corlib classes into object. Fixes #349621.
10294 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
10296 * icall.c (property_accessor_nonpublic): new function to determine
10297 whether an accessor allows a property to be considered non-public.
10298 Returns false for private accessor(s) from parent class, and internal
10299 accessor(s) from parent on 2.0 profile (and higher).
10300 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
10301 to determine whether property should be included if NonPublic flag
10302 is set. Fixes bug #349078.
10304 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
10306 * verify.c (init_stack_with_value): added.
10308 * verify.c (mono_method_verify): extracted common
10309 code for exception initialization into init_stack_with_value.
10311 * verify.c (mono_method_verify): initialize the exception
10312 for handler clauses as well.
10314 * verify.c (mono_method_verify): fix the exception clause
10315 ordering rules, it should use handler end offset and not
10318 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
10320 * rawbuffer.c: remove useless warning.
10322 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
10324 * threads.h, threads-types.h: move functions to the correct header
10325 (fixes bug#349952).
10327 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10329 * verify.c (mono_method_verify): proper verification
10330 of exception handling clauses ranges and fallthru in
10331 and out of protected blocks.
10333 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10335 * verify.c (mono_method_verify): fixed compilation issue.
10337 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
10339 * verify.c (mono_method_verify): a printf slipped in, changed
10340 to use verifier debug macro.
10342 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
10344 * verify.c (is_correct_leave): check for filter clauses.
10346 * verify.c (do_filter): added.
10348 * verify.c (mono_method_verify): property verification of leave.
10351 2007-12-18 Mark Probst <mark.probst@gmail.com>
10353 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
10354 Win32 build, until we figure out how to do the proper thing on
10357 2007-12-17 Zoltan Varga <vargaz@gmail.com>
10359 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
10360 by the previous patch.
10362 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
10363 the assembly resolve handler for refonly assemblies.
10365 2007-12-17 Mark Probst <mark.probst@gmail.com>
10367 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
10368 Make sure only one thread is allowed to commence shutdown, and
10369 don't allow new threads to be started once shutdown is in
10372 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
10374 * verify.c (is_correct_endfilter): added.
10376 * verify.c (is_unverifiable_endfilter): added.
10378 * verify.c (do_endfilter): added.
10380 * verify.c (mono_method_verify): property verification of endfilter
10381 and fixed a corner case or endfinally.
10383 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
10385 * verify.h: new flags to support fail fast of unverifiable code and
10386 do non-strict verification. Non-strict verification is required to
10387 have MS runtime compatibility. There are a huge amount of unverifiable
10388 code that it accepts as verifiable. The strict mode verifies the code
10390 Non-strict mode will be required in cases where code needs to be
10391 accepted as verifiable but fails under strict mode.
10393 * pedump.c: added support to fail fast and non-strict verification.
10395 * verify.c: added support for both fail fast and non-strict verification.
10397 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
10399 * verify.c (is_correct_endfinally): added.
10401 * verify.c (mono_method_verify): property verification of endfinally.
10403 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10405 * verify.c (in_any_block): check for filter clauses.
10407 * verify.c (is_correct_rethrow): added.
10409 * verify.c (mono_method_verify): property verification of rethrow.
10411 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
10413 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
10415 * verify.c (do_throw): added.
10417 * verify.c (mono_method_verify): property verification of throw
10419 2007-12-11 Zoltan Varga <vargaz@gmail.com>
10421 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
10422 assemblies. Fixes #346425.
10424 2007-12-10 Zoltan Varga <vargaz@gmail.com>
10426 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
10429 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
10431 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
10432 prevent asserts when this is called with a token which might not be valid.
10434 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
10435 lookup_dynamic_token_class with valid_token == FALSE.
10437 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
10439 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
10441 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
10443 2007-12-10 Mark Probst <mark.probst@gmail.com>
10445 * gc.c: Don't delay threadpool thread finalization unless Mono is
10448 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10450 * threads.c: turn an assert into a non-fatal warning.
10452 2007-12-09 Robert Jordan <robertj@gmx.net>
10454 * icall.c (GetVirtualMethod): Add missing argument validation.
10456 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10458 * verify.c (do_cast): added.
10460 * verify.c (mono_method_verify): property verification of castclass and isinst.
10463 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10465 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
10467 * verify.c (do_stelem): added.
10469 * verify.c (mono_method_verify): property verification of stelem.X.
10471 2007-12-07 Mark Probst <mark.probst@gmail.com>
10473 * class.c, class-internals.h: Introduce an environment variable
10474 (MONO_GENERIC_SHARING) through which the extent of generic code
10475 sharing can be controlled (share all classes, share only corlib
10476 classes, or share nothing).
10478 * object.c: Only create runtime generic context for classes for
10479 which sharing is enabled.
10481 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10483 * verify.c (do_ldelem): refactor it to work with ldelem.any.
10485 * verify.c (mono_method_verify): property verification of ldelem.any.
10487 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
10489 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
10490 added ldelem.X opcodes.
10492 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
10494 * verify.c: proper verification of ldelem.X
10496 2007-12-06 Zoltan Varga <vargaz@gmail.com>
10498 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
10500 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
10502 * verify.c (mono_method_verify): null literal requires special handling,
10503 the value pushed on stack need to be flagged as so.
10505 * verify.c (do_ldelema): Verify ldelema properly.
10507 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
10509 * verify.c: Verify ldlen properly.
10511 2007-12-05 Zoltan Varga <vargaz@gmail.com>
10513 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
10514 to the target object's type. Fixes #346160.
10516 2007-12-05 Dick Porter <dick@ximian.com>
10518 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
10519 Solaris needs the same workaround as BSD-derived systems. Fixes
10520 bug 323524, patch by Burkhard Linke
10521 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
10523 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
10525 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
10526 handle to use when error dialog is shown; otherwise, update mask
10527 to show no error dialog when an error occurs.
10529 2007-12-03 Zoltan Varga <vargaz@gmail.com>
10531 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
10533 * class.c (mono_class_get_field_default_value): New helper function to initialize
10534 field->def_type and field->data.
10536 2007-11-30 Zoltan Varga <vargaz@gmail.com>
10538 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
10541 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
10543 * marshal.c: Avoid depending on delegate->method_info being set.
10545 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
10547 * object.c (mono_delegate_ctor): Set delegate->method.
10549 * object-internals.h (struct _MonoDelegate): Add 'method' field.
10551 * appdomain.c: Bump corlib version.
10553 2007-11-27 Raja R Harinath <harinath@gmail.com>
10555 * metadata.c (mono_generic_inst_equal_full): Short-circuit
10556 equality check if we're comparing canonicalized MonoGenericInsts.
10558 2007-11-23 Zoltan Varga <vargaz@gmail.com>
10560 * class.c (generic_array_methods): Call mono_class_setup_methods () before
10561 accessing class->methods.
10563 2007-11-22 Dick Porter <dick@ximian.com>
10565 * threads.c: Ensure that the synch_cs is set before trying to use
10568 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
10570 * profiler.c: r89126 broke the statistial profiler, unbreak.
10572 2007-11-22 Martin Baulig <martin@ximian.com>
10574 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
10577 (mono_debug_debugger_version): Bump to 3.
10578 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
10579 -> mono_debugger_class_initialized().
10581 * mono-debug-debugger.c
10582 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
10585 (mono_debugger_start_class_init_func): Removed.
10586 (mono_debugger_class_loaded_methods_func): Added.
10587 (mono_class_setup_methods): Call it here.
10589 2007-11-22 Martin Baulig <martin@ximian.com>
10592 (mono_debug_add_delegate_trampoline): New public method.
10593 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
10596 (MonoSymbolTable): Added `global_data_table'.
10597 (MonoDebuggerTypeKind): Removed.
10599 2007-11-21 Zoltan Varga <vargaz@gmail.com>
10601 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
10604 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10606 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
10608 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
10610 2007-11-20 Martin Baulig <martin@ximian.com>
10612 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
10614 * mono-debug-debugger.c
10615 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
10616 (mono_debugger_remove_breakpoint): Likewise.
10617 (mono_debugger_check_breakpoints): Likewise.
10618 (mono_debugger_register_class_init_callback): New public method.
10619 (mono_debugger_remove_class_init_callback): Likewise.
10620 (mono_debugger_add_type): Likewise.
10622 * mono-debug-debugger.h
10623 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
10625 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
10627 * class.c: more interface implementations needed for the
10628 array enumerator (fixes bug #341112).
10630 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
10632 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
10633 fix ParamName of ArgumentNullExceptions.
10635 2007-11-17 Miguel de Icaza <miguel@novell.com>
10637 * reflection.c (mono_reflection_encode_sighelper): Generate the
10638 modopts and modreqs. I have a useless test that crashes monodis,
10639 but that shows the code working.
10641 2007-11-17 Zoltan Varga <vargaz@gmail.com>
10643 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
10644 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
10646 2007-11-15 Dick Porter <dick@ximian.com>
10648 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
10649 When joining a thread, it's the thread that's calling Join that
10650 gets WaitSleepJoin state not the target. Fixes the standalone
10651 test case in bug 334740, and hopefully the whole bug too.
10653 2007-11-15 Dick Porter <dick@ximian.com>
10655 * process.c: Read file version info from the files pointed at by
10656 process modules, not the current process. Fixes bug 315969.
10658 Use windows typedef names in some places to fix warnings on the
10661 2007-11-15 Mark Probst <mark.probst@gmail.com>
10663 * image.c, metadata-internals.h: Added a generic_class_cache hash
10664 to MonoImage for looking up generic classes when sharing generics.
10666 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10668 * sgen-gc.c: warning cleanups.
10670 2007-11-15 Zoltan Varga <vargaz@gmail.com>
10672 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
10673 inherited properties.
10675 2007-11-14 Mark Probst <mark.probst@gmail.com>
10677 * object.c, class-internals.h: Added more information to the
10678 runtime generic context.
10680 2007-11-13 Zoltan Varga <vargaz@gmail.com>
10682 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
10683 instead of just the target method. Generalize the abstract method handling to
10684 handle any non-static method.
10686 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10687 mono_marshal_get_delegate_invoke () signature change.
10689 2007-11-13 Mark Probst <mark.probst@gmail.com>
10691 * class.c, class-internals.h: Made
10692 mono_type_get_basic_type_from_generic () public. Fixed member
10693 access check for shared generics.
10695 * loader.c: Don't insert field into field cache if it's part of a
10696 non-inflated generic class.
10698 * domain.c, domain-internals.h: The generic sharing context is now
10699 part of the jit info data structure. Added two accessor
10702 2007-11-12 Zoltan Varga <vargaz@gmail.com>
10704 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
10705 the array Get/Set/Address methods, since the JIT inlines them.
10707 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
10709 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
10710 (mono_image_init): Initialize runtime_invoke_direct_cache.
10712 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10713 mono_marshal_get_delegate_invoke signature change.
10715 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
10716 an additional argument. Add support for invoking abstract methods.
10718 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
10720 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
10722 2007-11-09 Mark Probst <mark.probst@gmail.com>
10724 * class.c: Do field layout for open generic classes as well.
10726 2007-11-09 Mark Probst <mark.probst@gmail.com>
10728 * gc.c, gc-internal.h: Don't finalize threadpool threads with
10729 other objects, because the threadpool is still around. Put them
10730 in a list instead and after finalizing all other objects in the
10731 root domain shut down the thread pool and then finalize the
10732 threads. Fixes bug #337383.
10734 * threads.c, thread-types.h: New mono_thread_create_internal()
10735 function for marking a thread with the threadpool flag before it
10736 started. Set synch_cs to NULL after freeing it.
10738 * threadpool.c: Mark threadpool threads before they start.
10740 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10742 * reflection.h, reflection.c: don't export random functions
10743 and lazy load dbnull and missing objects.
10745 2007-11-07 Jonathan Chambers <joncham@gmail.com>
10747 * class.c: Initialize COM types if COM interfaces
10748 are present (not just COM classes).
10750 Code is contributed under MIT/X11 license.
10752 2007-11-07 Massimiliano Mantione <massi@ximian.com>
10754 create_dynamic_mono_image: hook module profiler events (dynamic case).
10755 mono_image_basic_init: hook assembly profiler events (dynamic case).
10757 2007-11-07 Massimiliano Mantione <massi@ximian.com>
10759 simple_appdomain_unload: completely terminate the profiler
10760 instead of only processing the statistical samples.
10761 simple_shutdown: make sure this is really called exactly once,
10762 even in multithreaded applications, and always listen to
10764 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
10765 here, the "[un]load" functions will do it.
10766 Fixes bugs #333791 and #325261.
10768 2007-11-07 Geoff Norton <gnorton@novell.com>
10770 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
10771 rather than depend on __APPLE__.
10773 2007-11-07 Mark Probst <mark.probst@gmail.com>
10775 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
10777 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
10779 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
10780 UTF16 MonoString. Fix the crash from bug #335488
10782 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
10784 * marshal.c: Correct (for non-Win32 OS) length != size in
10785 mono_string_from_bstr. Fix #339530.
10787 2007-11-06 Geoff Norton <gnorton@novell.com>
10789 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
10792 2007-11-05 Kornél Pál <kornelpal@gmail.com>
10794 * process.c: Added run-time GetProcessId API detection for Windows.
10796 2007-11-04 Miguel de Icaza <miguel@novell.com>
10798 * reflection.c (mono_param_get_objects): If a parameter has the
10799 attribute [System.Runtime.InteropServices.Optional] we should
10800 set the DefaultValue of the ParameterInfo to be
10801 System.Reflection.Missing instead of DBNull.
10805 (mono_get_reflection_missing_object): New method,
10806 returns the System.Reflection.Missing.Value singleton instance.
10808 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
10810 * culture-info-table.h : regenerated.
10812 2007-11-02 Jonathan Chambers <joncham@gmail.com>
10814 * icall.c: Use GetEnvironmentStrings on windows
10815 so we are using the same environment block as
10816 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
10819 Code is contributed under MIT/X11 license.
10821 2007-10-31 Martin Baulig <martin@ximian.com>
10823 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
10825 * mono-debug-debugger.h
10826 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
10828 2007-10-30 Zoltan Varga <vargaz@gmail.com>
10830 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
10833 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
10835 * culture-info-table.h : regenerated.
10837 2007-10-30 Robert Jordan <robertj@gmx.net>
10839 * icall-def.h, icall.c:
10840 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
10842 Code is contributed under MIT/X11 license.
10844 2007-10-29 Zoltan Varga <vargaz@gmail.com>
10846 * class.c (mono_class_setup_vtable): Find the inflated methods in the
10847 inflated class instead of inflating them again.
10849 * class.c (mono_class_setup_vtable): Inflate the override methods in the
10852 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
10853 Call setup_supertypes () after klass->parent is set.
10854 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
10856 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
10857 for inflated instances of not yet created dynamic generic classes.
10858 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
10859 times from inflated_method.
10860 (methodbuilder_to_mono_method): Ditto.
10862 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
10864 * gc.c: code cleanup and removed old untested option of not creating the
10867 2007-10-29 Zoltan Varga <vargaz@gmail.com>
10869 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
10870 creating a jump trampoline for dynamic methods.
10872 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
10874 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
10875 generic TypeBuilders when called from another method of the same type (bug #335131).
10878 2007-10-27 Zoltan Varga <vargaz@gmail.com>
10880 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
10881 doesn't seem to work perfectly.
10883 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
10884 called multiple times.
10885 (methodbuilder_to_mono_method): Ditto.
10886 (resolve_object): Inflate FieldBuilder's.
10888 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10890 * string-icalls.c, string-icalls.h, appdomain.c: patch from
10891 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
10892 RemoveEmptyEntries in the string.Split implementation (bug #322375).
10894 2007-10-26 Dick Porter <dick@ximian.com>
10896 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
10897 Thread initialisation changes
10899 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
10901 * verify.c: fix compatibility check between arrays and System.Array
10903 2007-10-26 Zoltan Varga <vargaz@gmail.com>
10905 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
10906 too. Fixes #336999.
10908 2007-10-25 Zoltan Varga <vargaz@gmail.com>
10910 * object.c (mono_value_box): Use typed allocation here.
10912 2007-10-23 Zoltan Varga <vargaz@gmail.com>
10914 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
10915 trampoline instead of compiling the method right away.
10917 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
10919 2007-10-21 Zoltan Varga <vargaz@gmail.com>
10921 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
10922 related fields for dynamic classes. Fixes #334493.
10924 2007-10-20 Zoltan Varga <vargaz@gmail.com>
10926 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
10928 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
10930 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
10931 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
10933 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
10935 * reflection.c (create_generic_typespec): Initialize klass->generic_container
10937 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
10939 2007-10-18 Jonathan Chambers <joncham@gmail.com>
10941 * marshal.c: Use correct key when removing item
10944 Code is contributed under MIT/X11 license.
10946 2007-10-17 William Holmes <billholmes54@gmail.com>
10948 *marshal.c: Adding a case to marshal booleans to U1
10950 Code is contributed under MIT/X11 license.
10952 2007-10-18 Zoltan Varga <vargaz@gmail.com>
10954 * class.c (mono_class_from_name): Search the modules compromising dynamic
10955 assemblies. Fixes #331601.
10957 2007-10-16 Zoltan Varga <vargaz@gmail.com>
10959 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
10960 exception if the type name contains an assembly component. Fixes #334203.
10962 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
10963 modules inside dynamic assemblies. Fixes #334200.
10965 * reflection.c: Set image->public_key and image->public_key_length;
10967 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
10970 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
10972 2007-10-16 Mark Probst <mark.probst@gmail.com>
10974 * metadata.c: Implemented correct comparing of generic classes.
10975 An inflated generic class can be equal to a non-inflated one if it
10976 is inflated with generic type variables as type arguments. Fixes
10979 2007-10-15 Dick Porter <dick@ximian.com>
10981 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
10982 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
10985 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
10986 instead of a monitor lock. This means that monitor_try_enter and
10987 co can set the thread state safely.
10988 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
10989 thread_interrupt_requested, so interrupt actually works.
10991 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
10992 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
10993 state accessor function
10995 2007-10-15 Martin Baulig <martin@ximian.com>
10998 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
10999 the debugger with the current runtime.
11001 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11003 * object.c, object-internals.h: added the ability to set a single
11004 trampoline for all the slots in a vtable.
11006 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11008 * marshal.c: deal with a possible race condition during multicast
11009 delegate invocation.
11011 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11013 * class.c: ensure value type methods don't have the synchronized
11016 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11018 * string-icalls.c, string-icalls.h: reverted unapproved patch that
11021 2007-10-11 Joel Reed <joelwreed@comcast.com>
11023 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
11024 to take an options parameter so that empty entries can be removed during
11025 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
11027 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11029 * marshal.c: make sure we don't store the signature from a dynamic
11030 method into the runtime invoke cache (bug #327189).
11032 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11034 * marshal.c: make sure the wrapper methods are properly initialized.
11036 2007-10-11 Mark Probst <mark.probst@gmail.com>
11038 * metadata.c, metadata-internals.h: Generalized
11039 mono_type_stack_size() to mono_type_stack_size_internal() which
11040 takes an additional argument specifying whether it allows open
11043 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
11045 * verify.c (do_invoke_method): handle typedbyref params
11046 correctly and check for unverifiable return values.
11048 * verify.c (do_newobj): fix a warning.
11050 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
11052 * verify.c: don't tread typedbyref as allways unverifable,
11053 so uses, like (ld/st)loc.0 are valid. verify for the cases
11054 that it matters, like boxing related operations.
11056 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
11058 * verify.c: add verification of the newobj opcode. verification
11059 of delegate instantation still missing due ldftn and virldftn not
11060 pushing the function type on stack
11062 2007-10-08 Mark Probst <mark.probst@gmail.com>
11064 * class-internals.h: Runtime generic context data structure
11067 * object.c: Initialization of runtime generic context at runtime
11068 vtable creation time.
11070 2007-10-08 Massimiliano Mantione <massi@ximian.com>
11071 * class.c (mono_class_create_from_typedef,
11072 mono_class_from_generic_parameter, mono_ptr_class_get,
11073 mono_fnptr_class_get, mono_bounded_array_class_get)
11074 * domain.c (mono_domain_create, mono_domain_free)
11075 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
11076 * image.c (do_mono_image_load, mono_image_close):
11077 Hooked up load-unload profiler events.
11079 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11081 * domain.c: track statistics about the actual amount of native code
11084 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11086 * class.c: the valuetype enumerators don't have the additional
11087 supertypes interfaces.
11089 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11091 * class.c: need more interfaces setup for the IEnumerator<T>
11092 object created for arrays (tests/ienumerator-interfaces.2.cs).
11094 2007-10-05 Zoltan Varga <vargaz@gmail.com>
11096 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
11098 2007-10-05 Alp Toker <alp@atoker.com>
11100 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
11101 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
11104 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
11106 * verify.c (verify_type_compatibility_full): verification of
11107 compatibility improved, validates correctly non-strict checks between
11108 native int and I4 types different than (unsigned)int32.
11110 * verify.c (do_store_indirect): added, do all verification of
11113 * verify.c (get_load_indirect_mono_type): renamed to
11114 get_indirect_op_mono_type, as it now returns the MonoType for
11115 ldind.X and stind.X opcodes.
11117 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
11119 * reflection.c: Fix the encoding of generic type definition for
11122 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
11123 mono_image_typedef_or_ref but allows to specify if typespec lookups should
11124 be made. Typespec check is done prior to typeref cache lookup.
11126 * reflection.c (mono_image_typedef_or_ref): now just delegate to
11127 mono_image_typedef_or_ref_full.
11129 * reflection.c (encode_generic_class): encode the generic class
11130 directly instead of calling encode_type.
11132 * reflection.c (encode_type): encode the generic type definition
11133 MonoClass as a generic instantiation.
11135 * reflection.c (create_typespec): cache typespec tokens in
11136 the assembly->typespec cache. Don't create typespec for a generic
11137 instance MonoClass. Create typespec for the generic type defintion.
11139 * reflection.c (create_generic_typespec): encode the generic
11140 class directly instead of calling encode_type.
11142 * reflection.c (mono_image_create_token): encode the generic
11143 type definition not using a typespec for MonoType instances.
11146 2007-10-04 Raja R Harinath <rharinath@novell.com>
11149 * class.c (mono_image_init_name_cache): Don't return nested
11150 'protected internal' classes.
11151 (mono_class_from_name_case): Likewise.
11153 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
11155 * icall-def.h, icall.c : get_bundled_machine_config() is now the
11156 common function used by both DefaultConfig in System.dll and
11157 InternalConfigurationHost in System.Configuration.dll.
11159 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11161 * class.c: automatically add to vectors only a few essential explicit
11162 generic interfaces. The rest of the interfaces that arrays should
11163 provide are currently implicitly added (but still not lazily, see the
11164 design in the discussion of bug#325495 for the details of what is
11165 needed for that). Additionally, implicit interfaces are assigned the
11166 same vtable slot as the explicit interfaces (as they are compatible):
11167 this enables huge memory savings since we don't need to instantiate
11168 as many memthods and as large vtables anymore. Also, Since
11169 GetEnumerator<T> returns an instance of a type that is required to
11170 support a similarly large set of interfaces as arrays, we add
11171 implicit interfaces and interface offset sharing support to those
11172 types, too. This change adds all the required interfaces so that
11173 the anonarray.cs test case in the bug report works (we don't add
11174 all the interfaces to arrays of arrays 3-level deep and more because
11175 of the memory requirements explained in the bug and since they are much
11176 less common: the lazy-loading support will enabled them to work, too).
11178 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
11180 * verify.c (merge_stacks): major clean up, all type compatibility
11181 checks are done by verify_type_compatibility. This fix my earlier lack
11182 of understanding of the CLR type system and merge_stacks no longer looks
11185 * verify.c: fixed some bad spelling.
11187 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
11189 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
11190 a given stack slock.
11192 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
11193 verify_type_compatibility_full. This removed a near indentical function and fixed
11194 handling of Int32 and IntPtr across all opcodes.
11196 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11198 * class.c: only vectors have the additional generic interfaces.
11200 2007-10-01 Jonathan Chambers <joncham@gmail.com>
11202 * mono-config.c: Use g_strcasecmp instead of
11203 strcasecmp like everywhere else to fix
11204 compilation with MSVC.
11206 Code is contributed under MIT/X11 license.
11208 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11210 * object.c, object-internals.h: refactored the IMT code to enable
11211 building a single slot at a time and lazily creating the IMT trampolines
11214 2007-09-29 Zoltan Varga <vargaz@gmail.com>
11216 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
11218 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
11221 2007-09-29 Raja R Harinath <harinath@gmail.com>
11223 * loader.c (method_from_methodspec): Rearrange to avoid
11224 un-necessary exposition. Don't assert out if the method's
11225 declaring type is a generic type definition.
11227 2007-09-28 Martin Baulig <martin@ximian.com>
11229 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
11231 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11233 * class-internals.h: optimize field layout of MonoClass to
11234 requires less cachelines at runtime and save a few bytes on 64 bit
11237 2007-09-28 Jb Evain <jbevain@novell.com>
11239 * reflection.c: when encoding type names in custom attributes,
11240 if the type is a closed generic type, its generic arguments
11241 have to be serialized as AssemblyQualifiedName, so that when
11242 they are deserialized, it's possible to re-create them properly.
11246 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11248 * object.c, class-internals.h: added delegate-creation counter.
11250 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11252 * class.c: cleanup of the code that synthetizes interfaces for
11253 arrays in 2.0: saves quit a bit of corlib mempool memory.
11254 Code to fix bug #325495 ifdeffed out for now until the issues
11255 with memory usage and O(n^2) behaviour are fixed.
11257 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11259 * marshal.c: when possible, do not duplicate the name of the methods
11260 in the method builder and in the generated MonoMethod.
11262 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
11263 * verify.c: added support for type checking ldind_* opcodes.
11265 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
11267 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
11268 which is used to distinguish the fully open instantiation of a TypeBuilder
11269 with the rest. This temporary hack is required to restore the property that
11270 the fully open instantiation is the same type of the generic type definition.
11272 * class-internals.h (mono_generic_class_is_generic_type_definition):
11273 new function as part of the internal API.
11275 * class.c (inflate_generic_type): return NULL when the generic inst is
11276 fully open. The fully open generic type is now the same as the generic type
11277 definition for non TypeBuilder types.
11279 * class.c (mono_generic_class_get_class): removed assert since it is
11280 no longer valid, gklass->cached_class can point to the generic type definition.
11282 * class.c (mono_generic_class_is_generic_type_definition): new.
11284 * metadata.c (mono_generic_class_hash): added is_tb_open field
11285 to the hash calculation.
11287 * metadata.c (free_generic_class): if the generic class is associated
11288 with the generic type definition, its field will come from the mempool and
11291 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
11292 new, this function identifies the corner case of a TypeBuilder fully open
11295 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
11296 for lookup. Set gclass->cached_class to be the container class in case of
11297 the fully open instantiation of non TypeBuilder types.
11299 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
11300 to compare generic classes.
11302 * reflection.c (method_encode_methodspec): remove assert that
11303 no longer is valid.
11305 * reflection.c (mono_reflection_generic_class_initialize): add
11306 an aditional assert to ensure the proper type is used.
11308 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
11310 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
11313 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
11315 * verify.c (push_arg): Fixed support for ldarga
11316 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
11317 MonoType used as first arg in case of instance calls.
11319 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
11321 * verify.c: Support for verifying VAR and MVAR types,
11323 2007-09-25 Zoltan Varga <vargaz@gmail.com>
11325 * icall.c (ves_icall_get_property_info): Set the reflected type of the
11326 accessors correctly.
11328 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11330 * threads.c: support OSX and other systems in
11331 mono_thread_get_stack_bounds (bug #328026).
11333 2007-09-25 Martin Baulig <martin@ximian.com>
11336 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
11338 2007-09-24 Martin Baulig <martin@ximian.com>
11341 (MonoDebugClassEntry): Moved the definition of this struct into
11342 mono-debug.c to make it private.
11345 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
11346 type table per symbol file, we don't need to store the symfile id
11349 2007-09-24 Martin Baulig <martin@ximian.com>
11351 Create one type table per symbol file, since a `MonoClass *' gets
11352 invalid when its image is unloaded.
11354 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
11355 (MonoDebugHandle): Added `type_table'.
11357 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11359 * mempool.c, mempool.h: added mono_mempool_new_size () API
11360 to be able to specify a smaller initial size for the pool.
11361 Adjusted the code to slowly increase pool size before using
11362 the previous default size.
11363 * image.c: use a small initial size for image mempools.
11365 2007-09-23 Zoltan Varga <vargaz@gmail.com>
11367 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
11370 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
11371 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
11373 2007-09-22 Zoltan Varga <vargaz@gmail.com>
11375 * metadata.c (mono_type_create_from_typespec): Remove an invalid
11376 free. Fixes #327438.
11378 2007-09-21 Raja R Harinath <harinath@gmail.com>
11380 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
11381 generic instantiations, etc.
11382 <MONO_TYPE_ARRAY>: Likewise.
11384 2007-09-21 Martin Baulig <martin@ximian.com>
11386 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
11387 these structs were never defined.
11388 (MonoDebugHandle): Removed the `_priv' field, it was never used.
11390 2007-09-21 Martin Baulig <martin@ximian.com>
11392 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
11394 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
11396 * image.c: removed the guid hash tables: we can get the same info
11397 without the additional memory usage hit (partially fixes also bug #327052).
11399 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11401 * profiler.h, profiler-private.h, profiler.c: add a new profiler
11402 event to handle unloading methods. After the event is called, the
11403 corresponding MonoMethod* must be considered invalid.
11404 * loader.c (mono_free_method): call the new mono_profiler_method_free
11407 2007-09-20 Mark Probst <mark.probst@gmail.com>
11409 * domain-internals.h: New flag in MonoJitInfo which marks shared
11410 generic methods. New hash table (shared_generics_hash) in
11411 MonoDomain to keep track of shared generic methods. Prototypes
11412 for functions to register and lookup shared generic methods.
11414 * domain.c: Support for registering and looking up shared generic
11415 methods via a hash table (shared_generics_hash) in MonoDomain.
11417 * class-internals.h: New exception to signal failure of shared
11418 compilation of a generic method. New counters for generics
11419 sharing in MonoStats.
11421 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11423 * image.c, metadata-internals.h: don't keep a file descriptor open
11424 for loaded assemblies (bug#325988).
11426 2007-09-19 Raja R Harinath <rharinath@novell.com>
11428 * metadata.c (signature_in_image): New. Carve out of type_in_image.
11429 (ginst_in_image, gclass_in_image): Simplify. Change signature to
11430 use the corresponding datatypes.
11431 (type_in_image): Update to changes.
11432 (CleanForImageUserData): Simplify.
11433 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
11434 Avoid quadratic behaviour in handling the "stolen" list by
11435 separating the filter predicate out, and by prepending the stolen
11436 items rather than appending them.
11437 (steal_ginst_in_image): Likewise.
11438 (mono_metadata_clean_for_image): Update to changes.
11440 2007-09-19 Martin Baulig <martin@ximian.com>
11442 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
11444 2007-09-19 Martin Baulig <martin@ximian.com>
11446 * mono-debug.c (mono_debug_cleanup): Don't call
11447 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
11449 2007-09-19 Raja R Harinath <harinath@gmail.com>
11451 Fix crash on 'make run-test' in mcs/errors
11452 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
11453 Avoid more potential allocations in mono_class_from_mono_type.
11454 (ginst_in_image): Update to changes.
11455 (gclass_in_image): Rearrange slightly.
11457 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11459 * class.c (mono_class_init): Move the code that sets up class->methods to
11460 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
11462 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
11463 canonical instance of an inflated generic signature.
11464 (mono_type_create_from_typespec): Remove an invalid free.
11466 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
11468 2007-09-18 Marek Habersack <mhabersack@novell.com>
11470 * domain-internals.h: added a declaration of the
11471 mono_assembly_load_full_nosearch internal function.
11473 * assembly.c (mono_assembly_load_with_partial_name): use
11474 mono_try_assembly_resolve return value properly.
11475 (mono_assembly_load_full_nosearch): copied the function body from
11476 mono_assembly_load_full, without the code to invoke assembly
11478 (mono_assembly_load_full): calls the above new function and if the
11479 assembly is not resolved, invokes the search hooks.
11481 * appdomain.c (mono_runtime_init): restore the global postload
11482 assembly search handlers.
11484 2007-09-18 Zoltan Varga <vargaz@gmail.com>
11486 * class.c (mono_class_init): Make sure class->methods and class->properties
11487 are never NULL in the generics case.
11489 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
11491 2007-09-17 Zoltan Varga <vargaz@gmail.com>
11493 * metadata.c (free_generic_class): Disable some code to fix the build.
11495 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
11497 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
11498 from the image mempool.
11500 * metadata.c (free_generic_class): Free more data from the inflated class.
11502 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
11504 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
11506 (mono_type_create_from_typespec): Ditto.
11508 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
11509 MonoImage to the caller.
11510 (mono_init_internal): Save the opened image in a global variable.
11511 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
11513 * reflection.c (resolve_object): Fix a leak.
11515 * metadata.c: Fix the freeing of data in the generics caches.
11517 * metadata.c (free_generic_inst): Comment this out to fix the build.
11518 (free_generic_class): Ditto.
11520 * metadata.c: Free cached generic methods, instantinations and classes when
11521 they are removed from the caches.
11522 (mono_metadata_free_type): Free the type itself.
11524 * class.c: Free the result of mono_class_inflate_generic_type () in a few
11527 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11529 * boehm-gc.c: restrict managed allocs to __thread supporting
11532 2007-09-16 Zoltan Varga <vargaz@gmail.com>
11534 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
11535 (mono_generic_class_get_class): Fix a leak.
11537 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
11538 mono_metadata_free_type ().
11539 (mono_metadata_inflate_generic_inst): Fix a leak.
11541 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11543 * mono-debug.c (free_header_data): Fix a leak missed earlier.
11545 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
11548 * mono-debug.c (mono_debug_close_image): Fix call to
11549 g_hash_table_remove ().
11551 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11553 * icall-def.h: redirect all the string ctor to the managed
11554 CreateString () methods.
11555 * string-icalls.c, string-icalls.h: removed dead code for string
11558 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11560 * mono-debug.c: Fix memory leaks.
11562 2007-09-14 Jonathan Chambers <joncham@gmail.com>
11564 * threads-types.h: Implement mono_hazard_pointer_set and
11565 mono_hazard_pointer_clear macros using do/while(0) to fix
11566 compilation with MSVC.
11568 Code is contributed under MIT/X11 license.
11570 2007-09-14 Zoltan Varga <vargaz@gmail.com>
11572 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
11573 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
11575 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11577 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
11580 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11582 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
11583 managed-code allocated as well.
11585 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11587 * class.c (mono_class_is_assignable_from): Add support for generic variance.
11589 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
11591 * boehm-gc.c: fixed the build after the AOT changes.
11593 2007-09-13 Zoltan Varga <vargaz@gmail.com>
11595 * wrapper-types.h: Add an ALLOC wrapper type.
11597 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
11598 reference managed allocator methods.
11600 2007-09-12 Marek Safar <marek.safar@gmail.com>
11602 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
11603 of Type array and not MonoType, a fix suggested by Hari.
11605 2007-09-12 Jonathan Chambers <joncham@gmail.com>
11607 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
11608 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
11610 Code is contributed under MIT/X11 license.
11612 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11614 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
11616 2007-09-12 Marek Habersack <mhabersack@novell.com>
11618 * image.c (do_mono_image_open): if assembly file fails to open and
11619 MONO_IOMAP is in effect, try to find the path in a
11620 case-insensitive way.
11622 * appdomain.c (mono_runtime_init): do not install postload hooks -
11623 tests show that MS.NET doesn't use anything of that sort to
11624 trigger the AppDomain.AssemblyResolve event.
11625 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
11627 (mono_runtime_init): init portability helpers here.
11629 * assembly.c (mono_assembly_load_with_partial_name): if other
11630 attempts fail, trigger the AppDomain.AssemblyResolve event handler
11631 to resolve the assembly.
11633 * domain-internals.h: added mono_try_assembly_resolve and marked
11636 2007-09-11 Jb Evain <jbevain@novell.com>
11638 * object-internals.h (MonoReflectionDynamicMethod): add
11639 a `MonoReflectionType *owner` field. The owner is used
11641 (mono_reflection_create_dynamic_method): use the owner of the dynamic
11642 method as the class declaring the dynamic method.
11643 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
11644 dynamic method to the declaring type of the methodbuilder.
11646 2007-09-11 Mark Probst <mark.probst@gmail.com>
11648 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
11649 rules for calling methods via reflection.
11651 2007-09-11 Zoltan Varga <vargaz@gmail.com>
11653 * reflection.c (resolve_object): Add support for MonoGenericClass.
11654 Inflate MonoType's.
11656 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11658 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
11659 provide a managed method that does fast allocations without needing
11660 a managed->unmanaged transition. Boehm GC implementation currently
11661 enabled for ptrfree objects on sane architectures.
11663 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11665 * marshal.c, marshal.h: exported a couple of useful functions and
11666 added mono_mb_get_label () to easily handle backward branches.
11668 2007-09-10 Zoltan Varga <vargaz@gmail.com>
11670 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
11672 2007-09-10 Massimiliano Mantione <massi@ximian.com>
11674 * loader.c (find_method): Fixed the regression introduced while
11677 2007-09-09 Zoltan Varga <vargaz@gmail.com>
11679 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
11682 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
11683 icall.c reflection.c: Pass a MonoGenericContext argument to
11684 mono_lookup_dynamic_token ().
11686 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
11689 2007-09-09 Robert Jordan <robertj@gmx.net>
11691 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
11692 for generic methods.
11694 * object.c (mono_object_get_virtual_method): Handle generic methods.
11697 Code is contributed under MIT/X11 license.
11699 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11701 * image.c: fix locking in mono_image_load_file_for_image ().
11703 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
11705 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
11706 used only as a cache: added an icall to fill it.
11708 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
11710 * reflection.h: exposed mono_reflection_free_type_info
11711 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
11712 since mono_reflection_bind_generic_parameters makes a copy of it.
11713 * reflection.c (free_type_info): subinfos should be freed.
11714 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
11716 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
11717 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
11718 this fixes #82695 and #81726.
11721 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
11723 * process.h, process.c: added support for user profile/info in
11724 ProcessStartInfo. For now only Windows works.
11726 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11728 * metadata.c: consider the generic arguments when comparing
11729 signatures (bug #82614).
11731 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11733 * cil-coff.h, image.c: updated assembly loader to cope with the
11734 PE32+ 64 bit file format.
11736 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11738 * assembly.c, class.c, domain.c, loader.c: remove useless
11739 inclusion of cil-coff.h.
11741 2007-08-29 Jonathan Chambers <joncham@gmail.com>
11743 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
11744 if interface is marked with CoClassAttribute.
11746 Code is contributed under MIT/X11 license.
11748 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11750 * sgen-gc.c: ensure no object from the to space is copied again or finalized
11751 if it's seen twice in major collections.
11753 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11755 * sgen-gc.c: big objects are not copied to the gray area, but they
11756 need to be considered for scanning, too, if they are brought alive
11757 by an object ready for finalizations or a survived one.
11759 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11761 * sgen-gc.c: properly account the number of disappearing links when
11762 they are nullified.
11764 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11766 * sgen-gc.c: share the code to scan the registered roots between the
11767 different types of collections.
11769 2007-08-28 Zoltan Varga <vargaz@gmail.com>
11771 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
11773 2007-08-28 Zoltan Varga <vargaz@gmail.com>
11775 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
11776 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
11778 2007-08-28 Mark Probst <mark.probst@gmail.com>
11780 * security-manager.c (mono_security_manager_get_methods):
11781 LinkDemandSecurityException now has 2 arguments instead of 3.
11783 2007-08-27 Zoltan Varga <vargaz@gmail.com>
11785 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
11786 platforms which need it.
11788 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11790 * sgen-gc.c: unregister thread data structures with a pthread_key_t
11793 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11795 * threads.c: free the thread static data on thread exit.
11797 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
11799 * class.c: walk the hierarchy to find the generic definition for
11800 a class (fixes runtime part of bug #82498).
11802 2007-08-24 Zoltan Varga <vargaz@gmail.com>
11804 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
11807 * image.c (mono_image_close): Here. Hopefully fixes #82510.
11809 2007-08-24 Mark Probst <mark.probst@gmail.com>
11811 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
11813 2007-08-24 Robert Jordan <robertj@gmx.net>
11815 * appdomain.c: don't perform the ':'->';' substitution on Win32.
11817 2007-08-24 Jb Evain <jbevain@novell.com>
11819 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
11822 2007-08-24 Mark Probst <mark.probst@gmail.com>
11824 * threads.c: Make sure a thread gets cleaned up only once. Fixes
11827 2007-08-24 Zoltan Varga <vargaz@gmail.com>
11829 * assembly.c: Fix a warning.
11831 2007-08-23 Marek Habersack <mhabersack@novell.com>
11833 * appdomain.c: parse the <runtime> section looking for the probing
11834 element with the 'privatePath' attribute, which sets additional
11835 directories in which the runtime should look for assemblies.
11837 2007-08-23 Robert Jordan <robertj@gmx.net>
11839 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
11842 2007-08-23 Martin Baulig <martin@ximian.com>
11844 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
11845 _mono_debug_init_corlib() and remove it from the header file.
11847 2007-08-23 Martin Baulig <martin@ximian.com>
11849 * mono-debug-debugger.c
11850 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
11851 don't notify the debugger about it.
11853 * mono-debug-debugger.h
11854 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
11856 2007-08-23 Robert Jordan <robertj@gmx.net>
11858 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
11859 Code is contributed under MIT/X11 license.
11861 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11863 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
11865 2007-08-22 Martin Baulig <martin@ximian.com>
11867 * mono-debug.c: Store debugging info on a per-domain basis and
11868 free it on domain unload. Add support for unloading symbol files.
11871 (MonoDebugList): New typedef.
11873 - add `data_tables and `type_table'.
11874 - replace 'symbol_files' and `num_symbol_files' with a
11876 (mono_debug_data_table): Removed.
11877 (mono_debug_list_add): New public function.
11878 (mono_debug_list_remove): New public function.
11879 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
11880 (mono_debug_init_2_memory): Renamed into
11881 mono_debug_open_image_from_memory().
11882 (mono_debug_close_image): New public function.
11883 (mono_debug_domain_create): Likewise.
11884 (mono_debug_domain_unload): Likewise.
11885 (MONO_DEBUGGER_VERSION): Bump to 60.
11887 * mono-debug-debugger.h
11888 (MonoDebuggerEvent):
11889 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
11890 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
11891 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
11892 - rename `THREAD_CREATED' and `THREAD_EXITED' into
11893 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
11894 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
11896 (mono_debugger_add_symbol_file): Removed.
11897 (mono_debugger_add_type): Removed.
11898 (mono_debugger_lookup_type): Removed.
11899 (mono_debugger_lookup_assembly): Removed.
11902 (mono_domain_create): Call mono_debug_domain_create().
11903 (mono_init_internal): Call mono_debug_init_corlib().
11906 (mono_assembly_close): Call mono_debug_close_image().
11908 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11910 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
11913 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
11915 * sgen-gc.c: ensure section->pin_queue_end is initialized
11916 correctly when non pinning objects in the section have been found.
11918 2007-08-22 Marek Habersack <mhabersack@novell.com>
11920 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
11921 containing a list of directories separated by ':'. MSDN docs say
11922 the directories should be separated with ';'. Part of a bugfix for
11925 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
11927 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
11928 it should MonoType and not MonoClass.
11930 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
11932 * culture-info-table.h : regenerated.
11934 2007-08-20 William Holmes <billholmes54@gmail.com>
11936 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
11937 to call ReplaceFile Kernel32 on windows or in io-layer.
11938 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
11939 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
11940 as an internal call.
11942 Code is contributed under MIT/X11 license.
11944 2007-08-20 Jb Evain <jbevain@novell.com>
11946 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
11947 and MONO_EXCEPTION_FIELD_ACCESS.
11949 * debug-helpers.[c|h]: new mono_field_full_name function.
11951 2007-08-20 Mark Probst <mark.probst@gmail.com>
11953 * class.c: Removed class_security_level() and moved it to
11954 security-core-clr.c.
11956 * security-core-clr.c, security-core-clr.h: class_security_level()
11957 is now public and renamed to mono_security_core_clr_class_level().
11958 It also looks for security attributes in the classes a class is
11961 2007-08-20 Mark Probst <mark.probst@gmail.com>
11963 * security-core-clr.c, security-core-clr.h: CoreCLR security
11966 * Makefile.am: Added security-core-clr.[ch].
11968 * security-manager.c, security-manager.h: Functions and enum for
11969 setting and getting the security mode.
11971 * class.c: CoreCLR security checks.
11973 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11975 * icall-def.h, process.c, process.h: implemented icall to get
11976 user/system processor times.
11978 2007-08-17 Mark Probst <mark.probst@gmail.com>
11980 * domain.c, threads.c, class-internals.h, domain-internals.h: New
11981 reader-lock-free jit_info_table.
11983 2007-08-17 Zoltan Varga <vargaz@gmail.com>
11985 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
11987 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
11989 * object-internals.h (MonoException): Add missing _data member.
11991 2007-08-08 Massimiliano Mantione <massi@ximian.com>
11993 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
11994 checking that only methods with matching qname or fqname are picked
11995 from implemented interfaces.
11997 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
11999 * verify.c (do_newarr):added, do type verification of
12000 newarr ops, push the right value on the eval stack.
12001 * verify.c (mono_method_verify): use do_newarr
12004 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
12006 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
12007 factored the common code into get_boxable_mono_type, which
12008 is now using mono_type_get_full, this fixed byref related tests.
12010 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
12012 * class.c: added mono_type_get_full, this function has the same
12013 behavior of mono_class_get_full but the returned MonoType has
12014 all metadata of the associated token in case of a typespec token.
12015 * class.c: added mono_type_retrieve_from_typespec, used by
12016 mono_type_get_full to retrieve the token type.
12017 * class.c (mono_class_create_from_typespec): changed to use
12018 mono_type_retrieve_from_typespec.
12019 * class.c (mono_ldtoken): changed to use mono_type_get_full
12020 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
12021 * class-internals.h: exported mono_type_get_full for internal use.
12023 2007-08-16 Jb Evain <jbevain@novell.com>
12025 * domain.c (supported_runtimes): add entry for
12026 the 'moonlight' runtime version.
12028 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12030 * verify.c (mono_method_verify): small typo sliped in.
12032 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12034 * verify.c (do_unbox_value): added, do type verification of
12036 * verify.c (mono_method_verify): use do_unbox_value
12039 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12041 * verify.c (dump_stack_value): fixed typo, was printing string
12042 instead of object on stack.
12043 * verify.c (do_box_value): moved the byref check up as it leads
12044 to invalid code and should be done earlier.
12045 * verify.c: improved error messages for and ldobj
12047 2007-08-15 William Holmes <billholmes54@gmail.com>
12049 * marshal.c (emit_marshal_custom): Omit the call to
12050 marshal_native_to_managed when calling native to managed
12051 and the argument is specified as an out argument.
12053 Code is contributed under MIT/X11 license.
12055 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
12057 * verify.c: fixed the type checks for generics, function pointers and vectors.
12058 Added type verification for ldobj and ldtoken. The verifier
12059 would segfault if header or signature of a method contained references
12060 to non-existant types.
12062 2007-08-15 Jonathan Chambers <joncham@gmail.com>
12064 * marshal.c (cominterop_get_ccw): Patch from
12065 Bill Holmes to no walk up interface hierarchy.
12066 All parent methods should be present in the interface for COM.
12068 Code is contributed under MIT/X11 license.
12070 2007-08-15 Jonathan Chambers <joncham@gmail.com>
12072 * marshal.c (emit_marshal_com_interface): Patch from
12073 Bill Holmes to handle COM Interfaces as return values
12074 for native->managed calls.
12076 Code is contributed under MIT/X11 license.
12078 2007-08-14 Jonathan Chambers <joncham@gmail.com>
12080 * marshal.c (cominterop_get_idispatch_for_object): Implement
12081 for runtime callable wrappers.
12083 Code is contributed under MIT/X11 license.
12085 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
12087 * pedump.c (main): changed from mono_init to mono_init_from_assembly
12088 so 2.0 types are accessible
12091 2007-08-13 Miguel de Icaza <miguel@novell.com>
12093 * domain.c (mono_init_internal): Call mono_assembly_load_friends
12094 once we load mscorlib. Due to the order in which we initialize,
12095 the mono_assembly_load_full routine that loads mscorlib did not
12096 load friends. We now load it once we load the
12097 mono_defaults.internals_visible_class class.
12099 * assembly.c: Expose the mono_load_friend_assemblies method.
12101 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
12103 * verify.c: improved the handling of boxing, better
12104 type checking for unary ops and conversion. Fix bug
12105 regarding managed pointer compatibility checking
12107 2007-08-11 Zoltan Varga <vargaz@gmail.com>
12109 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
12111 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
12113 2007-08-09 Raja R Harinath <rharinath@novell.com>
12115 * reflection.c (dup_type): Remove.
12116 * class.c (dup_type): Remove.
12117 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
12118 instead of the dodgy 'dup_type'.
12119 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
12120 handle the case where 'dup_type' needed the second argument.
12122 2007-08-08 Zoltan Varga <vargaz@gmail.com>
12124 * domain.c: Fix a warning.
12126 2007-08-08 Massimiliano Mantione <massi@ximian.com>
12128 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
12129 checking that methods with the same fqname are not overridden
12130 with a method from an ancestor.
12132 2007-08-07 Zoltan Varga <vargaz@gmail.com>
12134 * threads.c (free_thread_static_data_helper): Avoid a crash if
12135 thread->static_data is not yet set.
12137 2007-08-07 Jonathan Chambers <joncham@gmail.com>
12139 * marshal.c: Use correct image when emitting
12140 native wrapper for COM calls.
12142 Code is contributed under MIT/X11 license.
12144 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
12146 * icall-def.h, security.c, security.h :
12147 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
12149 2007-08-07 Martin Baulig <martin@ximian.com>
12151 * mono-debug-debugger.h
12152 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
12154 * domain.c (mono_domain_free): Call
12155 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
12157 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
12159 * verify.c (check_underflow, check_overflow): error message now returns IL offset
12160 * verify.c (in_same_block): code should test if either offset is inside the clauses
12161 * verify.c (mono_method_verify): push the exception into the eval stack of exception
12164 2007-08-03 Zoltan Varga <vargaz@gmail.com>
12166 * image.c (mono_image_close): Fix a leak.
12168 * object.c (mono_runtime_invoke_array): Avoid using alloca.
12170 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
12172 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12174 * domain.c, threads.c, threads-types.h: fix memory retention issue
12175 with thread static variables not being cleared on domain unload.
12176 Reuse thread static slots after domain unload.
12178 2007-08-03 Zoltan Varga <vargaz@gmail.com>
12180 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
12183 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
12184 now done in mono_runtime_invoke_array.
12186 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
12187 receiver is a nullable type.
12189 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
12192 2007-08-03 Jonathan Chambers <joncham@gmail.com>
12194 * marshal.c: Implement COM Objects as return type for
12195 managed->unmanaged calls. Added Release calls for COM Object
12196 out/return values in managed->unmanaged calls.
12198 Code is contributed under MIT/X11 license.
12200 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
12202 * threads.h, threads-type.h: move the hazard pointer declarations
12203 to the private header.
12205 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12207 * file-io.c, appdomain.c: memory leak fixes.
12209 2007-08-02 Dick Porter <dick@ximian.com>
12212 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
12213 SO_REUSEADDR setting into io-layer/sockets.c.
12215 2007-08-01 Zoltan Varga <vargaz@gmail.com>
12217 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
12218 from Object when called on a generic parameter. Fixes #82211.
12220 2007-08-01 Dick Porter <dick@ximian.com>
12222 * file-io.c (convert_share): Test FileShare values bit-by-bit.
12223 Fixes bug 79250 yet again.
12225 2007-07-30 Martin Baulig <martin@ximian.com>
12227 Merged the `debugger-dublin' branch.
12230 (MonoDebugDataTable): New typedef.
12231 (MonoDebugMethodAddressList): New typedef.
12232 (MonoDebugWrapperData): Removed.
12233 (MonoDebugSymbolTable): Removed `current_data_table',
12234 `current_data_table_size', `current_data_table_offset'.
12235 (MonoDebugDataItemType): Moved into mono-debug.c.
12236 (MonoDebugMethodJitInfo): Remove `address'.
12237 (mono_debug_data_table): New global variable.
12238 (mono_debug_lookup_method_addresses): New public function.
12239 (mono_debug_find_method): Take a `MonoMethod *', not a
12240 `MonoDebugMethodInfo *'.
12242 * mono-debug.c: Drop support for the old symbol tables.
12244 2007-06-28 Martin Baulig <martin@ximian.com>
12246 * mono-debug.c (mono_debug_debugger_version): New public variable.
12248 2007-07-31 William Holmes <billholmes54@gmail.com>
12250 * metadata.c Changed mono_type_create_from_typespec to not insert
12251 the type into the hash map until after
12252 do_mono_metadata_parse_type has completed.
12254 Code is contributed under MIT/X11 license.
12256 2007-07-31 Zoltan Varga <vargaz@gmail.com>
12258 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
12259 generic parameter. Fixes #82211.
12261 2007-07-27 Jb Evain <jbevain@novell.com>
12263 * pedump.c (dump_metadata, dump_metadata_header): dump
12264 versions contained in the metadata header.
12266 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
12268 * threads.c: register small_id_table with the GC.
12270 2007-07-27 Mark Probst <mark.probst@gmail.com>
12272 * threads.c, threads.h, class-internals.h, object-internals.h:
12273 Hazard pointers, to be used by lock-free parallel algorithms.
12275 2007-07-26 Dick Porter <dick@ximian.com>
12277 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
12278 routine on non-windows platforms, as I've not managed to think of
12279 a non-kludgy way of doing this. Finishes off bug 78739.
12281 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
12283 * object.c: properly setup interface_bitmap in proxy vtables.
12285 2007-07-25 Marek Habersack <mhabersack@novell.com>
12287 * appdomain.c (get_shadow_assembly_location): do not use TickCount
12288 to create unique shadow copy target directories, use the domain's
12289 serial number instead. Each domain gets a unique target directory
12292 * domain.c (mono_domain_create): added code to increment domain
12293 shadow copy serial number and cache the value in the current
12296 * domain-internals.h (struct _MonoDomain): added a new field -
12297 shadow_serial to hold the serial number used in generation of
12298 shadow-copy directories. This is to make sure that the directory
12299 name is unique for each and every domain created. We avoid a race
12300 condition with overriding assemblies already in use by other app
12303 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
12305 * class.c (mono_bounded_array_class_get): fixed memory leak when
12306 binding generic parameters.
12308 2007-07-24 Raja R Harinath <rharinath@novell.com>
12310 * metadata.c (do_mono_metadata_parse_generic_class): Use
12311 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
12314 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12316 * loader.c, class-internals.h, reflection.c: removed the per-method
12317 generics hashtable: we use the global one through the call of
12318 mono_class_inflate_generic_method ().
12320 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12322 * class.c, metadata.c, class-internals.h: introduce yet another
12323 generics global cache for inflated methods (fixes 98% of the perf
12324 issue in bug #81806).
12326 2007-07-23 Raja R Harinath <rharinath@novell.com>
12328 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
12329 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
12330 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
12331 return a MonoGenericInst containing (a copy) of those types.
12332 (mono_metadata_inflate_generic_inst): Update to changes.
12333 (mono_metadata_parse_generic_inst): Likewise.
12334 (mono_get_shared_generic_inst): Likewise.
12335 * reflection.c (mono_class_bind_generic_parameters): Likewise.
12336 (mono_reflection_bind_generic_method_parameters): Likewise.
12337 * metadata-internals.h: Likewise.
12338 * icall.c (free_generic_context): Kill.
12339 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
12341 * reflection.c (reflection_methodbuilder_to_mono_method): Use
12342 mono_metadata_type_dup.
12343 * marshal.c (mono_mb_create_method): Likewise.
12345 * metadata.c (mono_metadata_type_dup): Rename from
12346 mono_metadata_type_dup_mp. Take an optional mempool instead of a
12347 MonoImage. Handle a few more cases, esp. when no mempool is given.
12348 * marshal.c, metadata-internals.h: Update to changes.
12350 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
12352 * class.c: fixed a small leak for array classes and removed warning.
12354 2007-07-22 Zoltan Varga <vargaz@gmail.com>
12356 * loader.c (mono_method_get_param_token): Make this work on generic methods.
12357 Return 0x8000000 for return parameters. Fixes #82161.
12359 2007-07-21 Marek Habersack <grendello@gmail.com>
12361 * appdomain.c (get_shadow_assembly_location): append the current
12362 ticks value to the path. Avoids overwriting the same assemblies by
12363 several threads at the same time.
12365 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
12366 and Raja R Harinath <rharinath@novell.com>
12368 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12370 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
12371 property for testing if a method is a generic method definition.
12373 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
12375 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
12377 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12379 * verify.c: used function from private branch, reverted to the one in class.h
12381 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12383 * verify.c: a typo slipped in and the code wont compile
12385 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12387 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
12388 disabled box instruction as it is doing the wrong thing
12389 improved stack dump messages, now it is easier to debug type related issues
12392 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
12394 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
12396 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12398 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
12399 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
12400 grouped with class and valuetype. This change will simply
12401 the code as it should be handled just like unmanaged pointers.
12403 2007-07-19 Mark Probst <mark.probst@gmail.com>
12405 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
12407 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
12409 * verify.c: several stack merge issues fixed, reference comparisons now
12410 check the type size. strict type check now works correctly.
12411 added more uses of IS_MANAGED_POINTER macro.
12412 fixed issues pointed by running the test suite against .net.
12415 2007-07-19 Mark Probst <mark.probst@gmail.com>
12417 * class.c, loader.c, class-internals.h: Removed the
12418 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
12421 * icall.c: Better error checking in some internal reflection
12424 2007-07-18 William Holmes <billholmes54@gmail.com>
12426 * filewatcher.c : removed unused variable 'filename' in
12427 ves_icall_System_IO_FSW_SupportsFSW
12429 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12431 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
12434 2007-07-15 Zoltan Varga <vargaz@gmail.com>
12436 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
12438 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
12440 2007-07-14 Zoltan Varga <vargaz@gmail.com>
12442 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
12443 Implement generics support.
12444 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12446 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
12447 type_args and method_args arguments.
12448 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
12449 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12450 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
12452 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
12454 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
12455 It adds a rootimage parameter to mono_reflection_get_type_internal,
12456 adds new function mono_reflection_get_type_with_rootimage and use
12457 the rootimage to resolve the types instead of the current image
12459 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
12461 * culture-info-table.h: Forgot to update after r78304.
12463 2007-07-13 Raja R Harinath <rharinath@novell.com>
12465 * class.c (mono_class_is_open_constructed_type)
12466 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
12468 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
12470 * class.c (mono_bounded_array_class_get): method fails if used with
12471 an incomplete TypeBuilder enum (no basetype field), fixed it by
12472 avoiding calculating the size for such array as it cannot be instantiated.
12475 2007-07-12 Raja R Harinath <rharinath@novell.com>
12477 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
12479 * metadata.c, reflection.c: Update to changes.
12481 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
12483 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
12484 mono_class_is_valid_enum, they are used to valide a enum when loading.
12485 * reflection.c: used new functions to throw TypeLoadException when and
12486 invalid enum is build with TypeBuilder. Fixes #82018
12488 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12490 * object.c: forgot commit of mono_class_setup_methods () to access
12492 * object-internals.h: added a few more handy fields to
12495 2007-07-11 Zoltan Varga <vargaz@gmail.com>
12497 * object.c (build_imt): Call mono_class_setup_methods () before accessing
12500 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
12502 * class-internals.h, object-internals.h, object.c: IMT-based
12503 interface invocation core from Massimiliano Mantione
12504 (massi@ximian.com) with a reworked arch-specific interface,
12505 bsearch implementation and a few bugfixes and memory savings by me.
12507 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
12509 * class.c (mono_class_create_from_typedef): mono would segfault if
12510 an enum did not have a __value field. It now throws a TypeLoadException
12511 for such cases. Fix bug #82022
12513 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12515 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
12517 2007-07-09 Mark Probst <mark.probst@gmail.com>
12519 * class.c (mono_class_init): If a class is already inited but has
12520 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
12522 2007-07-09 Mark Probst <mark.probst@gmail.com>
12524 * class.c: Properly handle the case of an unimplemented interface
12525 method. Fixes: 81673.
12527 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12529 * class-internals.h, object.c: cleanup patch from massi: use
12530 MonoVTable->interface_bitmap since the vtable interfaces offset array
12533 2007-07-10 Zoltan Varga <vargaz@gmail.com>
12535 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
12536 GetMDStreamVersion icall instead.
12538 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
12540 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
12541 not use mono_dl_build_path() with a full library name: makes
12542 fallbacks to libgaim and libfam work.
12544 2007-07-06 William Holmes <billholmes54@gmail.com>
12546 * assembly.c: Added a continue statement in probe_for_partial_name when
12547 parse_assembly_directory_name fails. Fixes : 82002
12549 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
12551 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
12552 and added a verification for TYPEDBYREF.
12553 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
12554 make native int interchangeable with int32 and some small cleanup and formating.
12555 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
12556 handle byref of byref.
12557 * verify.c (push_local): handle byref of byref.
12558 * verify.c (do_binop): invalid mix of values is unverifiable
12559 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
12560 added visibility checks
12561 * verify.c (field related method): added visibility checks
12562 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
12564 2007-07-06 Zoltan Varga <vargaz@gmail.com>
12566 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
12569 2007-07-05 Zoltan Varga <vargaz@gmail.com>
12571 * profiler.c (mono_profiler_load): Fix an off-by-one error.
12573 * marshal.c (emit_marshal_string): When returning a string from managed code,
12574 allways make a copy even for unicode strings. Fixes #81990.
12576 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
12578 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
12579 of byref generic inst types (bug #81997).
12581 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
12583 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
12584 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
12586 2007-07-02 Zoltan Varga <vargaz@gmail.com>
12588 * marshal.c (emit_marshal_string): Add support for unicode strings in
12589 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
12591 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
12593 * verify.c: field load/store are now verified, missing only access checks now
12595 2007-06-28 Martin Baulig <martin@ximian.com>
12597 * mono-debug.c (mono_debug_debugger_version): New public variable.
12599 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
12601 * locales.c: When constructing DateTimeFormat or NumberFormat for
12602 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
12603 MonoCultureInfo contructed from the current locale is always
12604 read-only and has UseUserOverride set to true. All MonoCultureInfo
12605 instances returned for GetCultures have both IsReadOnly and
12606 UseUserOverride set to true. Fixes part of bug #81930.
12608 2007-06-22 Jonathan Chambers <joncham@gmail.com>
12610 * icall-def.h: Update System.__ComObject icalls
12611 * marshal.c: Avoid managed transition (and object creation)
12612 when looking up COM interface in RCW.
12613 * marshal.h: Ditto.
12615 Code is contributed under MIT/X11 license.
12617 2007-06-22 Zoltan Varga <vargaz@gmail.com>
12619 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
12620 to avoid crashes during assembly unloading.
12622 2007-06-22 Raja R Harinath <rharinath@novell.com>
12624 Fix MethodInfo.IsGenericMethodDefinition
12625 * reflection.c (mono_reflection_bind_generic_method_parameters):
12626 Rearrange code to ensure we always uses a generic method definition.
12627 * class.c (mono_class_inflate_generic_method_full): Set
12628 'generic_container' field only for generic method definitions.
12629 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12630 Use presense of 'generic_container' field as indication of being a
12631 generic method definition.
12633 2007-06-21 Zoltan Varga <vargaz@gmail.com>
12635 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12637 * object-internals.h: Reflect changes in the layout of the managed Delegate
12640 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
12641 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
12642 runtime memory used by the dynamic method. Fixes #77146.
12644 2007-06-21 Dick Porter <dick@ximian.com>
12647 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
12648 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
12651 2007-06-21 Raja R Harinath <rharinath@novell.com>
12653 * reflection.c (method_encode_methodspec): Add a tripwire.
12654 * class.c (inflate_generic_type): The fully open generic type is
12655 not the same as the generic type definition.
12657 2007-06-21 Martin Baulig <martin@ximian.com>
12659 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
12661 * mono-debug-debugger.h
12662 (MonoDebuggerBreakpointInfo): Removed.
12663 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
12664 (mono_debugger_remove_breakpoint): Likewise.
12665 (mono_debugger_breakpoint_callback): Likewise.
12666 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
12668 2007-06-21 Raja R Harinath <rharinath@novell.com>
12670 * metadata.c (mono_metadata_lookup_generic_class): The fully open
12671 generic type is not the same as the generic type definition.
12672 * class.c (mono_generic_class_get_class): Likewise.
12674 2007-06-20 Geoff Norton <gnorton@customerdna.com>
12676 * icall.c: The second argument to
12677 System.Reflection.MethodBase.GetMethodFromHandleInternalType
12678 is a MonoType not a MonoClass.
12680 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12682 * verify.c: support for function pointers in the verifier
12684 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
12686 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
12688 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12690 * assembly.c: removed Mono.Data.SqliteClient from the list of
12691 forward-compatible assemblies as it breaks the ABI (bug #81899).
12693 2007-06-19 Raja R Harinath <rharinath@novell.com>
12695 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
12696 lookup/update with the loader lock.
12697 * reflection.c (mono_class_bind_generic_parameters): No need to
12698 protect mono_metadata_lookup_* with the loader lock.
12699 * class.c (inflate_generic_type): Likewise.
12701 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
12702 on a generic instantiated type.
12704 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
12706 *verify.c: produce meanfull error messages on verification error
12707 *verify.c: fixed some cases of verification errors reported as validation errors
12708 *pedump.c: fixed the error name array, now it shows validation errors properly
12709 *verify.h: fixed the contant that should be used for verification errors
12711 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12713 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
12714 for bug #77596, 81858 and 80743 (generics data structures on domain
12717 2007-06-15 Raja R Harinath <rharinath@novell.com>
12719 Avoid allocating 'MonoGenericContext' on the heap.
12720 * class-internals (_MonoMethodInflated::context): Make field
12721 inline, not a pointer.
12722 * loader.c (method_from_methodspec): Allocate 'new_context' on the
12723 stack. Use the context embedded within the inflated method as the
12724 hash key, rather than 'new_context'.
12725 * class.c (inflate_generic_context): Simplify. Return a struct
12726 rather than allocating on the heap.
12727 (mono_class_inflate_generic_method_full): Update to changes. Now,
12728 doesn't salt away a copy of the context -- simplifying the
12729 lifetime rules of a 'MonoGenericContext *'.
12730 (mono_method_get_context): Return pointer to embedded context.
12731 (setup_generic_array_ifaces): Allocate temporary context on stack.
12732 * reflection.c (inflate_mono_method): Likewise.
12733 (mono_reflection_bind_generic_method_parameters): Likewise.
12734 Use the context embedded within the inflated method as the hash key.
12736 Avoid a source of allocation of 'MonoGenericContext'.
12737 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
12738 and 'cached_context' fields into embedded 'MonoGenericContext' field.
12739 * class.c: Update to changes.
12740 (mono_generic_class_get_context): Simplify drastically. Now just
12741 returns a pointer to the field.
12742 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
12743 argument as a const pointer.
12744 (mono_metadata_generic_context_equal): Likewise.
12745 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
12748 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
12750 * verify.c improved the handling of brtrue/brfalse, factored out common code
12752 2007-06-14 Raja R Harinath <rharinath@novell.com>
12754 Kill MonoGenericMethod.
12755 * class-internals.h (MonoGenericContext::method_inst): Rename from
12756 'gmethod' and convert to a MonoGenericInst.
12757 (MonoGenericMethod): Remove.
12758 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
12759 * loader.c (method_from_methodspec): Update to changes. Use a
12760 MonoGenericContext as the key to the hashtable.
12761 * metadata.c (mono_metadata_generic_context_equal): Rename from
12762 'mono_metadata_generic_method_equal' and take MonoGenericContext.
12763 (mono_metadata_generic_context_hash): Likewise from
12764 'mono_metadata_generic_method_hash'. Change hash function.
12765 (mono_metadata_load_generic_params): Update to changes.
12766 (mono_get_shared_generic_method): Remove.
12767 * metadata-internals.h (mono_get_shared_generic_method): Remove.
12768 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
12769 (inflate_generic_context): Likewise.
12770 (mono_class_inflate_generic_method_full): Likewise.
12771 (setup_generic_array_ifaces): Likewise.
12772 (mono_class_create_from_typespec): Likewise.
12773 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
12774 (method_encode_methodspec): Update callsite.
12775 (reflection_methodbuilder_to_mono_method): Update to changes.
12776 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
12777 MonoGenericContext as the key to the hashtable.
12778 (inflate_mono_method): Update to changes.
12780 * class-internals.h (MonoGenericMethod::container): Remove.
12781 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
12783 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
12785 * profiler-private.h, profiler.c, profiler.h: added API to profile
12788 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
12790 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
12792 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
12794 * verify.c: method invocation is now validated, now we verify parameter types on stack.
12795 Fixed overflow and underflow not aborting the verification process.
12797 2007-06-13 Mark Probst <mark.probst@gmail.com>
12799 * class-internals.h (MonoStats): Added stats entries for dynamic
12802 2007-06-12 Zoltan Varga <vargaz@gmail.com>
12804 * loader.c (mono_free_method): Free header->locals and header->clauses.
12806 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
12809 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
12811 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
12813 2007-06-12 Raja R Harinath <rharinath@novell.com>
12815 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
12818 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12820 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
12822 2007-06-11 Raja R Harinath <harinath@gmail.com>
12824 MonoGenericMethod on a diet
12825 * class-internals.h (_MonoMethodInflated::reflection_info): Move
12827 (_MonoGenericMethod::reflection_info): ... from here.
12828 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
12830 * reflection.c (inflate_mono_method): Likewise.
12831 (mono_reflection_bind_generic_method_parameters): Likewise.
12833 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12835 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
12836 *verify.c: factored long ldarg forms to share code with short forms
12838 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
12840 *verify.c: fixed code formating factored some duplicate code
12841 into a new function
12843 *verify.h: fixed binary incompatibility introduced earlier
12845 *pedump.c: fixed formating
12847 2007-06-11 Raja R Harinath <harinath@gmail.com>
12849 Fix assertion when disassembling Mono.C5.dll
12850 * loader.c (method_from_methodspec): Avoid inflating a method
12851 twice with the same context. If the methodref is inflated, use
12852 the declaring method instead.
12854 * class.c (mono_class_from_generic_parameter): Fix case similar to
12855 bug #81830 handled below, but for method containers.
12857 2007-06-10 Raja R Harinath <harinath@gmail.com>
12859 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
12860 get_shared_generic_class. Directly inflate the instance.
12861 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
12862 (inflate_generic_class): Delete.
12863 (get_shared_generic_class): Delete. Move setting of
12864 'cached_class' and 'cached_context' ...
12865 * metadata.c (mono_metadata_lookup_generic_class): ... here.
12867 * metadata.c (mono_metadata_lookup_generic_class): Change
12868 signature to take the components of a MonoGenericClass rather than
12869 an allocated MonoGenericClass. Change semantics to be intern-like.
12870 * reflection.c (mono_class_bind_generic_parameters): Update to
12871 changes. Make locking region tighter.
12872 * class.c (inflate_generic_class): Update to changes.
12873 (get_shared_generic_class): Likewise.
12874 * metadata-internals.h: Likewise.
12876 * reflection.c (mono_class_bind_generic_parameters): Take and
12877 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
12878 (mono_reflection_bind_generic_parameters): Use
12879 'mono_class_bind_generic_parameters' rather than duplicate the code.
12880 * class.c (mono_bounded_array_class_get): Update to changes.
12881 * object-internals.h: Likewise.
12883 * reflection.c (mono_class_bind_generic_parameters): Only support
12884 parameterizing generic type definitions. Remove support for other
12887 2007-06-08 Zoltan Varga <vargaz@gmail.com>
12889 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
12891 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
12892 in the dynamic case.
12894 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
12896 * threads.c: When cleaning up thread, reset the Background bit.
12899 2007-06-08 Jonathan Chambers <joncham@gmail.com>
12901 * metadata.c: Move variable declarations to top of scope.
12902 * verify.c: Move variable declarations to top of scope.
12904 Code is contributed under MIT/X11 license.
12906 2007-06-08 Raja R Harinath <rharinath@novell.com>
12908 * reflection.c (mono_class_bind_generic_parameters): Replace
12909 open-coded loop with mono_metadata_inflate_generic_inst.
12911 * class.c (get_shared_generic_class): Don't call
12912 mono_get_shared_generic_inst. Use the container's own
12915 * metadata.c (mono_metadata_load_generic_params): Move
12916 initialization of 'context' field here from ...
12917 * class.c (mono_class_create_from_typedef): ... here, and ...
12918 * loader.c (mono_get_method_from_token): ... here.
12920 * class.c (get_shared_generic_class): Rename from
12921 mono_get_shared_generic_class and make static.
12922 (mono_get_shared_generic_inst): Move to metadata.c.
12923 * loader.c (mono_get_shared_generic_method): Likewise.
12924 * class-internals.h, metadata-internals.h: Update to changes.
12927 * class.c (mono_class_from_generic_parameter): Don't assume a
12928 generic container owner exists. Generic containers from monodis
12931 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
12933 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
12934 * verify.h: new typedefs to returns the non-verifiable status
12935 * verify.c: initial implementation of generics, stack merging and object compatibility check
12937 2007-06-06 Mark Probst <mark.probst@gmail.com>
12939 * class.c, image.c, class-internals.h (MonoImage): class_cache is
12940 a MonoInternalHashTable again (fixed bug in internal hash table
12943 2007-06-06 Mark Probst <mark.probst@gmail.com>
12945 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12946 MonoInternalHashTable again (fixed bug in internal hash table
12949 2007-06-06 Mark Probst <mark.probst@gmail.com>
12951 * class.c, image.c, class-internals.h, domain.c,
12952 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
12953 changes. Have to figure out what makes them break the SWF
12956 2007-06-04 Mark Probst <mark.probst@gmail.com>
12958 * class.c, image.c, class-internals.h (MonoImage): class_cache is
12959 a MonoInternalHashTable now.
12961 2007-06-04 Mark Probst <mark.probst@gmail.com>
12963 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12964 MonoInternalHashTable now.
12966 2007-05-31 Zoltan Varga <vargaz@gmail.com>
12968 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
12971 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
12973 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
12974 dependent trampoline.
12976 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12978 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
12980 2007-05-29 Robert Jordan <robertj@gmx.net>
12982 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
12984 2007-05-28 Zoltan Varga <vargaz@gmail.com>
12986 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
12988 2007-05-25 Jonathan Chambers <joncham@gmail.com>
12990 * marshal.c: Fix interface lookup loops for
12991 cominterop_get_com_slot_for_method and
12992 cominterop_get_method_interface. Only need to lookup
12993 if type is a class, else use interface type method is on.
12995 Code is contributed under MIT/X11 license.
12997 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
12999 * reflection.c: HasSecurity can be present even if no specially
13000 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
13001 SecurityAttribute). Fix CAS regression tests on buildbot.
13003 2007-05-24 Jonathan Chambers <joncham@gmail.com>
13005 * appdomain.c: Add configure checks for header files.
13006 * image.c: Add configure checks for header files.
13007 * file-io.c: Add configure checks for header files.
13008 * debug-mono-symfile.c: Add configure checks for header files.
13009 * threadpool.c: Add configure checks for header files.
13010 * console-io.c: Add configure checks for header files.
13011 * profiler.c: Add configure checks for header files.
13012 * rawbuffer.c: Add configure checks for header files.
13013 * icall.c: Add configure checks for header files.
13014 * rand.c: Add configure checks for header files.
13015 * socket-io.c: Add configure checks for header files.
13017 Code is contributed under MIT/X11 license.
13019 2007-05-24 Zoltan Varga <vargaz@gmail.com>
13021 * reflection.c (mono_custom_attrs_from_builders): Remove the
13022 assertion as it breaks the build.
13024 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
13026 * reflection.c (lookup_custom_attr): Make a copy here too.
13028 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
13031 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
13034 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
13037 2007-05-22 Zoltan Varga <vargaz@gmail.com>
13039 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
13040 (load_cattr_value): Ditto.
13042 2007-05-20 Zoltan Varga <vargaz@gmail.com>
13044 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
13046 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
13048 * threads.c: In "start_wrapper", set apartment_state to MTA if
13049 apartment_state is Unknown and we're running on 2.0 profile or
13051 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
13052 to main method, then set apartment_state to Unknown on 1.0 profile,
13053 and MTA on 2.0 profile.
13055 2007-05-16 Jb Evain <jb@nurv.fr>
13057 * class-internals.h (MonoDefaults): Add an attribute_class and
13058 customattribute_data_class.
13059 * domain.c (mono_init_internal): Populate them.
13060 * reflection.c: Use them to remove duplicates. Make a vew
13061 MonoClass variables `static'.
13063 2007-05-15 Massimiliano Mantione <massi@ximian.com>
13065 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
13066 step in implementing IMT, so that all isinst checks now can go
13067 through the bitmap.
13068 This was needed because vtables for TransparentProxy need to look
13069 like the vtable of the "target" class, so they need to point to
13070 its interface bitmap directly.
13072 * object.c: inside "mono_class_create_runtime_vtable" and
13073 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
13075 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
13077 * object-internals.h
13078 culture-info.h : added territory field in MonoCulture and
13079 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
13080 * locales.c : fill territory field above too.
13081 * culture-info-table.h : regenerated.
13083 2007-05-12 Zoltan Varga <vargaz@gmail.com>
13085 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
13088 2007-05-11 Jonathan Chambers <joncham@gmail.com>
13090 * object.c: Always initialize apartment, even if
13091 there is no custom attributes on entry point.
13093 Code is contributed under MIT/X11 license.
13095 2007-05-10 Jonathan Chambers <joncham@gmail.com>
13097 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
13098 * metadata.c: If no encoding is set, check for unicode
13101 Code is contributed under MIT/X11 license.
13103 2007-05-09 Jonathan Chambers <joncham@gmail.com>
13105 * threads.c: Handle if mono_thread_current returns NULL
13107 Code is contributed under MIT/X11 license.
13109 2007-05-09 Jonathan Chambers <joncham@gmail.com>
13111 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
13112 in start_wrapper. Added mono_thread_init_apartment_state and
13113 mono_thread_cleanup_apartment_state.
13114 * object.c: Initialize thread apartment state on main thread
13115 by checking for STAThreadAttribute on entry point.
13116 * object-internals.h: Add apartment_state field to MonoThread.
13117 * threads-types.h: Add unmanaged definition of
13118 System.Threading.ApartmentState, MonoThreadApartmentState.
13120 Code is contributed under MIT/X11 license.
13122 2007-05-08 Jonathan Chambers <joncham@gmail.com>
13124 * class.c: Fix windows build.
13125 * class-internals.h: Fix windows build.
13127 Code is contributed under MIT/X11 license.
13129 2007-05-08 Robert Jordan <robertj@gmx.net>
13131 * process.c (CreateProcess_internal):
13132 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
13133 .CreateNoWindow was specified. Fixes #81496.
13135 2007-05-08 Massimiliano Mantione <massi@ximian.com>
13137 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
13138 step in implementing IMT, replaced it with two compact arrays
13139 (interfaces_packed and interface_offsets_packed) and a bitmap that
13140 is used for isinst checks (interface_bitmap).
13142 * class.c: (compare_interface_ids): compare function to pass to
13143 bsearch when looking for an interface with a given id.
13144 (mono_class_interface_offset): reimplemented using bsearch on
13145 interfaces_packed, getting the offset from interface_offsets_packed.
13146 (print_implemented_interfaces): utility debugging function.
13147 (setup_interface_offsets): reworked to initialize interfaces_packed,
13148 interface_offsets_packed and interface_bitmap.
13150 * object.c: replaced all accesses to "MonoClass.interface_offsets"
13151 with uses of interfaces_packed and interface_offsets_packed.
13153 2007-05-08 Massimiliano Mantione <massi@ximian.com>
13155 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
13156 mono_class_interface_offset prototype to wrap all accesses to
13157 "MonoClass.interface_offsets".
13159 * class.c: Implemented mono_class_interface_offset, and wrapped all
13160 accesses to "MonoClass.interface_offsets".
13162 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
13163 "MonoClass.interface_offsets".
13165 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
13167 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
13168 GetMethodFromHandle overloads (bug #78637).
13170 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
13172 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
13173 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
13175 2007-05-01 Zoltan Varga <vargaz@gmail.com>
13177 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
13180 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
13182 (mono_custom_attrs_from_index): Ditto.
13184 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
13187 2007-04-30 Zoltan Varga <vargaz@gmail.com>
13189 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
13190 is now allocated from a mempool.
13192 2007-04-28 Zoltan Varga <vargaz@gmail.com>
13194 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
13195 caller holds threads_lock, leading to deadlocks. Fixes #81476.
13197 2007-04-26 Zoltan Varga <vargaz@gmail.com>
13199 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
13200 mono_loader_clear_error () too late. Fixes #81463.
13202 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
13204 * culture-info-table.h : regenerated.
13206 2007-04-25 Zoltan Varga <vargaz@gmail.com>
13208 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
13211 2007-04-25 Dick Porter <dick@ximian.com>
13213 * Makefile.am: Put the mingw enforced-optimisation back into the
13214 PLATFORM_WIN32 section.
13216 2007-04-24 Zoltan Varga <vargaz@gmail.com>
13218 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
13221 * image.c (mono_image_load_module): New API function to load a module reference.
13223 * image.c (load_modules): Load modules lazily. Fixes #80812.
13225 * class.c (mono_class_from_typeref): Use mono_image_load_module.
13227 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
13229 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
13230 to mono_image_load_module_dynamic.
13232 2007-04-23 Jonathan Chambers <joncham@gmail.com>
13234 * marshal.c: Fix calling convention for CCW on non-windows
13235 platforms. STDCALL on windows, CDECL everywhere else to work
13236 with XPCOM and MainWin COM.
13238 Code is contributed under MIT/X11 license.
13240 2007-04-23 Martin Baulig <martin@ximian.com>
13245 (method_from_memberref): Added `gboolean *used_context' argument.
13246 (mono_get_method_from_token): Likewise.
13247 (mono_get_method_full): Don't insert the method in the cache when
13248 `used_context' is true.
13250 2007-04-23 Raja R Harinath <rharinath@novell.com>
13252 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
13254 * reflection.c (mono_reflection_bind_generic_parameters): Don't
13255 create new MonoTypes for returned types.
13256 * class.c (mono_generic_class_get_class): Export mono-internal.
13257 * class-internals.h: Update to changes.
13259 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
13261 * threadpool.c, threadpool.h, icall-def.h: patch from
13262 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
13264 2007-04-18 Zoltan Varga <vargaz@gmail.com>
13266 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
13268 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
13270 * threads.c (mono_thread_get_stack_bounds): New helper function.
13272 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
13273 Correctly compute stack bounds when attaching. Fixes #81394.
13275 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
13277 * reflection.c: fix handling of doubles in custom attributes
13278 for the arm-fpa format (bug #81368).
13280 2007-04-18 Raja R Harinath <rharinath@novell.com>
13282 * reflection.c (assembly_add_win32_resources): Mildly relax an
13283 bounds check to let the end pointer point just past the end of the
13284 allocated buffer. (may fix #81384)
13286 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
13288 * culture-info-table.h : regenerated.
13290 2007-04-07 Zoltan Varga <vargaz@gmail.com>
13292 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
13293 the thread is aborted early.
13295 2007-04-05 Dick Porter <dick@ximian.com>
13297 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
13298 FindFirstFile()/FindNextFile() to find entries. This lets the
13299 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
13302 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
13304 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
13306 2007-04-04 Martin Baulig <martin@ximian.com>
13309 (mono_method_desc_full_match): Add support for nested classes.
13311 2007-04-02 Zoltan Varga <vargaz@gmail.com>
13313 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
13315 2007-04-01 Zoltan Varga <vargaz@gmail.com>
13317 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
13318 waiting for too many threads.
13320 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
13322 * environment.c: Fix return value check on uname so we can get the
13323 executing version on Solaris operating systems.
13325 2007-03-28 Jb Evain <jbevain@gmail.com>
13327 * class.c (mono_type_get_name_recurse): Complete the
13328 fix for the creation of assembly qualified names for
13329 pointer types. Fixes #81208.
13331 2007-03-27 Dick Porter <dick@ximian.com>
13333 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
13334 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
13338 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
13339 the value of ReleaseMutex().
13341 2007-03-27 Dick Porter <dick@ximian.com>
13343 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
13344 in little-endian order, not network endian, so must be converted
13345 to host endian here. Fixes bug 80593.
13347 2007-03-22 Jb Evain <jbevain@gmail.com>
13349 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
13350 qualified names for pointer types. Fixes #81208.
13352 2007-03-21 Jonathan Chambers <joncham@gmail.com>
13354 * marshal.c: Add support for PreserveSigAttribute.
13356 Code is contributed under MIT/X11 license.
13358 2007-03-14 Zoltan Varga <vargaz@gmail.com>
13360 * process.c: Fix endianness issues. Fixes #81126.
13362 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
13363 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
13365 * image.c (mono_image_lookup_resource): Make this work on big-endian
13366 machines.Change API contract so the caller needs to free the return value.
13368 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
13371 2007-03-14 Martin Baulig <martin@ximian.com>
13373 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
13374 mono_type_get_desc() as well.
13376 2007-03-13 Jonathan Chambers <joncham@gmail.com>
13378 * icall.c: Fix environ access in VS.
13380 2007-03-13 Alp Toker <alp@atoker.com>
13382 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13383 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13386 2007-03-12 Zoltan Varga <vargaz@gmail.com>
13388 * reflection.c (mono_reflection_create_dynamic_method): Add support for
13389 circular references among dynamic methods. Fixes #81091.
13391 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
13393 2007-03-09 Martin Baulig <martin@ximian.com>
13395 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
13397 2007-03-09 Jonathan Chambers <joncham@gmail.com>
13399 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
13400 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
13402 Code is contributed under MIT/X11 license.
13404 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
13406 * loader.c: Reapply patch for bug #79424.
13408 2007-03-06 Zoltan Varga <vargaz@gmail.com>
13410 * metadata.c (mono_type_to_unmanaged): Only convert object to
13411 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
13413 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
13415 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
13416 (and incorrectly set) is_reference field from MonoGenericInst.
13418 2007-03-06 Zoltan Varga <vargaz@gmail.com>
13420 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
13423 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
13425 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
13427 2007-03-05 Miguel de Icaza <miguel@novell.com>
13429 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
13430 FileOptions.1 value to mean "temporary", map that to
13431 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
13435 2007-03-03 Marek Habersack <mhabersack@novell.com>
13437 * appdomain.c: implement MS .Net style shadow copying. Copies of
13438 the assemblies are made in a subdirectory of the dynamic base
13439 directory, the assembly names are preserved.
13440 Copy .mdb and .config files along with the assemblies being shadowed.
13442 2007-02-28 Zoltan Varga <vargaz@gmail.com>
13444 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
13445 (emit_marshal_handleref): Ditto.
13447 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
13448 on Visual C++. Fixes #80671.
13450 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13452 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
13453 for clone operations.
13455 2007-02-28 Zoltan Varga <vargaz@gmail.com>
13457 * marshal.c: Fix warnings.
13459 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
13461 * loader.c: allow case-insensitive matching of the dll name
13462 in dllmap handling when prefixed with "i:".
13464 2007-02-20 Jonathan Chambers <joncham@gmail.com>
13466 * threads.c: Fix #ifdef for dummy_apc function for VS.
13468 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
13470 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
13472 2007-02-19 Massimiliano Mantione <massi@ximian.com>
13473 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
13474 giving precedence to the methods with a fully qualified name
13475 (InterfaceName.MethodName) when building the interface sections
13478 2007-02-16 Dick Porter <dick@ximian.com>
13480 * threadpool.c (append_job): Fix fast-path array handling, so it's
13481 less likely the array will grow exponentially when the load is
13484 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13486 * metadata-internals.h, loader.c: fix dllmap lookup order
13487 for non-function maps, too, and prepare for fallback code.
13489 2007-02-12 Robert Jordan <robertj@gmx.net>
13491 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
13492 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
13493 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
13494 GlobalFree. Fixes a part of bug #77075.
13496 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
13498 * loader.c: implemented typedef parent in field memberref.
13500 2007-02-11 Jonathan Chambers <joncham@gmail.com>
13502 * marshal.c: Fix warnings and remember to call Release on
13505 Code is contributed under MIT/X11 license.
13507 2007-02-10 Miguel de Icaza <miguel@novell.com>
13509 * class-internals.h: Add MonoHandleRef definition, and
13510 handleref_class to mono_defaults.
13512 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
13513 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
13515 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
13516 (do nothing on this stage)
13517 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
13518 (emit_marshal_handleref): New method, used for argument handling
13521 2007-02-08 Jonathan Chambers <joncham@gmail.com>
13523 * class.c (mono_class_setup_parent): Lazily init com types.
13524 * domain.c (mono_init_internal, mono_init_com_types): Lazily
13526 * object.c (mono_remote_class_vtable): Lazily init com types.
13527 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
13528 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
13529 * domain-internals.h: Expose mono_init_com_types.
13530 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
13531 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
13532 Add support for COM Callable Wrapper marshalling.
13533 * marshal.h: Add icall definitions.
13534 * gc.c: Handle freeing of CCWs in finalizer code.
13536 Code is contributed under MIT/X11 license.
13538 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
13540 * reflection.c: changed all the signature encoding code to use
13541 a variable-sized buffer.
13543 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13545 * marshal.c: locking fixes: never take the loader lock
13546 or other runtime locks when holding the marshal lock
13549 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
13551 * marshal.c: make the delegate function pointer mapping
13552 work for the moving GC.
13554 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
13556 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
13559 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13561 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
13564 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13566 * threadpool.c: made the code moving-GC safe.
13568 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13570 * assembly.c, boehm-gc.c, class-internals.h, class.c,
13571 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
13572 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
13574 * reflection.c: warning cleanup, some threading and moving GC fixes.
13576 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
13578 * class.c, loader.c: create the needed Set/Get/Address array methods
13579 as well as the .ctors in mono_class_init (), fixes bug #80567.
13581 2007-01-24 Zoltan Varga <vargaz@gmail.com>
13583 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
13584 we doesn't decrease its alignment. Should fix the sparc build.
13586 2007-01-24 Dick Porter <dick@ximian.com>
13589 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13590 Create the returned object if we need to ignore an unsupported
13591 socket option. Fixes a segfault reported by Atsushi.
13593 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13595 * class.c, object.c: restrict GC-tracked fields to
13596 UIntPtr fields used inside corlib, so we provide better
13597 type info to the GC and also allow broken packing as in
13600 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
13602 * sgen-gc.c: removed duplicated function.
13604 2007-01-19 Miguel de Icaza <miguel@novell.com>
13606 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
13607 value that means that the value is not supported, but that we
13608 should not return a failure, but instead report this as a
13609 successful operation.
13611 2007-01-19 Raja R Harinath <rharinath@novell.com>
13613 Fix tests/bug79956.2.il
13614 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
13615 (mono_generic_class_get_class): If the generic definition in an
13616 enum, copy over other fields related to it.
13618 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13620 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
13621 genericinst enums (bug #79215).
13623 2007-01-17 Massimiliano Mantione <massi@ximian.com>
13624 * class.c: Fix bug 80307.
13626 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
13628 * image.c: if the file table is not present, try to load
13629 all the modules, since we don't have info about them
13630 having or not metadata (bug #80517).
13631 * assembly.c: allow mono_assembly_load_references () to
13632 work for netmodules.
13634 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13636 * image.c, metadata-internals.h, object.c: execute module
13637 cctors when running on the 2 runtime if present (bug #80487).
13639 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13641 * icall.c: optimized InitializeArray() on bigendian.
13643 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
13645 * icall.c: fix for the broken ARM FPA double format.
13647 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13649 * icall.c: handle endian issues for r4 and r8 types, too, in
13650 the InitializeArray() icall.
13652 2007-01-15 Miguel de Icaza <miguel@novell.com>
13654 * loader.c (mono_loader_error_prepare_exception): Clear the error
13655 once we have extracted the information from it, do this before we
13656 call into the JIT's class loading mechanisms.
13658 * object.c (mono_class_create_runtime_vtable): Do not clear the
13659 loader error before calling mono_class_get_exception_for_failure
13660 as the loader error is needed inside
13661 mono_class_get_exception_for_failure to throw the error (thinko).
13665 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13667 * reflection.c: align fields rva data so it's faster to load at
13670 2007-01-12 Raja R Harinath <rharinath@novell.com>
13672 Prepare to simplify GenericMethod handling.
13673 * class-internals.h (mono_method_get_context): New accessor function.
13674 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
13675 rather than directly accessing '->context' field.
13677 * class-internals.h (_MonoGenericParam.method): Move ...
13678 (_MonoGenericContainer): ... here. Add into union with klass field.
13679 * class.c, icall.c, loader.c, metadata.c, reflection.c:
13682 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
13684 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
13685 the wrapper type enum and reduce relocations.
13687 2007-01-12 Raja R Harinath <rharinath@novell.com>
13689 * reflection.c (inflate_mono_method): Reuse method instantiation
13690 from the generic method, if available.
13692 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13694 * marshal.c (emit_marshal_variant): Fix conv_arg
13695 type in last commit, based on whether parameter is byref.
13697 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13699 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
13701 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
13702 MONO_TYPE_OBJECT back for VARIANT support.
13704 2007-01-11 Jonathan Chambers <joncham@gmail.com>
13706 * marshal.c, marshal.h, icall-def.h: Implement
13707 Marshal.ReAllocCoTaskMem.
13709 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
13711 * marshal.c: memory retention fixes: use the proper
13712 image cache for runtime_invoke method lookups.
13714 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13716 * mempool.c: added code to help debug mempool allocations.
13718 2007-01-11 Dick Porter <dick@ximian.com>
13720 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
13721 support (experimenting with faking it with IP_MTU_DISCOVER for
13722 systems that don't have IP_DONTFRAGMENT.)
13723 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
13726 * icall-def.h: new System.Net.Sockets.Disconnect icall.
13728 * socket-io.h: Add new fields to MonoSocketAsyncResult
13729 corresponding to the new ones in Socket.cs.
13731 2007-01-11 Raja R Harinath <rharinath@novell.com>
13733 Fix IronPython regression mentioned in #80249
13734 * metadata.c (do_mono_metadata_parse_generic_class): Clear
13735 'cached_context' field, since it may have been initialized as a
13736 side-effect of metadata parsing.
13738 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
13739 (_MonoGenericClass.cached_class): Move here and rename from lone
13740 remaining field of ...
13741 (_MonoInflatedGenericClass): ... this. Remove.
13742 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
13745 Fix mcs/tests/test-128.cs regression.
13746 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
13747 2007-01-10 change below.
13748 [MONO_TYPE_OBJECT]: Recurse into array case.
13750 2007-01-11 Raja R Harinath <harinath@gmail.com>
13752 * class-internals.h (mono_get_inflated_generic_class): Remove.
13753 * class.c (mono_get_inflated_generic_class): Remove.
13754 (mono_generic_class_get_class): Rename from
13755 mono_class_create_generic.
13756 (mono_class_from_mono_type) [GENERICINST]: Use it.
13757 * reflection.c, metadata.c: Update to changes. Use
13758 'mono_class_from_mono_type'.
13760 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
13762 * reflection.c: use passed type when encoding an array element
13763 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
13765 2007-01-09 Robert Jordan <robertj@gmx.net>
13767 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
13768 result arguments (someDelegate.EndInvoke (unrelatedAres)).
13771 2007-01-09 Raja R Harinath <rharinath@novell.com>
13773 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
13775 * object.c (set_value): Avoid aliasing between type->data.klass
13776 and type->data.generic_class.
13778 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
13780 2007-01-08 Raja R Harinath <rharinath@novell.com>
13782 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
13783 between type->data.klass and type->data.generic_class.
13785 2007-01-08 Lluis Sanchez <lluis@ximian.com>
13787 * marshal.c: In MS.NET, StringBuilder objects are not copied by
13788 value in out parameters.
13790 2007-01-08 Raja R Harinath <rharinath@novell.com>
13792 Simplify invariant for MonoGenericClass::klass field.
13793 * class.c (mono_class_create_generic): Verify 'klass' is null.
13794 * metadata.c (do_mono_metadata_parse_generic_class): Don't
13795 initialize 'klass' field.
13797 2007-01-05 Raja R Harinath <rharinath@novell.com>
13799 Ongoing work to avoid redundant data and simplify invariants.
13800 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
13801 'generic_class', and change type to a GenericInst.
13802 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
13803 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
13805 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
13807 * class.c : skip io-layer under PLATFORM_WIN32.
13809 2007-01-03 Tor Lillqvist <tml@novell.com>
13811 Fix #80305: In a bundled executable, look in the bundled exe
13812 assembly to determine the runtime version. Add the possibility to
13813 bundle also the machine.config file.
13815 * assembly.c (mono_assembly_open_from_bundle): Make
13816 non-static. Allow being called even if we have no bundled
13817 assemblies, and return NULL right away in that case.
13819 * domain-internals.h: Declare mono_assembly_open_from_bundle()
13822 * domain.c (app_config_parse): Take an assembly exe file name as
13823 parameter instead of a config file name. Check for a bundled
13824 config file for that assembly by calling
13825 mono_config_string_for_assembly_file() (see below) before looking
13826 for one in the file system.
13827 (get_runtimes_from_exe): Corrsponding change to call of
13828 app_config_parse().
13829 (get_runtimes_from_exe): Check for bundled assembly exe file first
13830 by calling mono_assembly_open_from_bundle(). If no bundled
13831 assembly exe file is found, call mono_image_open() as before to
13832 look it up in the file system.
13834 * mono-config.c: Add variable bundled_machinec_onfig.
13835 (mono_config_string_for_assembly_file): New function.
13836 (mono_config_for_assembly): Move code snippet that looks for a
13837 bundled assembly .config file into the above new function. Call
13839 (mono_register_machine_config, mono_get_machine_config): New
13840 functions to set and retrieve
13842 * assembly.h: Declare mono_register_machine_config().
13844 * mono-config.h: Declare mono_get_machine_config() and
13845 mono_config_string_for_assembly_file().
13847 * icall.c: No declaration of environ necessary on Win32. It is
13848 declared (as a macro expanding to a function call) in stdlib.h.
13849 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
13850 New internal mono function. Returns the value of
13851 mono_get_machine_config() as a Mono string.
13853 * icall-def.h: Add get_bundled_machine_config().
13855 2007-01-04 Raja R Harinath <rharinath@novell.com>
13857 Remove redundant field
13858 * class-internals.h (_MonoGenericContext.container): Remove field.
13859 * loader.c (mono_method_get_signature_full): Don't parse a
13860 "container" for a signature parse when the signature is inflated
13862 (method_from_methodspec): Likewise, for a generic_inst.
13863 * class.c, metadata.c, reflection.c: Update to changes.
13865 2006-01-04 Raja R Harinath <rharinath@novell.com>
13867 * class-internals.h (_MonoGenericClass): Rename 'context' field to
13868 'cached_context', and change semantics -- it starts off NULL, and
13869 is initialized on demand.
13870 * class.c (mono_generic_class_get_context): New accessor to
13871 replace 'context' field accesses.
13872 (mono_class_get_context): New helper.
13873 (*): Update to changes.
13874 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
13876 2007-01-03 Miguel de Icaza <miguel@novell.com>
13878 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
13879 before the memcpy. Fixes Marshal2 regression.
13881 2007-01-02 Jb Evain <jbevain@gmail.com>
13883 * blob.h: add a MONO_TYPE_ENUM definition
13884 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
13885 fix the encoding of arrays of enums in custom attributes.
13889 2007-01-01 Miguel de Icaza <miguel@novell.com>
13891 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
13892 string is null terminated, but only cut the string short if it
13893 overflows the buffer.
13895 (mono_string_to_byvalstr): Also fix this routine. The code here
13896 was not properly terminating a string (it was only terminated
13897 because of the previous catch-all memset).
13899 I left the memset, because I do not know if applications expect
13900 the runtime to clear this region.
13904 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13905 Clear the error before returning to unmanaged code to prevent the
13906 runtime from being confused later on (fixes 80420).
13907 (ves_icall_type_from_name): Always call mono_loader_clear_error
13908 after parsing a type that could have failed.
13909 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
13911 * loader.c (mono_loader_clear_error): Fix indentation.
13913 2006-12-28 Martin Baulig <martin@ximian.com>
13915 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
13917 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
13919 * reflection.c: patch from Rolf Bjarne Kvinge to fix
13920 getting a token for an EnumBuilder.
13922 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
13924 * reflection.c: be more careful in case resource generation
13925 fails to create the data array.
13927 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
13929 * sgen-gc.c: write barrier for clone and fix unregister handles.
13931 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
13933 * reflection.c: some fixes needed in the generics code for the moving GC.
13935 2006-12-22 Robert Jordan <robertj@gmx.net>
13937 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
13938 account. Fixes bug #80299.
13940 2006-12-21 Raja R Harinath <rharinath@novell.com>
13942 Fix WaitHandle usage in delegates.
13943 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
13944 * object.c (mono_wait_handle_new): Use the property set method to
13945 initialize the handle.
13946 (mono_wait_handle_get_handle): New.
13947 * threadpool.c (mono_async_invoke): Use it.
13948 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
13950 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
13952 2006-12-21 Jonathan Chambers <joncham@gmail.com>
13954 * marshal.c (emit_marshal): Call emit_marshal_variant and
13955 emit_marshal_com_interface when applicable.
13956 (emit_marshal_variant, emit_marshal_com_interface): Add
13957 methods for this case and remove if's from emit_marshal_object.
13959 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
13961 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
13963 2006-12-19 Jonathan Chambers <joncham@gmail.com>
13965 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
13966 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
13967 and GlobalFree on Windows. Remove FIXME.
13969 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
13971 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
13972 implementation for managed objects.
13974 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13976 * object.c: implemented code to be used for checking
13977 that no reference field overlaps with non-references.
13979 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13981 * threadpool.c: fix queue code to be compatible with the
13984 2006-12-18 Miguel de Icaza <miguel@novell.com>
13986 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
13987 in structures by throwing ArgumentNullException.
13989 (emit_marshal_safehandle): Also when they are null parameters.
13991 (emit_marshal_safehandle): Add support for ref
13992 SafeHandles parameters
13994 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13996 * profiler.c: updated to use the mono-dl API instead of
13999 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14001 * profiler.c: updated to use the mono-dl dynamic loading
14002 API instead of gmodule.
14004 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14006 * profiler.c: use readlink, older versions of glib don't have
14007 g_file_read_link ().
14009 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14011 * profiler.c: try to detect the path to mono if libc fails to provide
14012 a useful name (bug #80286).
14014 2006-12-16 Raja R Harinath <rharinath@novell.com>
14017 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
14018 instance, use the generic type definition instead.
14019 (ves_icall_Type_GetNestedTypes): Likewise.
14020 * class.c (mono_class_create_generic): Always set the
14021 nested_classes of a generic instance to NULL, even if the generic
14022 type definition has nested types.
14024 2006-12-15 Jonathan Chambers <joncham@gmail.com>
14026 * marshal.c (mono_string_from_bstr): Revert previous Windows change
14029 2006-12-15 Miguel de Icaza <miguel@novell.com>
14031 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
14032 my arguments were in the wrong order. I also fixed the Windows
14033 version which seems to have had the same issue.
14035 (mono_free_bstr): On Unix, this is g_free.
14036 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
14037 conversions (for the tests in corlib to pass).
14039 2006-12-14 Miguel de Icaza <miguel@novell.com>
14041 * marshal.c (emit_ptr_to_object_conv): For now, ignore
14042 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
14043 exception if a ref SafeHandle in a struct has changed).
14045 (emit_struct_conv): Do not perform layout checks for classes
14046 derived from SafeHandle, as those are specially handled.
14048 (emit_object_to_ptr_conv): Add support for
14049 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
14051 (emit_marshal_safehandle): Implement conversion of return values
14052 of safehandles (MARSHAL_ACTION_CONV_RESULT).
14054 * threads.c: WaitHandle now is compiled with two different handles
14055 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
14058 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
14059 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
14060 these routines to cope with both kinds of fields.
14062 2006-12-12 Miguel de Icaza <miguel@novell.com>
14064 * metadata.c (mono_type_to_unmanaged): Handle the case where
14065 type->data.klass is a SafeHandle, and in that case, return the
14066 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
14067 MONO_MARSHAL_CONV_SAFEHANDLE.
14069 2006-12-11 Miguel de Icaza <miguel@novell.com>
14071 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
14072 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
14073 calling emit_marshal_object.
14075 (emit_marshal_safehandle): Implement marshalling of
14076 SafeHandle parameters (no ref support yet).
14078 (MarshalAction): Document the defines as I implement
14079 them for SafeHandle.
14081 (emit_marshal_object): indentation police.
14083 * class-internals.h: Define MonoSafeHandle.
14084 Add safehandle_class to MonoDefaults type.
14086 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
14087 list of classes to check for fields.
14089 * domain.c (mono_init_internal): Add SafeHandle to the list of
14090 mono_defaults loaded.
14092 2006-12-15 Raja R Harinath <rharinath@novell.com>
14095 * reflection.c (mono_reflection_bind_generic_parameters): If the
14096 generic type definition is a type builder, ensure that it is fully
14097 initialized before instantiating it. Kill some dead code.
14099 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14101 * object.c: clear the loader_error () before loading
14102 more metadata stuff (bug #80258).
14104 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
14106 * icall.c, icall-defs.h: type modifiers icalls for
14107 parameters and properties.
14109 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
14111 * object.c, icall.c: fixed warnings.
14113 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14115 * marshal.c: fixed a couple of leaks and coding style in a few places.
14117 2006-12-08 Dick Porter <dick@ximian.com>
14119 * process.c: Cope with NULL ProcessStartInfo arguments on windows
14120 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
14123 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14125 * process.c: ProcessStartInfo may have only filename set and
14126 arguments can be NULL.
14128 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
14130 * icall.c: fix leak found by Robert Jordan.
14132 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14134 * marshal.c, marshal.h: generate managed method to access an element
14135 of a multi-dimensional array.
14137 2006-11-30 Paolo Molaro (lupus@ximian.com)
14139 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
14141 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14143 * icall.c: back out GetFields () fix until the serialization code is
14144 fixed to not depend on the incorrect behaviour.
14146 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14148 * profiler.c: provide defaults if none are set.
14150 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14152 * Makefile.am, attrdefs.h: new public header file with
14153 constants for attributes for use by embedders.
14155 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14157 * icall.c: GetFields () fix for bug #80064.
14159 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
14161 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
14162 removed long unused icalls.
14164 2006-11-27 Jonathan Chambers <joncham@gmail.com>
14167 (mono_marshal_emit_managed_wrapper): Level of indirection for
14168 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
14169 can be generated without a delegate class.
14170 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
14172 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14174 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14176 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
14179 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
14181 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
14182 icall-def.h: added icalls needed by System.GC.
14184 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
14186 * loader.c: ensure the class in catch clauses is handled
14187 correctly for generics methods (fixes bug#79980).
14189 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
14191 * monitor.h, monitor.c: added mono_locks_dump () function
14192 to help debug deadlocks involving managed locks.
14194 2006-11-13 Dick Porter <dick@ximian.com>
14196 * file-io.c (get_file_attributes): If the file is a symlink try
14197 and get the stat data for the target, but also add the
14198 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
14199 the specs for the windows symlink support, but will probably have
14200 to be reworked when I have test data from a vista machine. Fixes
14203 2006-11-13 Dick Porter <dick@ximian.com>
14205 * gc.c (mono_domain_finalize):
14206 * marshal.c (mono_delegate_begin_invoke):
14207 * threadpool.c (socket_io_init, mono_thread_pool_init)
14208 (mono_thread_pool_finish):
14209 * monitor.c (mono_monitor_try_enter_internal):
14210 * threads.c (mono_thread_resume, mono_thread_init)
14211 (mono_thread_suspend_all_other_threads)
14212 (mono_thread_execute_interruption):
14213 * appdomain.c (mono_domain_unload): Check for NULL error returns
14214 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
14217 2006-11-11 Miguel de Icaza <miguel@novell.com>
14220 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
14221 Only close the handle if the value of the handle is not
14222 INVALID_HANDLE_VALUE. This just makes the process a bit more
14225 Improvement for #75733, so that we do not run into this problem.
14228 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
14229 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
14230 internal variables. Fixes #79462
14233 2006-11-09 Dick Porter <dick@ximian.com>
14235 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14236 Use poll() not select(). Fixes bug 79397.
14238 2006-11-09 Raja R Harinath <rharinath@novell.com>
14241 * assembly.c (mono_assembly_load_from_full): Check that the given
14242 image has an assembly manifest.
14244 2006-11-09 Ankit Jain <jankit@novell.com>
14246 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
14247 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
14248 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
14250 2006-11-07 Dick Porter <dick@ximian.com>
14252 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
14253 Put the old resolver behaviour back for pre-2.0 profiles.
14255 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
14257 * threadpool.c: precise GC and locking fixes.
14259 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14261 * class.c: don't load types that have an explicit unaligned
14262 managed reference. Provide better info in the TypeLoad exception.
14263 Part of the fix for bug #79744.
14264 * object.c: use the correct check for class type load issues.
14266 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
14268 * class.c: enforce alignment of fields with managed references
14269 even when Pack=1 is forced by the user (bug #77788).
14271 2006-11-03 Dick Porter <dick@ximian.com>
14273 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
14274 If the address reverse lookup fails, return it as the hostname
14275 anyway. Fixes bug 79721.
14277 2006-11-03 Dick Porter <dick@ximian.com>
14279 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
14280 Fix build on Windows.
14282 2006-11-02 Dick Porter <dick@ximian.com>
14285 * object-internals.h:
14286 * exception.c (mono_get_exception_thread_interrupted):
14287 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
14290 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
14291 Check for pending Thread.Interrupt.
14293 2006-10-27 Massimiliano Mantione <massi@ximian.com>
14294 * loader.c: Fixed bug 79684.
14296 2006-10-27 Dick Porter <dick@ximian.com>
14298 * file-io.c (get_file_attributes): Force symlinks to directories
14299 to be returned as a regular file. Fixes bug 79733.
14300 2006-10-26 Dick Porter <dick@ximian.com>
14302 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
14303 CreateFile to open a directory then we need to set the
14304 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
14306 2006-10-23 Zoltan Varga <vargaz@gmail.com>
14308 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
14311 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14313 * sgengc.c: small cleanup of timer code.
14315 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14317 * sgen-gc.c: fix some warnings and start adding support for
14318 complete object removal on domain unload.
14320 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
14322 * assembly.c: build_assembly_name should not consider a version
14323 number without build or revision number invalid. Fixes bug #79715.
14325 2006-10-18 Jonathan Chambers <joncham@gmail.com>
14327 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
14328 call kernel32 function OutputDebugString directly.
14330 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14332 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
14334 * reflection.c: small cleanup, using a function to insert a MonoString
14335 in the string heap.
14337 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
14339 * reflection.c: moving GC fixes.
14341 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
14343 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
14344 all the objects with finalizers belonging to an unloading appdomain.
14346 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
14348 * sgen-gc.c: added ability to allocate even when the nursery is fully
14349 pinned and fixed a couple of bugs.
14351 2006-10-15 Zoltan Varga <vargaz@gmail.com>
14353 * threads.h: Revert the last change for now.
14355 * threads.h (mono_thread_get_pending_exception): Rename this to
14356 mono_thread_get_undeniable_exception ().
14358 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
14360 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
14361 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
14362 when fname does not refer to valid assembly. This result in a more
14363 meaningful error message.
14364 * exception.c: added mono_get_exception_bad_image_format2 which
14365 constructs a BadImageFormatException using the ctor taking a custom
14366 message and the file name. Passing in a NULL msg results in a default
14368 * exception.h: define mono_get_exception_bad_image_format2 function.
14369 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
14370 when file name pointed to an invalid IL image. Use
14371 mono_get_exception_file_not_found2 to construct FileNotFoundException,
14372 as this results in a more meaningful error message.
14374 2006-10-15 Zoltan Varga <vargaz@gmail.com>
14376 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
14379 2006-10-12 Zoltan Varga <vargaz@gmail.com>
14381 * metadata.c (mono_type_size): Change the align parameter to guint32 for
14382 consistency with the other _size functions.
14383 (mono_type_stack_size): Ditto.
14385 * class.c object.c icall.c: Fix warnings caused by the above change.
14387 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
14389 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
14391 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
14393 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
14395 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
14396 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
14397 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
14398 threadpool.h, threads-types.h: mark more internal functions.
14400 2006-10-11 Dick Porter <dick@ximian.com>
14402 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14403 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
14404 reproduce the bug even before applying the fix.)
14406 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
14408 * reflection.c: allow retrieving attributes for arguments in generic
14409 methods (bug #79241).
14411 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
14413 * debug-mono-symfile.c: properly check fopen () result (found by
14416 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
14418 * reflection.c: make error message clearer and fixed two
14419 issuelets found by Coverity.
14421 2006-10-10 Zoltan Varga <vargaz@gmail.com>
14423 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
14425 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
14427 * object-internals.h, gc-internal.h, profiler-private.h:
14428 mark internal functions.
14430 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14432 * reflection.c: put data in the text section.
14433 * icall.c: recognize more types in type_from_typename ().
14434 * process.c, marshal.c: added some GC FIXMEs.
14436 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14438 * loader.c: check for NULL before initializing.
14440 2006-10-09 Zoltan Varga <vargaz@gmail.com>
14442 * gc.c (finalizer_thread): Use a non-alertable wait here.
14444 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
14445 until the correct solution is found.
14447 2006-10-06 Zoltan Varga <vargaz@gmail.com>
14449 * reflection.c (mono_module_get_object): Avoid an assert when operating on
14450 modules with no metadata. Fixes #79596.
14452 * image.c (load_metadata_ptrs): Put back the error message when
14453 the #- heap is encountered since the support is not complete yet.
14455 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14457 * gc.c: do not allow the user to SuppressFinalize () a
14458 delegate because it would leak the trampoline if present.
14460 2006-10-06 Zoltan Varga <vargaz@gmail.com>
14462 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
14465 2006-10-05 Zoltan Varga <vargaz@gmail.com>
14467 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
14469 * metadata.c (mono_metadata_get_param_attrs): Ditto.
14471 * row-indexes.h: Add definitions for *Ptr tables.
14473 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
14475 * metadata.c (mono_metadata_translate_token_index): New helper function to
14476 translate table indexes used in uncompressed metadata.
14477 (mono_metadata_decode_table_row): Ditto.
14478 (mono_metadata_decode_table_row_col): Ditto.
14480 * metadata.c: Add table schema for *Ptr tables.
14482 * class.c loader.c: Use the new helper function to access the affected metadata
14485 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
14488 2006-10-04 Zoltan Varga <vargaz@gmail.com>
14490 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
14491 sequences which can be unbounded in size. Fixes #79583.
14493 2006-10-02 Zoltan Varga <vargaz@gmail.com>
14495 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
14496 static initialization.
14498 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
14500 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
14502 * domain.c (mono_domain_free): Free up type_init_exception_hash.
14504 * object.c (mono_runtime_class_init): Implement correct semantics when a static
14505 ctor fails, i.e. throw the same exception on subsequent accesses.
14507 2006-09-0 Jonathan Chambers <joncham@gmail.com>
14509 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
14510 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
14511 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
14512 Handle marshalling of interfaces and VARIANTs contained in structs.
14514 Code is contributed under MIT/X11 license.
14516 2006-09-30 Zoltan Varga <vargaz@gmail.com>
14518 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
14520 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
14523 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14525 * console-io.c: ignore previous SIGINT handler.
14527 2006-09-27 Zoltan Varga <vargaz@gmail.com>
14529 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
14530 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
14531 #79460, #79461, #79485.
14533 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
14535 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
14538 2006-09-26 Zoltan Varga <vargaz@gmail.com>
14540 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
14541 could be generated from it.
14543 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
14545 * rand.c: fix read loop to correctly handle EINTR.
14547 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14549 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
14550 internal calls are defined to keep methods closer to the declaring
14551 type and allow a significant reduction in runtime relocations and
14554 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
14556 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
14557 exception message to have FileNotFoundException use the default
14558 assembly load error message. Fixes bug #79426.
14559 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
14561 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14563 * threadpool.c: (start_thread_or_queue) use the root domain when
14564 creating the thread instead of the async object one.
14566 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
14568 * class.c, object.c, class-internals.h, reflection.c:
14569 for arrays, store element_size inside MonoClass (speedup
14570 for array object creation).
14572 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
14574 * icall.c: fixed CodeBase to use the file name and not the module
14577 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14579 * mono-debug.c, mono-debug.h: export find_method as
14580 mono_debug_find_method ().
14582 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14584 * debug-helpers.c, class-internals.h: added a few functions useful
14585 when debugging under gdb.
14587 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14589 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
14590 characters that need special handling.
14592 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
14594 * mono-config.c: make the os/cpu specification more flexible,
14595 allowing lists and negation.
14597 2006-09-18 Jonathan Chambers <joncham@gmail.com>
14599 * marshal.c: COM Interop fixes. Handle case where method->klass.
14600 is interface. Handle BSTR/MonoString when null. Use CDECL as
14601 calling convention on non-windows platforms. This is for
14602 compatibility with XPCOM and MainWin COM.
14604 Code is contributed under MIT/X11 license.
14607 2006-09-18 Zoltan Varga <vargaz@gmail.com>
14609 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
14610 correctly. Fixes #79217.
14612 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
14614 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
14616 * mono-config.c: allow both an os and cpu attribute for dllmap
14617 and dllentry elemnets to enable a single config file to be used
14618 for multiple architectures.
14620 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
14622 * loader.c: MonoLoaderError was cleared too soon on load failure.
14625 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
14627 * icall.c: use the defining class vtable when accessing a
14628 static field, not a pobblibly derived class.
14630 2006-09-17 Zoltan Varga <vargaz@gmail.com>
14632 * icall.c string-icalls.c: Remove references to unicode.h.
14634 * unicode.h unicode.c Makefile.am: Remove these unused source files.
14636 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
14638 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
14639 indicating the image where custom marshaller types should be looked up.
14640 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
14641 custom marshallers, instead of corlib. Fixes #79425.
14643 2006-09-14 Zoltan Varga <vargaz@gmail.com>
14645 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
14647 2006-09-14 Jonathan Chambers <joncham@gmail.com>
14649 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
14650 Implement Environment.ProcessorCount.
14652 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
14653 Implement Environment.ProcessorCount.
14656 Add Environment.ProcessorCount icall.
14658 Patch by Jason McFall.
14660 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14662 * assembly.c: don't append .exe/.dll when the filename already contains
14663 one of those extensions.
14665 2006-09-12 Martin Baulig <martin@ximian.com>
14667 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
14668 to array interfaces.
14670 2006-09-11 Martin Baulig <martin@ximian.com>
14672 * reflection.c (mono_image_build_metadata): Create the
14673 MethodImpl's after emitting all types and methods, so we don't
14674 need another fixup pass for them.
14676 2006-09-11 Zoltan Varga <vargaz@gmail.com>
14678 * class.c (mono_class_from_name_case): Fix regression introduced by the last
14681 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
14683 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
14686 2006-09-10 Zoltan Varga <vargaz@gmail.com>
14688 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
14689 args is not set. Fixes #78926.
14691 2006-09-08 Zoltan Varga <vargaz@gmail.com>
14693 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
14695 * image.c (load_class_names): Move this to class.c, and rename it to
14696 'mono_image_init_name_cache'.
14697 (load_modules): Fix a warning.
14699 * class.c icall.c image.c: Initialize image->name_cache lazily.
14701 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
14702 on its name using information in the AOT file.
14704 * class.c (mono_class_from_name): Use the new hook function.
14706 2006-09-06 Zoltan Varga <vargaz@gmail.com>
14708 * reflection.c (mono_param_get_objects): Handle enum default parameter values
14711 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
14714 2006-09-06 Martin Baulig <martin@ximian.com>
14716 * icall.c (mono_lookup_internal_call): Small fix.
14718 2006-09-05 Raja R Harinath <rharinath@novell.com>
14720 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
14723 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
14725 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
14726 when --debug is specified.
14728 2006-09-04 Zoltan Varga <vargaz@gmail.com>
14730 * class.c (setup_generic_array_ifaces): Fix a warning.
14732 2006-09-04 Miguel de Icaza <miguel@novell.com>
14734 * Temporarily remove the patch to assemly.c that checks the
14735 assembly versions as it breaks our gacutil.
14737 2006-09-03 Zoltan Varga <vargaz@gmail.com>
14739 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
14741 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
14744 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
14745 created using the default ctor. Fixes #79152.
14746 (mono_string_builder_to_utf16): Ditto.
14748 2006-09-01 Martin Baulig <martin@ximian.com>
14750 Fix handling of the generic array interfaces.
14752 * class-internals.h
14753 (MonoDefaults): Removed `generic_array_class' and added
14754 `generic_ilist' class.
14757 (mono_bounded_array_class_get): Add the new generic array interfaces.
14758 (setup_generic_array_ifaces): New static method; create vtable
14759 entries for each method in the generic array interfaces.
14762 (select_container): Allow "parent-less" generic methods.
14765 (mono_marshal_get_generic_array_helper): New public method.
14768 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
14769 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
14770 moved the interncall into System.Array.
14772 2006-09-01 Raja R Harinath <rharinath@novell.com>
14774 A few more cases of avoiding work on types with ->byref set.
14775 Has the real fix for #79238
14776 * icall.c (is_generic_parameter): New helper.
14777 (ves_icall_Type_GetGenericParameterPosition): Use it.
14778 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
14779 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
14780 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
14781 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
14783 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
14785 (ves_icall_Type_get_IsGenericInstance): Likewise.
14786 (ves_icall_Type_get_IsGenericType): Likewise.
14788 2006-09-01 Zoltan Varga <vargaz@gmail.com>
14790 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
14793 * mempool.h (mono_mempool_get_allocated): New helper function.
14795 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
14798 * mempool.c: Fix warnings and the calculation of stats.
14800 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
14802 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
14804 * loader.c (mono_get_method_from_token): Update method_count stat.
14806 * class-internals.h (MonoStats): Add some stats.
14808 2006-08-31 Robert Jordan <robertj@gmx.net>
14810 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
14811 with managed variants.
14812 All code is contributed under the MIT/X11 license.
14814 2006-08-31 Zoltan Varga <vargaz@gmail.com>
14816 * reflection.c (reflection_methodbuilder_to_mono_method): Set
14817 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
14819 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
14821 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
14822 with cycles in classes.
14824 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
14826 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
14827 missing a [MarshalAs] directive. Fixes #79203.
14829 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
14830 klass->marshal_info. Fixes #79217.
14832 2006-08-30 Martin Baulig <martin@ximian.com>
14834 Committing a patch from Joachim Ante <joe@otee.dk>:
14835 Add support for binary data symbol stores.
14837 * debug-mono-symfile.c
14838 (mono_debug_open_mono_symbol_file): Renamed into
14839 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
14843 (mono_debug_open_image): Added `raw_contents' and `size' args.
14844 (mono_debug_init_2_memory): New public function.
14846 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
14848 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
14850 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14852 * appdomain.c: implement support for ShadowCopyFiles.
14854 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
14856 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
14857 when value is NULL (and should remove CID #51).
14859 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14861 * image.c: moved 2 functions to ../utils.
14863 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
14865 * gc.c: cope with the target object of a GC handle being NULL
14868 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14870 * class.c: recursively check parent's explicit implementations
14871 of interface methods (fixes bug #79125).
14873 2006-08-19 Miguel de Icaza <miguel@novell.com>
14875 * filewatcher.c: Avoid warnings when building, do not redefine
14876 constants that are defined.
14880 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14882 * image.c: don't fail when the link points to an absolute path.
14884 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
14886 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
14889 2006-08-17 Miguel de Icaza <miguel@novell.com>
14891 * image.c (full_path): A new method used to obtain the actual path
14892 of an assembly even in the presence of symbolic links.
14894 This is necessary for the case where we are running a binary that
14895 has been GACed, but we are using the "published" path name
14896 ($prefix/mono/1.0/blah.exe) which happens to point to the real
14899 This was the source of the failure for the `xsp' command with the
14900 recent AppDomain changes, as far as the runtime was concerned,
14901 there were two different assemblies: $prefix/mono/1.0/blah.exe and
14902 $prefix/mono/gac/blah/version/blah.exe.
14904 (do_mono_image_open): use full path
14906 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14908 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
14910 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
14912 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
14913 domain_id is supplied. Fix CID #241 and corlib's unit tests.
14915 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14917 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
14918 small structures. Fixes #78990.
14920 2006-08-17 Zoltan Varga <vargaz@gmail.com>
14922 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
14924 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
14926 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14929 * marshal.c: don't load all the assemblies from a domain into newly
14930 created ones. The new domains might have different rules and load
14931 assemblies from different locations. Fixes bug #76757.
14933 Patch by Lluis. Conflicts resolved by Brian Crowell.
14935 2006-08-16 Alp Toker <alp@atoker.com>
14937 * socket-io.c: First half of the fix for #79084.
14938 Set sa_size to the length of the content, not that of the struct.
14939 Don't add NULL suffix to the content, this should be done in
14940 managed code if needed.
14942 2006-08-14 Raja R Harinath <rharinath@novell.com>
14945 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
14946 mono_metadata_parse_type returns NULL.
14948 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
14950 * normalization-tables.h : new file for string normalization data.
14951 * locales.c, locales.h, icall.c :
14952 added load_normalization_resource() for string normalization,
14954 * Makefile.am : added normalization-tables.h to the sources.
14956 2006-08-13 Zoltan Varga <vargaz@gmail.com>
14958 * marshal.c: Add more helper functions to reduce code duplication and use them
14961 2006-08-12 Zoltan Varga <vargaz@gmail.com>
14963 * marshal.c: Fix non-x86 stdcall warnings.
14965 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
14968 2006-08-11 Jonathan Chambers <joncham@gmail.com>
14970 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
14971 type check on multi-dimensional arrays. Fixes #79000.
14973 2006-08-10 Jonathan Chambers <joncham@gmail.com>
14975 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
14976 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
14977 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
14978 * class-internals.h: add is_com_object to class structure.
14979 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
14980 null checks to COM object marshalling. Fix .ctor call on RCW.
14981 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
14983 All code is contributed under the MIT/X11 license.
14985 2006-08-09 Dick Porter <dick@ximian.com>
14987 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
14988 racing mono_monitor_allocator_lock() somewhere, so don't delete
14989 the critical section for now. Found by running and exiting
14992 2006-08-10 Zoltan Varga <vargaz@gmail.com>
14994 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
14995 (ves_icall_System_ComObject_FindInterface): Ditto.
14996 (ves_icall_System_ComObject_CacheInterface): Ditto.
14998 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
14999 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
15001 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15003 * threadpool.c: treat pipes from process asynchronous reads as sockets
15004 when reading from them, so we get select/poll or epoll to wait for
15007 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
15009 * loader.c: Fix a typo (CID #233) in the null check.
15011 2006-08-07 Zoltan Varga <vargaz@gmail.com>
15013 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
15014 Hopefully fixes #78949.
15016 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
15017 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
15018 bytes. Fixes #78972.
15020 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15022 * filewatcher.c: we need to set errno here.
15024 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15026 * filewatcher.c: let Win32Exception get the error value.
15028 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15030 * filewatcher.c: translate errno into win32 errors for Win32Exception
15031 to know what happened.
15033 2006-08-01 Zoltan Varga <vargaz@gmail.com>
15035 * threadpool.c: Fix more warnings.
15037 * assembly.c (search_loaded): Fix warnings.
15039 * threadpool.c (mono_thread_pool_finish): Fix warnings.
15040 (mono_async_invoke): Ditto.
15042 2006-07-28 Jonathan Chambers <joncham@gmail.com>
15044 * object.c (mono_remote_class_vtable): Need to create proxy vtable
15045 entries for __ComObject type in addition to ComImport types.
15046 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
15049 All code is contributed under the MIT/X11 license.
15051 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
15053 * image.c: avoid tentative loading of modulerefs that contain
15054 no metadata (P/Invoke library names).
15056 2006-07-28 Dick Porter <dick@ximian.com>
15058 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
15059 mono_loader_lock() somewhere, so don't delete the critical section
15060 for now. Found by running and exiting monodevelop.
15062 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15064 * filewatcher.c: define the inotify syscalls when we're building on
15065 linux and have sys/syscall.h. The build system might not have support
15066 for inotify but the target system might have it.
15068 2006-07-26 Miguel de Icaza <miguel@novell.com>
15070 * domain.c: Documentation updates.
15072 * loader.c (mono_free_method): Do not release the method
15073 information if we are being profiled, as profilers will use this
15074 information at shut down to present some data to the user.
15076 This is needed so that the profiler does not crash, as the
15077 profiler tends to keep MonoMethods around, and they might become
15078 invalid if we free these.
15080 (mono_get_method_constrained): Return the original CIL stream
15081 method as well, so verification can be performed against it.
15083 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15085 * filewatcher.[ch]: support for inotify file system watcher.
15086 * icall.c: add new internal calls for the inotify file system watcher.
15088 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15090 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
15093 2006-07-20 Dick Porter <dick@ximian.com>
15095 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
15098 2006-07-20 Dick Porter <dick@ximian.com>
15100 * threads.c (start_wrapper): Do the thread cleanup while we still
15101 hold a reference to its object. Fixes bug 78123.
15103 2006-07-18 Kornél Pál <kornelpal@gmail.com>
15105 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
15106 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
15107 "managed-to-managed".
15108 * icall.c: Redirect string constructors that take sbyte* to
15109 ves_icall_System_String_ctor_RedirectToCreateString.
15110 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
15111 to CreateString () methods with matching signature.
15112 * reflection.c: Use original security informations for
15113 MONO_WRAPPER_MANAGED_TO_MANAGED.
15114 * security-manager.c: Use original security informations for
15115 MONO_WRAPPER_MANAGED_TO_MANAGED.
15116 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
15117 that is a placeholder and only its address should be used.
15118 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
15119 that is a placeholder and only its address should be used.
15121 2006-07-15 Jonathan Chambers <joncham@gmail.com>
15123 Begin implementing COM Interop.
15124 * appdomain.c: Increment corlib version.
15125 * class.c: Set ComImport classes' parent to __ComObject.
15126 * loader.c: Mark cominterop methods as such.
15127 * domain.c: Add __ComObject class to MonoDefaults structure.
15128 * image.c: Add 2 hashtables to the image for COM Interop related methods
15129 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
15130 using the mempool allocator
15132 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
15133 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
15134 declaration for mono_metadata_type_dup_mp.
15136 * debug-helpers.c: Added strings for two additional wrapper types
15137 * object.c: Create proxy objects for ComImport classes
15138 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
15139 and added __ComObject class to MonoDefaults structure.
15141 * object-internals.h: Finish MonoRealProxy definition, and add definition of
15142 MonoComInteropProxy and MonoComObject.
15144 * marshal.c: Added support for COM Interop
15145 (signature_cominterop): Converts managed signature to corresponding
15146 unmanaged COM signature.
15147 (cominterop_get_function_pointer): gets unmanaged function pointer via
15149 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
15150 (cominterop_get_method_interface): returns interface type that method is defined on
15151 (mono_mb_emit_cominterop_call): emits native call to function pointer
15153 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
15154 that matches signature of unmanaged function.
15155 (cominterop_get_native_wrapper): wrapper around adjusted method call.
15156 (cominterop_get_invoke): forwards call from proxy to __ComObject
15157 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
15158 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
15159 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
15161 * marshal.h: Added Marshal icall declarations.
15162 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
15163 so we can access them in finalizer
15165 2006-07-14 Dick Porter <dick@ximian.com>
15167 * object.c (mono_type_initialization_cleanup): Fix a race
15168 condition by temporarily commenting out the critical section
15171 2006-07-14 Zoltan Varga <vargaz@gmail.com>
15173 * reflection.c (create_custom_attr): Fix some warnings.
15174 (create_custom_attr_data): Ditto.
15175 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
15176 types. Fixes #78855.
15178 2006-07-11 Zoltan Varga <vargaz@gmail.com>
15180 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
15182 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
15184 2006-07-08 Zoltan Varga <vargaz@gmail.com>
15186 * reflection.c (resolve_object): Add support for DynamicMethod.
15188 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
15189 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
15191 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
15193 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
15194 don't leak GPtrArray's pdata has we have no use (nor free) for it.
15196 2006-07-01 Zoltan Varga <vargaz@gmail.com>
15198 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
15201 2006-06-30 Raja R Harinath <rharinath@novell.com>
15203 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
15204 slightly: remove a shadow local variable.
15206 2006-06-29 Raja R Harinath <rharinath@novell.com>
15208 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
15209 definition that introduces the virtual function slot.
15210 Also fix Coverity #105.
15212 2006-06-29 Zoltan Varga <vargaz@gmail.com>
15214 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
15215 for dynamic assemblies. Fixes #78724.
15217 2006-06-28 Zoltan Varga <vargaz@gmail.com>
15219 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
15222 2006-06-21 Martin Baulig <martin@ximian.com>
15225 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
15228 2006-06-21 Zoltan Varga <vargaz@gmail.com>
15230 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
15232 2006-06-20 Raja R Harinath <rharinath@novell.com>
15234 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
15236 * class.c (mono_class_create_from_typespec): Add 'context' argument.
15237 Inflate result if necessary.
15238 (mono_class_get_full): Remove old version. Rename from
15239 'mono_class_get' and add 'context' argument. Pass it to
15240 ..._create_from_typespec.
15241 (mono_class_get): New. Simple wrapper to mono_class_get_full.
15242 (mono_ldtoken): Revert change below.
15244 2006-06-20 Martin Baulig <martin@ximian.com>
15246 * class.c (mono_ldtoken): Don't pass the generic context to
15247 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
15249 2006-06-15 Zoltan Varga <vargaz@gmail.com>
15251 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
15252 and later freeing it. Fixes #78638.
15254 2006-06-15 Miguel de Icaza <miguel@novell.com>
15256 * icall.c (mono_class_get_throw): Revert over-zealous error
15257 throwing, the caller for mono_class_get_throw will cope with
15258 errors when classes are not properly initialized already.
15260 The code still copes with loader exceptions though.
15262 Fixes the regression in reftype1 and reftype3 from the CAS tests.
15264 2006-06-14 Miguel de Icaza <miguel@novell.com>
15266 Fixes the `make run1' version of RuntimeAbort (to be commited,
15267 source is in Bugzilla).
15269 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
15270 FALSE on class loading failure instead of returning true.
15272 * class.c (mono_class_create_from_typedef): It is possible for
15273 mono_metadata_interfaces_from_typedef_full to fail if a class is
15274 not found, cope with this.
15277 2006-06-14 Dick Porter <dick@ximian.com>
15280 * process.c: Fix a bunch of signed/unsigned warnings from gcc
15283 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
15285 * culture-info-table.h : oops, forgot to make it nsync with r61548.
15287 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
15289 * icall.c: Another fix for building mono in Visual Studio.
15291 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
15293 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
15295 2006-06-09 Martin Baulig <martin@ximian.com>
15297 * debug-mono-symfile.c: Put this back and really fix it this
15298 time. Sorry for all the trouble.
15300 2006-06-08 Zoltan Varga <vargaz@gmail.com>
15302 * icall.c (mono_class_get_throw): Fix a warning.
15303 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
15304 ReflectionTypeLoadException if needed. Fixes #78606.
15306 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
15307 (mono_class_init): Ditto.
15309 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
15310 ref_only exceptions.
15311 (mono_loader_clear_error): Make this work even if there is no error.
15313 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
15315 * object-internals.h marshal.c marshal.h icall.c: Implement method
15316 Marshal.GetComSlotForMethodInfo using internal call.
15318 2006-06-07 Zoltan Varga <vargaz@gmail.com>
15320 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
15321 a function for signalling it.
15323 * class.c (mono_class_from_typeref): Use the new kind of loader error when
15324 a referenced assembly is not found.
15326 * loader.c (mono_loader_error_prepare_exception): Add support for
15327 LOADER_ERROR_ASSEMBLY. Fix formatting.
15329 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
15331 * domain.c appdomain.c class-internals.h marshal.c: Add support
15332 for VARIANT marshalling on windows and increment corlib version
15333 since Variant struct was added.
15335 2006-06-03 Miguel de Icaza <miguel@novell.com>
15337 * debug-mono-symfile.c: Revert Martin's previous patch which broke
15338 stack trace line information:
15340 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
15341 (Martin) when looking up B which is between A and C, return A not C.
15345 Thanks to Alexander Olk for tracking this down.
15347 2006-06-02 Zoltan Varga <vargaz@gmail.com>
15349 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
15351 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
15352 avoid clobbering its value.
15353 (mono_string_to_lpstr): Fix a warning on windows.
15355 2006-05-31 Zoltan Varga <vargaz@gmail.com>
15357 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
15359 * reflection.c loader.c: Removed references to 'dummy' flag.
15361 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
15363 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
15364 it gets GC tracking.
15366 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
15369 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
15371 * marshal.c threadpool.c: Update callers of mono_async_result_new.
15373 * appdomain.c: Bump corlib version.
15375 2006-05-30 Zoltan Varga <vargaz@gmail.com>
15377 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15378 CEE_STIND_REF when working with object references.
15380 2006-05-31 Zoltan Varga <vargaz@gmail.com>
15382 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
15385 2006-05-30 Miguel de Icaza <miguel@novell.com>
15387 * loader.c (method_from_memberref): Fix argument value for
15388 mono_loader_set_error_method_load (I was passing the MonoClass
15389 instead of the class name char *).
15391 2006-05-30 Zoltan Varga <vargaz@gmail.com>
15393 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15394 CEE_STIND_REF when working with object references.
15396 2006-05-30 Martin Baulig <martin@ximian.com>
15398 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
15399 mono_method_full_name() change and replace the ':' with a '.'
15402 2006-05-30 Martin Baulig <martin@ximian.com>
15404 * debug-mono-symfile.c
15405 (mono_debug_symfile_lookup_location): Fix the algorithm:
15406 when looking up B which is between A and C, return A not C.
15408 2006-05-29 Martin Baulig <martin@ximian.com>
15411 (MonoDebugMethodInfo): Make the typedef public.
15412 (MonoDebugSourceLocation): New public struct.
15415 (mono_debug_source_location_from_address): Removed.
15416 (mono_debug_source_location_from_il_offset): Removed.
15417 (mono_debug_il_offset_from_address): Removed.
15418 (mono_debug_address_from_il_offset): Removed.
15419 (mono_debug_lookup_method): New public function.
15420 (mono_debug_lookup_source_location): New public function; replaces
15421 the old mono_debug_source_location_from_*() functions; see the
15422 inline documentation.
15423 (mono_debug_free_source_location): New public function.
15424 (mono_debug_print_stack_frame): New public function; see the
15425 inline documentation.
15427 * debug-mono-symfile.c
15428 (mono_debug_find_source_location): Renamed into
15429 mono_debug_symfile_lookup_location(); only take a
15430 `MonoDebugMethodInfo *' and an `offset' argument; added inline
15432 (mono_debug_find_method): Renamed into
15433 mono_debug_symfile_lookup_method().
15435 2006-05-27 Zoltan Varga <vargaz@gmail.com>
15437 * assembly.c (mono_assembly_open_full): Dont overwrite the status
15438 returned by mono_image_open_full ().
15440 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
15441 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
15444 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
15447 2006-05-27 Miguel de Icaza <miguel@novell.com>
15449 * class.c (mono_class_from_typeref): handle missing images
15450 earlier, deals with bug #78418. Refactor code;
15452 Fix a warning introduced in my previous commit (some stale code
15453 from before I revisited my patch).
15455 * class.c (mono_class_create_from_typedef): On failure, remove the
15456 class from the MonoImage->class_cache as the class is not
15457 initialized; Fixes the leak pointed out by Paolo.
15459 2006-05-25 Dick Porter <dick@ximian.com>
15461 * threads.c (mono_thread_cleanup): Build fix. Comment out the
15462 DeleteCriticalSections until I figure out which one may still be
15463 sometimes locked when mono_thread_cleanup is called.
15465 2006-05-24 Dick Porter <dick@ximian.com>
15467 * threads.c (mono_thread_cleanup): Move the threading cleanup out
15468 of mono_thread_manage and back into its own function, so it can be
15469 called after the finalizer thread has finished.
15471 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
15473 2006-05-24 Zoltan Varga <vargaz@gmail.com>
15475 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
15478 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
15479 with non-blittable elements.
15480 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
15482 2006-05-24 Martin Baulig <martin@ximian.com>
15484 * mono-debug-debugger.h (MonoDebuggerEvent): Added
15485 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
15487 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
15488 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
15489 `mono_debugger_event_handler' to NULL.
15491 2006-05-24 Martin Baulig <martin@ximian.com>
15493 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
15495 2006-05-24 Martin Baulig <martin@ximian.com>
15497 * mono-debug-debugger.h
15498 (mono_debugger_create_notification_function): Added
15499 `MonoCodeManager *' argument.
15501 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
15503 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
15505 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
15507 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
15508 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
15511 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
15513 * icall.c: precise GC support: objects can't be stored in unmanaged
15514 memory anymore, even if they are kept alive by other references: since
15515 they can move the GC needs to be able to always find them.
15517 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15519 * object.c: precise GC support for static fields. Support
15520 for moving GCs: write barriers and pinned allocation for interned
15523 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
15525 * domain.c, domain-internals.h: precise GC support for the MonoDomain
15528 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
15530 * class.c, gc.c: sgen and precise GC updates.
15532 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
15534 * marshal.h, marshal.c: added write barrier wrapper and precise type
15537 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
15539 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
15542 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15544 * reflection.c: precise and sgen GC updates.
15546 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
15548 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
15550 2006-05-22 Zoltan Varga <vargaz@gmail.com>
15552 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
15554 2006-05-20 Zoltan Varga <vargaz@gmail.com>
15556 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
15557 MONO_TYPE_OBJECT. Fixes #78462.
15559 2006-05-18 Zoltan Varga <vargaz@gmail.com>
15561 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
15562 and blittable types.
15564 2006-05-17 Miguel de Icaza <miguel@novell.com>
15566 * class.c (mono_class_get_exception_for_failure): Implement parts
15567 of a TODO: if the loader error is set (instead of the class
15568 error), we return a Loader exception that can be properly thrown
15571 This was exposed by some Winforms 2.0 code that I tried to run
15572 (Atsushi pointed me to it).
15574 2006-05-17 Zoltan Varga <vargaz@gmail.com>
15576 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
15577 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
15579 * marshal.c (emit_marshal_vtype): Add limited support for
15580 UnmanagedType.LPStruct. Fixes #78427.
15582 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
15583 Applied a patch from kangaroo to fix #77523.
15585 2006-05-17 Martin Baulig <martin@ximian.com>
15588 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
15589 (debugger_thread_created): Removed.
15590 (debugger_thread_exited): Removed.
15592 2006-05-15 Zoltan Varga <vargaz@gmail.com>
15594 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15596 * object-internals.h (MonoReflectionResource): Sync with managed version.
15598 2006-05-12 Wade Berrier <wberrier@novell.com>
15600 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
15602 2006-05-12 Zoltan Varga <vargaz@gmail.com>
15604 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
15605 functions try to allocate from the image mempool.
15607 2006-05-12 Dick Porter <dick@ximian.com>
15609 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
15611 2006-05-12 Lluis Sanchez <lluis@ximian.com>
15613 * object.c: The FieldGetter and FieldSetter methods require the full
15614 name of the class, not only the name. Fixes bug #78277.
15616 2006-05-11 Miguel de Icaza <miguel@novell.com>
15618 * loader.c (method_from_memberref): Do not pass the NULL klass to
15619 mono_loader_set_error_() methods. Pass the non-NULL value
15622 2006-05-11 Zoltan Varga <vargaz@gmail.com>
15624 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
15625 (mono_assembly_close): Null out assembly->image->references after freeing it.
15627 * image.c (mono_image_close): Free image->references.
15629 * reflection.c (mono_image_basic_init): Fix a small memory leak.
15631 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15633 * marshal.c: In function mono_mb_add_local don't use the mb pointer
15634 before checking if it's NULL (g_assert).
15636 2006-05-10 Martin Baulig <martin@ximian.com>
15638 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
15639 I thought I already killed that two months ago, but now it somehow reappeared.
15641 2006-05-10 Martin Baulig <martin@ximian.com>
15643 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
15645 2006-05-10 Zoltan Varga <vargaz@gmail.com>
15647 * reflection.c: Allocate memory for dynamically created methods in the image
15650 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
15652 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
15653 don't use the ad pointer before checking if it's NULL (g_assert).
15655 2006-05-09 Zoltan Varga <vargaz@gmail.com>
15657 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
15658 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
15660 * marshal.c: Allocate all signatures from mempools.
15662 * marshal.c: Allocate some more signatures from mempools.
15664 2006-05-09 Miguel de Icaza <miguel@novell.com>
15666 * object.c (mono_load_remote_field): The code used to provide a
15667 temporary variable for returning results if the user did not
15668 provide a result pointer. But our temporary variable was allocted
15671 Fix calling code to always pass a result area. Coverity ID 103.
15673 2006-05-06 Zoltan Varga <vargaz@gmail.com>
15675 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
15676 value, not the old. Fixes #78312.
15677 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
15679 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
15680 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
15683 * assembly.c (mono_assembly_close): Free image->references.
15685 * assembly.c (mono_assembly_names_equal): Fix a warning.
15686 (mono_assemblies_cleanup): Cleanup more global data.
15688 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
15690 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
15691 ptr_cache and image->modules.
15693 * image.c (mono_image_init): Allocate array_cache lazily.
15695 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15697 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
15698 behavior was changed recently and has bad side effects.
15700 2006-05-05 Zoltan Varga <vargaz@gmail.com>
15702 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
15704 * assembly.c (mono_assembly_close): Remove a debug printf.
15706 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
15708 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
15709 to also allow for temporary references between mono_image_open ()/close ().
15711 * domain.c (get_runtimes_from_exe): Add a FIXME.
15713 2006-05-04 Zoltan Varga <vargaz@gmail.com>
15715 * marshal.c: Fix support for dynamic methods.
15717 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
15719 * marshal.c (mono_marshal_cleanup): New cleanup function.
15721 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
15724 * class.c (mono_class_init): Fix leaking class->nested_classes.
15726 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
15728 * image.c (mono_image_init): Initialize the new cashes.
15730 * image.c (mono_image_close): Destroy the new cashes.
15732 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
15734 * mempool.c (mono_mempool_strdup): New helper function.
15736 * class-internals.h: Add prototype for mono_loader_unlock ().
15738 * domain.c (mono_jit_info_table_find): Fix a warning.
15739 (mono_debugger_check_runtime_version): Ditto.
15741 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
15742 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
15743 functions to these modules.
15745 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
15748 * marshal.c (mono_free_bstr): Fix a warning.
15750 * assembly.c (mono_assembly_open_full): Fix another small leak.
15752 * object.c: Fix some unload leaks in the remoting code.
15754 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
15757 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
15759 * reflection.c: Fix some unload leaks in dynamic assemblies.
15761 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
15763 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
15764 * marshal.h: Add BSTR support on Win32
15765 * icall.c: Add BSTR icalls
15766 * metadata.h: Add BSTR enums
15768 2006-04-28 Miguel de Icaza <miguel@novell.com>
15770 Work to catch the crash from #76795 and turn it into an
15771 exception. As I stubbed out pieces of the VisualBasic support,
15772 I found a number of places where the code was failing and I added
15773 checks to those places.
15775 * metadata.c (do_mono_metadata_parse_generic_class): Make this
15776 function return a status code. If we fail to parse the signature
15777 from mono_metadata_parse_generic_inst, return FALSE.
15779 * loader.c (mono_get_method_from_token): If we fail to load the
15780 method (mono_class_get) return NULL.
15782 * (method_from_memberref): Return NULL if we are unable to parse
15783 the method signature
15785 (mono_loader_error_prepare_exception): Since we now use the
15786 loader_error flag internally to stop processing, and obtaining
15787 exceptions that might be thrown will walk this code path the
15788 proper way of going from a MonoLoaderError into a
15789 MonoException was convoluted. This new routine encapsulates the
15790 process of turning the error into an exception and *clearing* the
15793 2006-04-27 Miguel de Icaza <miguel@novell.com>
15795 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
15796 with missing assemblies), and to cope with:
15798 * Missing fieldref from a non-existing assembly.
15799 * Missing methodref from a non-existing assembly.
15801 The first batch of work to address *some* of the issues from 76661.
15803 * object.c (mono_class_create_runtime_vtable): If we fail to
15804 initialize the class raise the exception here.
15806 * metadata.c (mono_class_get_overrides_full): If any methods fail
15807 to load return the failure to the caller.
15809 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
15810 flagging assemblies that failed to load.
15812 Do not crash if we are unable to load the assembly.
15814 (mono_assembly_close): Do nothing with REFERENCE_MISSING
15817 * loader.c (mono_loader_set_error_type_load): Change the
15818 convention to always pass unallocated strings, so we make our own
15819 copies (I know our own code had duplicated strings before, but
15820 this keeps the normal conventions).
15821 (method_from_memberref): Call mono_loader_set_error_method_load
15822 for all possible failures of loading the class.
15823 Remove assert, turn into a loader error.
15825 (mono_loader_error_to_exception): Move this routine from mini
15826 (mini_loader_error_to_exception) there was no need to have that in
15829 * class.c (mono_class_from_typeref): If we were not able to load
15830 the assembly with mono_assembly_load_reference, call the
15831 mono_loader_set_error_type_load to register the problem.
15833 (mono_class_setup_fields): If we fail to load the type from
15834 mono_metadata_parse_type_full, call mono_class_set_failure and
15835 break from the loop.
15837 If class->exception_type is set, we do not layout the fields as
15838 that might crash the runtime, and instead return (from breaking
15839 from the previous loop).
15841 (mono_class_setup_vtable): This now returns a boolean indicating
15842 whether the table was properly setup. The decision is driven by
15843 mono_class_get_overrides_full which might run into non-existing
15846 (mono_class_init): Returns TRUE on success or FALSE if there was a
15847 problem in loading the type (incorrect assemblies, missing
15848 assemblies, methods, etc).
15850 When we call mono_class_setup_fields we also check for a potential
15851 error inside this call (either a class exception or a general
15854 (mono_class_create_from_typedef): If the parent fails to load
15855 (calling mono_class_get_full) return NULL.
15859 calls to mono_metadata_parse_type_full should be checked
15860 everywhere and set the mono_class_set_failure
15861 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
15863 The current patch checks the places where my manually constructed
15864 tests show the errors are showing up, but we should do it
15869 mono_class_init return values should be tested everywhere, like
15870 the previous case this is something that we should audit
15871 everywhere and not only on the cases exposed by the tests I
15874 2006-04-26 Miguel de Icaza <miguel@novell.com>
15876 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
15877 boolean parameter and instead pass the information on `options'
15878 parameter (FileOptions).
15880 * icall.c: Register the new signature for MonoIO.Open.
15882 * debug-helpers.c (dis_one): Trying to understand how coverity
15883 works. Fix Run 5, item 78.
15885 2006-04-26 Dick Porter <dick@ximian.com>
15887 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
15890 2006-04-25 Martin Baulig <martin@ximian.com>
15892 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
15894 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
15895 debugger_thread_created().
15896 (debugger_gc_push_all_stacks): Don't handle the main thread in any
15898 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
15899 (mono_debugger_finalize_threads): New function; undo the effects
15900 of mono_debugger_init_threads().
15901 (mono_debugger_create_all_threads): Removed.
15903 2006-04-24 Zoltan Varga <vargaz@gmail.com>
15905 * image.c (mono_image_close): Tidy up trace messages.
15907 * assembly.c (mono_assembly_close): Ditto.
15909 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
15910 no longer references an already freed assembly. Fixes #78168.
15912 2006-04-21 Dick Porter <dick@ximian.com>
15914 * threads.c (mono_thread_detach): Fix reference counting when
15917 2006-04-21 Zoltan Varga <vargaz@gmail.com>
15919 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
15922 2006-04-19 Zoltan Varga <vargaz@gmail.com>
15924 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
15925 (mono_type_to_stind): Ditto.
15927 * marshal.c: Use the new helper functions to simplify code.
15929 * image.c (mono_image_close): Add some code for help debug assembly unloading
15932 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
15935 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
15936 assembly was already loaded in another appdomain. Fixes #78083.
15938 2006-04-13 Zoltan Varga <vargaz@gmail.com>
15940 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
15941 referenced assemblies.
15942 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
15944 * domain.c (mono_domain_free): Add a trace message.
15946 * appdomain.c (add_assemblies_to_domain): Ditto.
15948 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
15951 2006-04-12 Zoltan Varga <vargaz@gmail.com>
15953 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
15955 2006-04-12 Martin Baulig <martin@ximian.com>
15957 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
15958 `USE_INCLUDED_LIBGC'.
15960 2006-04-12 Zoltan Varga <vargaz@gmail.com>
15962 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
15963 the patch contains ../ and a small directory name later. Hopefully fixes
15966 2006-04-10 Martin Baulig <martin@ximian.com>
15968 Clean up the debugger's thread-handling code.
15970 The debugger's thread-handling code has been moved from
15971 ../mini/debug-debugger.c to threads.c. We now iterate directly
15972 over the `threads' hash, keep track of exiting threads and also
15973 use proper locking.
15975 We can now debug XSP and XSP based applications with the debugger.
15977 * object-internals.h (MonoThread): Added `gpointer end_stack'.
15980 (MonoThreadCallbacks): Removed; this was only used by the debugger.
15981 (mono_install_thread_callbacks): Likewise.
15983 * threads.c (mono_thread_callbacks): Removed.
15984 (debugger_thread_created, debugger_thread_exited): New static functions.
15985 (start_wrapper): Call debugger_thread_created().
15986 (thread_cleanup): Call debugger_thread_exited().
15987 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
15988 (mono_debugger_init_threads): New public function.
15989 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
15990 iterate directly over the `threads' hash and also use proper locking.
15992 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
15994 * mono-debug-debugger.h
15995 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
15997 2006-04-10 Zoltan Varga <vargaz@gmail.com>
15999 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
16000 argument type=array. Fixes #78057.
16002 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
16004 * culture-info-table.h : regenerated. Fixed bug #69652.
16006 2006-04-07 Zoltan Varga <vargaz@gmail.com>
16008 * loader.c metadata.c: Reapply a variant r59116.
16010 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
16012 * class.c (mono_class_setup_interface_offsets): New internal function.
16014 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
16015 interfaces too. Fixes #77398.
16017 * reflection.c (encode_cattr_value): Add support for
16018 parameter type=object, argument type=array.
16019 (load_cattr_value): Ditto. Fixes #77916.
16021 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
16022 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
16024 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
16025 a byval char array and CharSet is Ansi.
16027 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
16029 2006-04-06 Zoltan Varga <vargaz@gmail.com>
16031 * metadata.c: Add some locking comments.
16033 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
16035 (mono_metadata_free_method_signature): Don't free the signature itself.
16037 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
16039 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
16040 reference the same MonoImage.
16041 (mono_assembly_load_from_full): Add an assert.
16043 2006-04-05 Zoltan Varga <vargaz@gmail.com>
16045 * image.c (mono_image_close): Don't put the image we are about to free into the
16046 loaded_images_guid_hash.
16048 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
16049 to reduce code duplication.
16051 * marshal.c: Register the native functions called by this module as icalls, to
16052 somewhat centralize the creation of MonoMethodSignature's.
16054 * loader.c (mono_method_signature): Add a cache for method signatures.
16056 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
16057 the parameter attributes of a method.
16058 (mono_metadata_parse_method_signature_full): Refactored the computation of
16059 parameter attributes into a separate function. Also avoid one allocation in
16062 * assembly.c (mono_assembly_close): Ditto.
16064 * image.c (mono_image_close): Log trace messages with INFO level.
16066 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
16068 * image.c reflection.c: Correct reference counting of image modules.
16070 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
16071 of this function from the image mempool.
16073 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
16074 to allow more cached types to be used.
16076 * mono-debug.c (mono_debug_add_method): Appled patch from
16077 David S. Miller <davem@sunset.davemloft.net>: Access
16078 minfo->lexical_blocks[] entry elements using read32().
16080 2006-04-04 Zoltan Varga <vargaz@gmail.com>
16082 * loader.c (mono_free_method): No longer free the method header for non-dynamic
16083 methods as it is allocated from the mempool.
16085 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
16088 * metadata-internals.h: Add comments describing the reference counting scheme
16089 used for MonoImage and MonoAssembly.
16091 * image.c assembly.c reflection.c: Rework reference counting of images and
16092 assemblies so they are freed when the runtime is shut down. Free some
16093 additional memory structures when an image is unloaded.
16095 2006-04-03 Zoltan Varga <vargaz@gmail.com>
16097 * class.c loader.c reflection.c: Allocate more data structures in
16100 2006-03-31 Miguel de Icaza <miguel@novell.com>
16103 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
16104 build on pre glib 2.4 systems.
16106 2006-03-31 Zoltan Varga <vargaz@gmail.com>
16108 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
16110 * icall.c: Fix some warnings.
16112 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
16114 * culture-info-table.h : regenerated.
16116 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
16118 * threads.c, object-internals.h, verify.c: changed the culture caching
16119 code to use a normal MonoArray for storage so the GC can keep track of
16120 them easily. Fixed bits of the cache logic, too and simplified the
16123 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
16125 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
16126 thread for non-Boehm GCs.
16128 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
16130 * domain.c, object.c, domain-internals.h: reduce the amount of memory
16131 needed to keep track of the data for static fields.
16133 2006-03-29 Raja R Harinath <rharinath@novell.com>
16136 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
16137 for interface classes. Use 'num_methods' instead.
16138 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
16139 before using '->vtable_size' field.
16141 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16143 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
16144 doesn't contain managed pointers, so use a normal hashtable.
16146 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
16148 * reflection.c, class-internals.h, domain.c: fixed handling of types
16149 used as values for objects in custom attributes (bug #77915):
16151 2006-03-24 Martin Baulig <martin@ximian.com>
16153 * class.c (mono_class_setup_fields): Added support for generic
16154 instances; fixes #77580.
16156 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16158 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
16160 2006-03-24 Dick Porter <dick@ximian.com>
16162 * file-io.c (get_file_attributes): More stat macro breakage.
16165 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
16167 * profiler.c: added the file=filename option in the default profiler
16168 to output the profile data to filename.
16170 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16172 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
16175 2006-03-22 Martin Baulig <martin@ximian.com>
16177 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
16178 allocated `MonoClassField *' in `fb->handle'.
16180 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16182 * class.c, image.c, metadata-internals.h: implemented new mechanism to
16183 allocate interface ID to save memory and allow better ID reuse on
16184 appdomain unload. setup_generic_vtable () removal from Martin.
16186 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16188 * object.h, appdomain.c, domain.c, exception.c, icall.c,
16189 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
16190 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
16191 write barriers for reference stores with managed objects accessed with
16192 C structures in the runtime and in embedding programs.
16194 2006-03-20 Raja R Harinath <rharinath@novell.com>
16196 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
16197 'interface_id' and 'max_interface_id' fields of MonoClasses
16198 representing open generic types.
16200 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
16202 * object.h, object.c, icall.c: added functions to deal with
16203 storing valuetypes that contain references in managed objects.
16204 * reflection.c, string-icalls.c, threads.c, marshal.c: small
16205 fixes and comments around uses of mono_array_addr ().
16207 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
16209 * object.h, icall.c, monitor.c: object.GetHashCode ()
16210 implementation that supports the moving garbage collector.
16212 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16214 * icall.c, threads-types.h, threads.c: implemented finalizer for
16215 LocalDataStoreSlot.
16217 2006-03-15 Zoltan Varga <vargaz@gmail.com>
16219 * metadata.c (mono_type_size): Add a fixme.
16220 (mono_type_stack_size): Ditto.
16222 * object-internals.h (MonoReflectionAssemblyBuilder): Added
16223 'type_forwarders' field.
16225 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
16226 attribute from net 2.0.
16228 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
16231 * class.c (mono_class_setup_fields): Fix a warning.
16233 * class.c (mono_class_from_name): Add support for assemblyref entries
16234 in the EXPORTEDTYPE table.
16236 * reflection.c: Add support for handling type forwarders under net 2.0.
16238 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16240 2006-03-14 Zoltan Varga <vargaz@gmail.com>
16242 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
16243 overwriting entries in ModuleBuild->types, also clean up the code
16244 a little. Fixes #77774.
16246 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16248 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
16249 load friend assembly info when present.
16251 2006-03-14 Raja R Harinath <rharinath@novell.com>
16253 Fix crasher on gtest-158.cs.
16254 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
16255 the return value if the MonoClass we want is yet in an
16256 inconsistent state.
16257 * class.c (mono_class_create_from_typedef): Add an comment
16258 explaining an order dependency between mono_class_setup_parent and
16259 mono_class_setup_mono_type.
16261 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
16263 * class.c: documentation updates and events bug fix.
16265 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
16267 * class.c: some cleanup, locking fixes.
16269 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16271 * class.c: fix the generics code to setup nested
16272 type info to the instantiated type (bug #77770).
16274 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16276 * marshal.c: fixed a few type correctness issues.
16278 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16280 * loader.c: the Set/Get/Addrtess array methods should be public.
16282 2006-03-11 Zoltan Varga <vargaz@gmail.com>
16284 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
16286 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
16289 2006-03-10 Zoltan Varga <vargaz@gmail.com>
16291 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
16293 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
16295 * mempool.c (mono_mempool_alloc): Speed this up a bit.
16296 (mono_mempool_alloc0): Ditto.
16298 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16301 (create_object_from_sockaddr): it was allocating 4 extra bytes
16302 for the AF_UNIX data. Fixes bug #77747.
16304 2006-03-09 Zoltan Varga <vargaz@gmail.com>
16306 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
16308 2006-03-09 Dick Porter <dick@ximian.com>
16310 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
16311 Fixes bug 76966 again.
16313 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
16315 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
16317 * appdomain.c: Bumped corlib version to 48 (due to r57532)
16319 2006-03-07 Martin Baulig <martin@ximian.com>
16322 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
16324 2006-03-07 Martin Baulig <martin@ximian.com>
16327 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
16328 regression introduced in r56970; see gtest-252.cs.
16330 * loader.c (mono_get_method_constrained): Correctly handle generic
16331 methods; see gtest-253.cs.
16333 2006-03-04 Zoltan Varga <vargaz@gmail.com>
16335 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
16337 2006-03-04 Martin Baulig <martin@ximian.com>
16339 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
16340 compute the parent type at runtime, just like we're already doing
16344 (mono_reflection_bind_generic_parameters): Don't compute the
16345 parent type anymore.
16347 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
16349 2006-03-04 Martin Baulig <martin@ximian.com>
16351 * mono-debug-debugger.h
16352 (mono_debugger_create_notification_function): Allocate memory at
16353 runtime and return a pointer to it.
16355 2006-03-03 Zoltan Varga <vargaz@gmail.com>
16357 * assembly.c: Fix windows build.
16359 * assembly.c: Fix build.
16361 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
16363 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
16365 2006-03-03 Dick Porter <dick@ximian.com>
16368 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16369 Check parameters before dereferencing them. Fixes Aaron's part of
16372 2006-03-03 Raja R Harinath <rharinath@novell.com>
16374 Fix performance regression.
16375 * loader.c (find_method_in_class): Add 'from_class' argument.
16376 Rename 'klass' argument to 'in_class'. The signature is compared
16377 against the method in 'in_class', and the corresponding method is
16378 returned from 'from_class'.
16379 (find_method): Walk both 'in_class' and 'from_class' in parallel.
16380 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
16381 type definition and generic instantiation in parallel.
16382 (mono_get_method_constrained): Update to changes.
16384 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16386 * threads.c: make sure the domain is correct, too when doing
16387 mono_thread_attach ().
16389 2006-03-01 Zoltan Varga <vargaz@gmail.com>
16391 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
16392 windows. Fixes #77683.
16394 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16396 * object.h, *: introduced specific way to set elements of an array
16397 of references to be used as write barrier. Still need to audit the
16398 uses of mono_array_addr.
16400 2006-03-01 Miguel de Icaza <miguel@novell.com>
16402 * object-internals.h: New field to cache the assmebly name, patch
16403 from Tambet Ingo (tambet@ximian.com)
16405 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16407 * decimal.h, class-internals.h, metadata-internals.h,
16408 file-io.h: mark a few function declarations as internal, to
16409 reduce the number of PLT entries.
16411 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16413 * file-io.c: fix typo in warning message.
16415 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
16417 * loader.c: on unix, lookup the "*A" version of a function
16418 if charset is auto as a second option before failing.
16420 2006-02-28 Raja R Harinath <rharinath@novell.com>
16422 * class.h (mono_class_inflate_generic_method): Revert to two
16424 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
16425 (mono_class_inflate_generic_method_full): Add.
16426 * class.c (mono_class_inflate_generic_method_full): Rename from
16427 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
16428 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
16429 * loader.c, reflection.c: Update to changes.
16431 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
16433 * icall.c: const fixes and small improvements.
16435 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16437 * threadpool.c: for asynchronous connect(), enable the same workaround
16438 for BSD 6 as for the Mac. Fixes bug #77637.
16440 2006-02-24 Zoltan Varga <vargaz@gmail.com>
16442 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
16443 formatted classes. Fixes #77524.
16445 2006-02-24 Raja R Harinath <rharinath@novell.com>
16447 * class.c (inflate_generic_type): Add a couple more
16448 micro-optimizations.
16449 (inflate_generic_context): Don't use the 'gmethod' from
16451 (mono_class_inflate_generic_method): If the method has generic
16452 parameters, but the passed-in context doesn't have a 'gmethod',
16453 create one. Use the possibly simplified generic instantiation
16454 from the declaring class instead of the one passed in.
16456 2006-02-24 Raja R Harinath <harinath@gmail.com>
16458 Make generic method signature and method header handling lazy.
16459 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
16460 (inflate_generic_header): Likewise.
16461 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
16462 parameter to avoid inflating types.
16463 (mono_get_inflated_method): Empty out.
16464 * class.h (mono_class_inflate_generic_method): Update to changes.
16465 * loader.c (mono_get_method_from_token): Don't parse signature for
16466 generic methods, nor methods of generic classes.
16467 (mono_method_signature): Rename from 'mono_method_signature'.
16468 Inflate signature on demand.
16469 (mono_method_get_header): Inflate method header on demand.
16470 * reflection.c: Update to changes.
16472 2006-02-23 Raja R Harinath <rharinath@novell.com>
16474 * metadata.c (mono_metadata_inflate_generic_inst): If the
16475 instantiation is closed, don't bother expanding it in the new
16477 * class.c (inflate_generic_class): If the generic instantiation
16478 doesn't change after inflation, return the argument itself.
16479 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
16481 (inflate_generic_context): If neither the generic class nor the
16482 generic method instantiations change, return the original context.
16483 * reflection.c (mono_method_get_object): Do
16484 'mono_get_inflated_method' before accessing the ->klass field.
16485 (inflate_mono_method): Don't create a MonoGenericMethod unless
16487 (inflate_method): Don't pass a constructed type as the declaring
16488 type of a methodbuilder.
16490 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
16492 * object.c: fix memory overwrite.
16494 2006-02-22 Dick Porter <dick@ximian.com>
16496 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
16497 it doesn't work any more.
16498 (mono_threads_request_thread_dump): Fix unused variable warnings.
16500 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16502 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
16503 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
16504 the public header file.
16506 2006-02-21 Zoltan Varga <vargaz@gmail.com>
16508 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
16510 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16512 * class-internals.h, object.c: reduce the size of MonoVTable
16513 and store the interface_offsets array at negative offsets.
16515 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16517 * metadata.c: tweak table descriptors data structures to reduce
16518 size and runtime relocations.
16520 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16522 * marshal.c: fix some types and opcodes to be type-safe
16523 in marshaling wrappers.
16525 2006-02-21 Ankit Jain <jankit@novell.com>
16527 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
16529 2006-02-21 Raja R Harinath <rharinath@novell.com>
16531 * metadata.c (get_constraints): Relax debugging checks for monodis.
16533 2006-02-21 Ankit Jain <jankit@novell.com>
16535 * metadata.c (mono_metadata_load_generic_params): Move the code
16536 checking for ambiguous generic params from here to mono/dis/get.c
16537 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
16539 2006-02-21 Raja R Harinath <harinath@gmail.com>
16541 Fix assertion triggered when compiling nemerle.
16542 * class.c (mono_get_shared_generic_inst): Rename from
16543 get_shared_inst and make non-static.
16544 * loader.c (mono_get_shared_generic_method): New. Used to create
16545 the MonoGenericContext-equivalent of a MonoGenericContainer.
16546 (mono_get_method_from_token): Initialize the 'context' field of
16547 the created MonoGenericContainer.
16548 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
16549 * metadata.c (get_constraints): Add sanity check.
16550 * class-internals.h: Add new internal methods.
16552 * reflection.c (verify_safe_for_managed_space): New sanity check.
16553 Currently checks that owner-less generic parameters aren't allowed
16555 (mono_type_get_object): Use it.
16556 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
16557 that are now in mono_type_get_object.
16558 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
16560 2006-02-19 Raja R Harinath <harinath@gmail.com>
16562 * metadata.c (mono_type_create_from_typespec): Rename from
16563 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
16564 argument and caching of types in the generic container.
16565 (unwrap_arrays, find_generic_param): Remove.
16566 * metadata-internals.h: Update.
16567 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
16569 2006-02-18 Zoltan Varga <vargaz@gmail.com>
16571 * class.c (mono_class_get_exception_for_failure): Fix a warning.
16573 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
16574 return values. Fixes #77581.
16576 * class.c (mono_fnptr_class_get): Switch name and name_space.
16578 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
16579 classes and add support for [In, Out] attributes.
16580 (mono_marshal_free_asany): Ditto. Fixes #77524.
16582 2006-02-18 Raja R Harinath <harinath@gmail.com>
16584 * class.c (mono_class_from_generic_parameter): Make more robust to
16585 incomplete MonoGenericContainers from monodis.
16587 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16589 * class-internals.h: added some more exception types.
16590 * class.c, metadata.c: added a few checks to handle missing
16593 2006-02-17 Raja R Harinath <rharinath@novell.com>
16595 Use owner-less generic-params some more.
16596 * class.c (my_mono_class_from_generic_parameter): Remove.
16597 (mono_class_from_generic_parameter): Handle null image,
16598 param->name and param->owner.
16599 (mono_class_from_mono_type): Update.
16600 (mono_class_create_from_typespec): Remove 'container' parameter.
16601 If that parameter is non-null, the result is always inflated by
16602 'mono_class_get_full' anyway.
16603 (mono_class_get): Rename from _mono_class_get. Remove 'container'
16605 (mono_class_get_full): Update.
16607 * class.c (inflate_generic_type) [GENERICINST]: If the generic
16608 instance is not open, don't bother inflating.
16609 (mono_class_setup_fields): Hoist some loop-invariants. Don't
16610 parse metadata for inflated classes.
16611 (_mono_class_get): Change GenericContext* parameter to
16613 (mono_class_create_from_typespec): Likewise. Simplify, and
16614 implement trivially. All the cases are handled in
16615 mono_class_from_mono_type. Don't inflate returned class.
16616 (mono_class_get_full): Delegate GENERICINST optimization to
16617 inflate_generic_type.
16618 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
16620 2006-02-16 Dick Porter <dick@ximian.com>
16622 * socket-io.c (create_object_from_sockaddr): Fix typo.
16623 (create_sockaddr_from_object): Check array lengths before
16624 potentially accessing items off the end.
16625 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
16626 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
16627 (ves_icall_System_Net_Sockets_Socket_Send_internal)
16628 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
16629 length checks to avoid wraparound overflows.
16630 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
16631 contents of the array of sockets
16632 (hostent_to_IPHostEntry2)
16633 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
16634 Check return value of inet_ntop ().
16635 (addrinfo_to_IPHostEntry): Fix typo
16637 2006-02-16 Raja R Harinath <rharinath@novell.com>
16639 Type metadata parsing doesn't use generic-instantiation information.
16640 * metadata.c (mono_metadata_parse_array_full): Change
16641 MonoGenericContext* parameter to MonoGenericContainer*.
16642 (mono_metadata_parse_type_full): Likewise.
16643 (mono_type_create_from_typespec_full): Likewise.
16644 (mono_metadata_parse_mh_full): Likewise.
16645 (mono_metadata_parse_generic_inst): Likewise.
16646 (do_mono_metadata_parse_generic_class): Likewise.
16647 (do_mono_metadata_parse_type): Likewise.
16648 * metadata-internals.h: Update to changes.
16649 * class.c (mono_class_find_enum_basetype): Likewise.
16650 (mono_class_setup_fields): Likewise.
16651 (mono_class_create_from_typespec): Likewise.
16652 * loader.c (method_from_methodspec): Likewise.
16653 (mono_get_method_from_token): Likewise.
16654 (mono_method_get_header): Likewise.
16656 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16658 * marshal.c: handle additional GENERICINST case (patch from
16659 Thong Nguyen <tum@veridicus.com>).
16660 Fix a few cases where LDIND_I/STIND_I was used for references.
16662 2006-02-16 Raja R Harinath <rharinath@novell.com>
16664 * reflection.c (mono_reflection_get_token): Remove unused variable.
16666 2006-02-16 Martin Baulig <martin@ximian.com>
16668 * reflection.c (mono_reflection_get_token): Add support for fields
16669 in instantiated generic types.
16672 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
16674 2006-02-15 Martin Baulig <martin@ximian.com>
16677 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
16678 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
16679 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
16680 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
16682 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16684 * class.c, metadata.c, metadata.h, object.c, icall.c,
16685 marshal.c: changed mono_type_get_underlying_type () to do
16686 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
16687 Fixed handling of instantiated generic valuetypes (bug #75479).
16689 2006-02-15 Raja R Harinath <rharinath@novell.com>
16691 * metadata.c (mono_metadata_decode_signed_value): Simplify.
16692 Delegate to mono_metadata_decode_value, and work on the returned value.
16694 * icall.c (ves_icall_MonoType_GetGenericArguments):
16695 Add consistency check here too.
16697 2006-02-15 Ankit Jain <jankit@novell.com>
16699 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
16702 2006-02-15 Ankit Jain <jankit@novell.com>
16704 * metadata.c (mono_metadata_decode_signed_value): New function to decode
16705 signed values, used only for representing lower bounds of arrays.
16706 (mono_metadata_parse_array_full): Use new
16707 mono_metadata_decode_signed_value to decode lower bounds.
16709 2006-02-14 Martin Baulig <martin@ximian.com>
16712 (mono_reflection_get_token): Support "MonoGenericMethod" and
16713 "MonoGenericCMethod" and allow generic instances / methods.
16715 2006-02-11 Zoltan Varga <vargaz@gmail.com>
16717 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
16718 to obtain the terminal size using an ioctl.
16720 * object.c (mono_nullable_init): Revert this as nullable reference
16721 types are not valid.
16722 (mono_nullable_box): Ditto.
16724 2006-02-09 Dick Porter <dick@ximian.com>
16726 * threads.c (mono_thread_detach): Drop a reference to the thread
16729 2006-02-09 Zoltan Varga <vargaz@gmail.com>
16731 * object.c (mono_nullable_init): Handle nullable reference types.
16732 (mono_nullable_box): Ditto. Fixes #77446.
16734 2006-02-07 Martin Baulig <martin@ximian.com>
16736 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
16738 2006-02-07 Ankit Jain <jankit@novell.com>
16740 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
16741 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
16742 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
16743 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
16744 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
16745 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
16747 2006-02-02 Zoltan Varga <vargaz@gmail.com>
16749 * class.c (mono_class_create_generic): Set type_token as well.
16751 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
16752 compatible with MS.
16754 2006-02-02 Martin Baulig <martin@ximian.com>
16756 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
16757 has never been used so far.
16759 2006-02-02 Martin Baulig <martin@ximian.com>
16761 * mono-debug-debugger.h: Changed comment at the top of this file;
16762 the header is not installed, but it's safe to #include it from
16765 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
16766 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
16768 2006-02-02 Martin Baulig <martin@ximian.com>
16771 (MonoSymbolTable): Removed the `metadata_info' field.
16774 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
16776 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16777 (mono_debugger_add_builtin_types): Removed.
16778 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
16779 (mono_debugger_create_notification_function): We now operate on a
16780 pre-allocated area; take a `gpointer' and return `void'.
16782 * mono-debug-debugger.c
16783 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
16784 (mono_debugger_add_builtin_types): Removed.
16786 2006-02-02 Martin Baulig <martin@ximian.com>
16788 * threads.c (mono_debugger_create_all_threads): New public method.
16790 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16792 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
16793 breaks on several platforms.
16795 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
16797 * assembly.c: the VS.NET build doesn't supply default values for
16798 MONO_ASSEMBLIES and MONO_CFG_DIR.
16800 2006-02-01 Zoltan Varga <vargaz@gmail.com>
16802 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
16805 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
16807 * loader.c (method_from_memberref): Fix a warning.
16809 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
16811 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
16812 with explicit layout. Fixes #77433.
16814 2006-01-31 Zoltan Varga <vargaz@gmail.com>
16816 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
16817 max_interface_id is initialized before using it. Fixes #77398.
16818 (ves_icall_Type_GetInterfaces): Ditto.
16820 2006-01-30 Raja R Harinath <rharinath@novell.com>
16822 * metadata.c (mono_metadata_parse_method_signature_full): Don't
16823 allocate memory for parameter attributes when parsing memberref
16825 * loader.c (mono_loader_set_error_method_load): Don't warn.
16826 (method_from_memberref): Ensure MissingMethodException gets thrown
16827 if method is not found. Make warning more informative.
16829 2006-01-29 Raja R Harinath <harinath@gmail.com>
16832 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
16833 return true if is byref.
16834 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
16835 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
16836 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
16838 2006-01-27 Raja R Harinath <rharinath@novell.com>
16840 Fix tests/find-method.2.il
16841 * loader.c (find_method, find_method_in_class): Remove is_inflated
16842 argument. Revert 2006-01-18 change.
16843 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
16844 is generic, search for method in its generic definition.
16845 * class.c (mono_class_setup_vtable_general): Print generic
16846 arguments of generic types in debugging printf.
16848 2006-01-26 Zoltan Varga <vargaz@gmail.com>
16850 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
16852 * threads.c (mono_threads_request_thread_dump): New helper function.
16854 2006-01-25 Raja R Harinath <rharinath@novell.com>
16856 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
16858 2006-01-25 Ankit Jain <jankit@novell.com>
16860 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
16861 move definition to ..
16862 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
16864 2006-01-25 Ankit Jain <jankit@novell.com>
16865 Raja R Harinath <rharinath@novell.com>
16867 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
16868 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
16871 2006-01-25 Martin Baulig <martin@ximian.com>
16873 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
16874 `MonoDebuggerThread' into debug-debugger.c.
16876 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16878 * profiler.c: fix printing of data.
16880 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
16882 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
16883 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
16885 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16887 * object.c: fix deadlock related to string interning.
16889 2006-01-23 Martin Baulig <martin@ximian.com>
16891 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16893 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
16895 2006-01-23 Martin Baulig <martin@ximian.com>
16897 * mono-debug.h: Moved the prototypes of some functions which are
16898 used by the JIT here from mono-debug-debugger.h.
16900 2006-01-21 Martin Baulig <martin@ximian.com>
16902 * Makefile.am: Don't install mono-debug-debugger.h.
16904 2006-01-21 Martin Baulig <martin@ximian.com>
16906 * mono-debug-debugger.h: Enforce the private status of this header
16907 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
16908 Moved some stuff from mono-debugger-jit-wrapper.h here.
16910 2006-01-20 Raja R Harinath <rharinath@novell.com>
16912 * class.c (mono_class_from_typeref): Add a sanity test to help
16913 catch lack of assembly load/search hooks.
16915 2006-01-19 Zoltan Varga <vargaz@gmail.com>
16917 * marshal.c (emit_struct_conv): Relax the fields with same offset
16918 check even more. Fixes #77230.
16920 2006-01-18 Martin Baulig <martin@ximian.com>
16922 * loader.c (find_method_in_class): Added `gboolean is_inflated'
16923 argument; if false, we compare the uninstantiated signatures.
16924 (method_from_memberref): Compare the uninstantiated signatures;
16927 2006-01-18 Robert Jordan <robertj@gmx.net>
16929 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
16930 Clear the weak link. Fixes bug #77170.
16932 * gc.c (mono_gchandle_free):
16933 Reflect *-gc.c changes (tiny optimization).
16935 2006-01-18 Zoltan Varga <vargaz@gmail.com>
16937 * metadata.c (mono_metadata_signature_dup): Applied patch from
16938 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
16941 2006-01-17 Zoltan Varga <vargaz@gmail.com>
16943 * marshal.c (emit_struct_conv): Allow fields with the same offset when
16944 marshalling from native to managed code. Fixes #77230.
16946 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16948 * threadpool.c: fix problem (Mac only) when more than one asynchronous
16949 connect. Fixes bug #77020.
16951 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16953 * class.c: fixed id assignement for nested interfaces (bug #77275).
16954 Added also better info for --print-vtable debugging.
16956 2006-01-12 Martin Baulig <martin@ximian.com>
16958 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
16959 interfaces on-the-fly; fixes #76625.
16961 * class-internals.h
16962 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
16963 don't need that anymore.
16965 2006-01-12 Miguel de Icaza <miguel@novell.com>
16968 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
16969 To avoid initing the nested_classes when not needed I turned the
16970 PeerCredData as a toplevel internal class, as it has to be shared
16973 Fixes the CASA issue.
16975 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
16977 * domain.c: Accessors for MonoJitInfo
16979 * profiler-private.h: Add jitinfo to the end jit hook
16981 * profiler.[ch]: Define new hooks, called after jitting which give
16982 the MonoJitInfo that was compiled
16984 2006-01-10 Martin Baulig <martin@ximian.com>
16986 * class.c (mono_class_setup_events): Add support for generic
16987 classes; fixes #76440.
16989 2006-01-06 Raja R Harinath <rharinath@novell.com>
16992 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
16993 on passed-in method.
16995 2006-01-03 Zoltan Varga <vargaz@gmail.com>
16997 * object.c (mono_runtime_invoke_array): Add Nullable support.
16999 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
17001 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
17003 * file-io.c: Don't consider sockets as directory and avoid an endless
17004 loop. Fix bug #76966.
17006 2006-01-03 Zoltan Varga <vargaz@gmail.com>
17008 * object.c (mono_nullable_init): New helper function.
17009 (mono_nullable_box): Ditto.
17011 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
17013 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
17015 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
17017 2006-01-02 Zoltan Varga <vargaz@gmail.com>
17019 * class.c (mono_class_is_assignable_from): Make T assignable to
17022 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
17024 * appdomain.c: Bump corlib version to 46.
17025 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
17026 serialization purpose) and changed ves_icall_System_Reflection_
17027 Assembly_get_code_base signature to accept a boolean (to escape, or
17028 not, the assembly code base).
17030 2005-12-23 Dick Porter <dick@ximian.com>
17034 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
17035 CreateEvent icall now returns "created" boolean parameter.
17037 2005-12-22 Zoltan Varga <vargaz@gmail.com>
17039 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
17042 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
17043 when attr_klass is an interface. Fixes #77045.
17045 2005-12-20 Zoltan Varga <vargaz@gmail.com>
17047 * marshal.c (emit_struct_conv): Fix previous patch.
17049 * marshal.c (emit_struct_conv): Add a check for fields with the same
17052 2005-12-20 Raja R Harinath <rharinath@novell.com>
17054 Fix regression in Mono.C5.
17055 * class.c (mono_class_create_generic): If 'klass' is an interface
17056 set up the interface offsets.
17057 (mono_class_is_assignable_from): Don't throw away generic arguments.
17059 2005-12-19 Raja R Harinath <rharinath@novell.com>
17061 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
17064 2005-12-15 Raja R Harinath <rharinath@novell.com>
17066 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
17068 (do_mono_metadata_parse_generic_class): Don't pass the current
17069 generic context when parsing the type being instantiated: it
17070 cannot use it, anyway.
17072 * loader.c (method_from_memberref): Don't inflate a signature if
17073 it doesn't contain any type parameters.
17075 2005-12-15 Zoltan Varga <vargaz@gmail.com>
17077 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
17079 2005-12-14 Martin Baulig <martin@ximian.com>
17082 (mono_type_get_name_recurse): Don't return null for type
17083 parameters and open generic classes.
17084 (mono_class_setup_methods): Don't exclude generic instances.
17085 (mono_get_unique_iid): Use different IDs for different
17086 instantiations of the same generic type.
17087 (mono_class_setup_vtable): Only use setup_generic_vtable() for
17088 open generic instances; create a normal vtable for closed generic
17090 (mono_class_setup_vtable_general): We're now also called for
17091 closed generic instances.
17094 (mono_reflection_bind_generic_parameters): Correctly use
17095 mono_metadata_lookup_generic_inst() everywhere.
17097 2005-12-14 Zoltan Varga <vargaz@gmail.com>
17099 * object.c (mono_class_create_runtime_vtable): Call
17100 mono_class_setup_vtable ().
17102 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
17104 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
17107 * loader.c (mono_loader_set_error_type_load): Print the type load
17108 warnings to the console so they are more visible to the user.
17109 (mono_loader_set_error_method_load): Ditto.
17111 * reflection.c (ensure_runtime_vtable): Revert the last change as it
17114 * reflection.c (ensure_runtime_vtable): Fix build.
17116 * reflection.c (ensure_runtime_vtable): Disable an optimization which
17117 doesn't work in all cases.
17119 2005-12-13 Zoltan Varga <vargaz@gmail.com>
17121 * object.c (mono_array_new_full): Treat a single dimensional array
17122 with 0 lower bounds as an szarray. Fixes #76973.
17124 * reflection.c (custom_attr_visible): Really fix this.
17126 2005-12-12 Zoltan Varga <vargaz@gmail.com>
17128 * reflection.c (custom_attr_visible): Allow nested public attributes
17131 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
17134 2005-12-12 Raja R Harinath <harinath@gmail.com>
17136 * class.c (set_generic_param_owner): Delete.
17137 (mono_class_create_from_typedef): Don't set ->owner field of
17138 generic parameters to "param containers" of enclosing classes.
17139 * reflection.c (mono_reflection_initialize_generic_parameter):
17142 2005-12-11 Zoltan Varga <vargaz@gmail.com>
17144 * reflection.c (custom_attr_visible): Fix build.
17146 2005-12-10 Zoltan Varga <vargaz@gmail.com>
17148 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
17149 private attributes.
17151 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
17152 handling of null parameter defaults.
17154 2005-12-09 Raja R Harinath <rharinath@novell.com>
17156 * class.c (mono_class_from_generic_parameter): Don't set
17157 klass->generic_container.
17158 (my_mono_class_from_generic_parameter): Likewise.
17160 2005-12-07 Zoltan Varga <vargaz@gmail.com>
17162 * reflection.c (load_public_key): Fix a warning.
17163 (method_encode_code): Fix unaligned accesses.
17165 2005-12-07 Martin Baulig <martin@ximian.com>
17167 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
17170 (write_generic_param_entry): Encode our custom attrs.
17172 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
17174 2005-12-07 Martin Baulig <martin@ximian.com>
17176 * reflection.c (encode_new_constraint): Removed; we don't use the
17177 `NewConstraintAttribute' anymore.
17179 2005-12-06 Zoltan Varga <vargaz@gmail.com>
17181 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
17182 not fire a TypeResolve event when Assembly.GetType () is called.
17184 2005-12-05 Ben Maurer <bmaurer@ximian.com>
17186 Beginning of support for nullable types in the runtime. Parts of
17187 this patch are from Martin.
17189 * appdomain.c (MONO_CORLIB_VERSION): Bump
17191 * domain.c (mono_init_internal): get the nullable type
17193 * class.c (mono_class_is_nullable): New method
17194 (mono_class_get_nullable_param): New mehod
17195 (mono_class_create_generic): In types T? set cast_class to T
17197 * class-internals.h (MonoDefaults): new nullable default class
17198 (mono_class_get_nullable_param, mono_class_get_nullable_param):
17201 2005-12-05 Raja R Harinath <rharinath@novell.com>
17203 * metadata.c (select_container): New. Refactor code to select the
17204 appropriate GenericContainer given the type of generic parameter
17205 we are looking for.
17206 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
17207 not a MonoGenericContext. Use select_container. Update parameters.
17208 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
17209 and MONO_TYPE_MVAR.
17210 (unwrap_arrays): Remove duplicate tests.
17211 (find_generic_param): Rename from 'has_same_context'. Now walks a
17212 generic instantiated class to find any arguments that are generic
17214 (mono_type_create_from_typespec_full): Use find_generic_param to
17215 avoid evicting some generic instantiations from the typespec
17218 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
17220 * reflection.c: fixed writing of doubles on ARM FPA.
17222 2005-12-02 Robert Jordan <robertj@gmx.net>
17224 * icall.c: Fixed EventInfo.ReflectedType (#76829).
17226 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17228 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
17229 least on SUSE 10 they are not the same (on debian, they are just the
17232 2005-12-01 Raja R Harinath <rharinath@novell.com>
17234 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
17235 DeclaringType for VARs and MVARs.
17236 * class.c (set_generic_param_owner): Fix initialization of owner
17239 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
17241 * icall.c: fixed Enum.ToObject() to correctly convert the values.
17243 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17245 * threadpool.c: workaround for a bug that shows up on the Mac:
17246 select()+connect() on a blocking socket is not like it should
17247 be, so we proceed to connect() in that case, wasting the I/O
17248 threadpool thread until connect succeedes. Fixes bug #75436.
17250 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17252 * threadpool.c: fix typo when setting file descriptor states.
17254 2005-11-28 Raja R Harinath <rharinath@novell.com>
17256 * class-internals.h (MonoGenericContainer.is_signature): Remove.
17257 * metadata.c (mono_metadata_parse_method_signature_full): Don't
17258 create a temporary signature container.
17259 (mono_metadata_parse_generic_param): Update to changes.
17260 (mono_type_create_from_typespec_full): Update to changes.
17261 * loader.c (method_from_memberref): Don't use a
17262 MonoGenericContainer while parsing a memberref signature.
17263 (method_from_methodspec): Remove dead-store of the 'container'
17264 variable. It's overwritten before use.
17266 * metadata.c (mono_type_create_from_typespec_full): Make debugging
17268 (mono_metadata_parse_generic_param): Likewise.
17269 * loader.c (find_method_in_class): Does not need a
17270 MonoGenericContainer. Use 'mono_method_signature' rather than
17271 'mono_method_signature_full'.
17272 (find_method, mono_get_method_constrained, method_from_memberref):
17275 * metadata.c (mono_type_create_from_typespec_full): Ensure that
17276 owner-less generic-parameters are never evicted from the typespec
17279 * loader.c (method_from_memberref): Don't use the current context
17280 when parsing signatures.
17281 (method_from_methodspec, mono_get_method_from_token): Update to changes.
17283 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
17284 side-effects in g_assert.
17285 * loader.c (mono_get_method_from_token): Resolve klass earlier so
17286 that we don't potentially lose information.
17288 2005-11-26 Dick Porter <dick@ximian.com>
17291 * threads.c: icalls to implement basic (ie, not named)
17292 System.Threading.Semaphore.
17294 2005-11-24 Dick Porter <dick@ximian.com>
17297 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
17298 Use GetProcessId() if it's available.
17300 2005-11-23 Zoltan Varga <vargaz@gmail.com>
17302 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
17304 2005-11-23 Raja R Harinath <rharinath@novell.com>
17305 Ankit Jain <jankit@novell.com>
17307 * loader.c (mono_get_method_from_token): Initialize 'method' field
17308 of all generic parameters before parsing the signature. Remove
17309 code that "fixed"-up MVAR references.
17311 2005-11-23 Ankit Jain <jankit@novell.com>
17313 * metadata.c (mono_metadata_has_generic_params):
17314 (mono_metadata_load_generic_param_constraints):
17315 (mono_metadata_load_generic_params): Move duplicate code ...
17316 (mono_metadata_get_generic_param_row): ... here. Returns the
17317 first row-id in GenericParam table for a given owner (token).
17318 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
17321 2005-11-23 Raja R Harinath <rharinath@novell.com>
17322 Ankit Jain <jankit@novell.com>
17324 * metadata.c (mono_metadata_class_equal): Pass signature_only when
17325 comparing VARs too.
17326 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
17327 type->data.generic_param only if the type is an MVAR.
17328 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
17329 leak owner-less VARs and MVARs into managed space.
17331 2005-11-21 Martin Baulig <martin@ximian.com>
17333 * class-internals.h
17334 (MonoMethod): Moved the `generic_container' here from
17335 `MonoMethodNormal' since we now also need it for
17336 `MonoMethodPInvoke';
17337 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
17338 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
17339 an union containing both `MonoMethodNormal' and
17340 `MonoMethodPInvoke'.
17343 (mono_get_method_from_token): Allow implementing generic methods
17347 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
17350 2005-11-17 Dick Porter <dick@ximian.com>
17354 * process.c: Split the Process Start_internal icall into
17355 ShellExecuteEx_internal and CreateProcess_internal, which are
17356 called depending on whether UseShellExecute is true. Fixes bug
17359 * appdomain.c (MONO_CORLIB_VERSION): Incremented
17361 2005-11-17 Zoltan Varga <vargaz@gmail.com>
17363 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
17364 'msize' parameters, use the information in 'mspec' instead.
17365 (emit_object_to_ptr_conv): Ditto.
17367 * marshal.c (emit_struct_conv): Handle explicit layout structs with
17368 fields out of order. Fixes #76733.
17370 2005-11-17 Ankit Jain <jankit@novell.com>
17372 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
17374 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
17376 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
17379 2005-11-16 Zoltan Varga <vargaz@gmail.com>
17381 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
17382 for types with non-auto layout. Fixes #76717.
17384 2005-11-16 Ankit Jain <jankit@novell.com>
17386 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
17387 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
17388 if generic_context is null.
17389 (mono_metadata_generic_param_equal): param->owner can be null.
17390 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
17393 2005-11-16 Zoltan Varga <vargaz@gmail.com>
17395 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
17398 2005-11-15 Martin Baulig <martin@ximian.com>
17400 * object.c (set_value): Use mono_class_from_mono_type() instead of
17401 the hack for generic instances; fixes #76136.
17403 2005-11-15 Zoltan Varga <vargaz@gmail.com>
17405 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
17408 * image.c (load_metadata_ptrs): Initialize the new fields.
17410 * reflection.c (create_dynamic_mono_image): Ditto.
17412 * reflection.c (build_compressed_metadata): Use the new fields.
17414 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
17417 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
17420 2005-11-15 Ankit Jain <jankit@novell.com>
17421 Raja R Harinath <harinath@gmail.com>
17423 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
17424 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
17425 new per-generic_container cache if the cached MonoType's context matches
17426 the current context.
17427 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
17428 to the expected context.
17429 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
17431 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17433 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
17434 we changed the signature of an icall.
17435 * icall.c: Modify to mono_double_ParseImpl return true/false
17436 depending on the success, instead of throwing the exception. This will
17437 help us in Double.TryParse methods.
17439 2005-11-14 Zoltan Varga <vargaz@gmail.com>
17441 * marshal.c (emit_marshal_object): Throw an exception when
17442 marshalling 'object' instead of crashing. Fixes #76696.
17444 2005-11-11 Zoltan Varga <vargaz@gmail.com>
17446 * class-internals.h: Add prototype for mono_type_get_full_name ().
17448 2005-11-11 Dick Porter <dick@ximian.com>
17450 * threads.c (mono_thread_manage): Make sure the main thread has
17451 abandoned all its mutexes when cleaning up. Fixes bug 74680.
17453 2005-11-11 Zoltan Varga <vargaz@gmail.com>
17455 * loader.c (mono_loader_set_error_type_load): Log a warning to the
17456 console about the missing type.
17457 (mono_loader_set_error_method_load): Ditto.
17459 2005-11-09 Miguel de Icaza <miguel@novell.com>
17461 * mono-config.c (mono_get_config_dir): Set the system defaults if
17464 * assembly.c (mono_set_dirs): New API entry point to set the
17465 assembly and the config directory in one call
17467 2005-11-09 Zoltan Varga <vargaz@gmail.com>
17469 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
17470 the ftnptr was created from a delegate in a domain other than the
17471 current domain. Fixes #75377.
17473 * exception.h exception.c: Add mono_get_exception_not_supported ().
17475 2005-11-08 Martin Baulig <martin@ximian.com>
17477 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
17479 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
17481 * security-manager.h: Added definitions to deal with strongname key
17482 pairs bigger (and smaller) than 1024 bits.
17483 * reflection.c: Remove hardcoded strongname size (128 bytes) and
17484 adjust wrt the public key length being used.
17486 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
17488 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
17489 Windows build (r51396-51397).
17491 2005-11-03 Martin Baulig <martin@ximian.com>
17493 * class.c (mono_class_setup_vtable_general): Also add generic
17494 methods to the vtable; fixes #76581.
17496 2005-11-01 Miguel de Icaza <miguel@novell.com>
17498 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
17499 sure that we lookup GetString method from the System.Text.Encoding
17500 class, not the derived class or we get an empty method.
17502 Fixed class #76612.
17504 2005-10-25 Miguel de Icaza <miguel@novell.com>
17506 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
17507 if it has been previously set (embedders).
17509 Make mono_set_rootdir available also on Unix.
17511 005-10-24 Robert Jordan <robertj@gmx.net>
17513 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
17515 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
17517 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
17518 only calls which are made to native code use this flag.
17520 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
17522 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
17524 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
17525 Add support for FieldBuilders.
17527 2005-10-29 Martin Baulig <martin@ximian.com>
17530 (mono_debug_using_mono_debugger): New public method; returns
17531 whether we're running inside the debugger.
17533 2005-10-27 Zoltan Varga <vargaz@gmail.com>
17535 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
17536 for Method/Constructor/FieldBuilders.
17538 2005-10-26 Zoltan Varga <vargaz@gmail.com>
17540 * reflection.c (module_add_cattrs): Save custom attributes for global methods
17541 and fields as well.
17543 2005-10-26 Martin Baulig <martin@ximian.com>
17545 * mono-debug-debugger.c
17546 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
17548 2005-10-24 Raja R Harinath <harinath@gmail.com>
17550 * icall.c (base64_to_byte_array): Don't pass an out-of-range
17551 integer to isspace.
17553 2005-10-21 Zoltan Varga <vargaz@gmail.com>
17555 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
17556 when passing valuetypes byref. Fixes #76502.
17558 2005-10-19 Jackson Harper <jackson@ximian.com>
17560 * profiler.c: Don't put a . in front of types that are not in a
17563 2005-10-18 Zoltan Varga <vargaz@gmail.com>
17565 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
17567 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
17569 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
17571 (mono_marshal_get_ldflda_wrapper): Fix a warning.
17573 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17575 * assembly.c metadata-internals.h icall.c: Define an additional
17576 parameter for mono_assembly_name_parse_full, so we can avoid creating
17577 S.R.AssemblyName.Version when no version info wasn't passed.
17579 2005-10-09 Miguel de Icaza <miguel@novell.com>
17581 * class.c (mono_type_get_full_name): Reimplement method that was
17584 * image.c: Some docs
17586 2005-10-10 Zoltan Varga <vargaz@gmail.com>
17588 * profiler.c (output_newobj_profile): Fix printing of Total memory
17591 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
17593 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
17595 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
17597 * threads.c: remove debug output.
17599 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
17601 * threads.c (mono_thread_manage): Fix crashes if more than 64
17602 threads need to be aborted. Hopefully fixes #75899.
17604 * assembly.c (mono_stringify_assembly_name): New helper function.
17606 * class.c: Use mono_stringify_assembly_name instead of the similar
17609 * assembly.h assembly.c: Add support for calling a postload search
17610 hook if an assembly cannot be loaded.
17612 * appdomain.c: Register new search hooks which call the AssemblyResolve
17613 events in AppDomain. Fixes #75231
17615 2005-10-07 Martin Baulig <martin@ximian.com>
17617 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
17618 methods without debug info.
17620 2005-10-07 Zoltan Varga <vargaz@gmail.com>
17622 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
17625 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17627 * file-io.c: now that we return symlinks, use lstat and, when the file
17628 is a symbolic link, stat, to get the file attributes. Also avoid the
17629 conversion to/from utf16/external.
17631 2005-10-06 Zoltan Varga <vargaz@gmail.com>
17633 * class.c (mono_class_layout_fields): Compute klass->has_references
17634 correctly if an embedded valuetype is not yet initialized. Fixes
17637 2005-10-04 Martin Baulig <martin@ximian.com>
17640 (mono_metadata_load_generic_param_constraints): New public
17641 function; splitted the constraints loading out from
17642 mono_metadata_load_generic_params().
17644 * class.c (mono_class_create_from_typedef): Call
17645 mono_metadata_load_generic_param_constraints() after setting up
17646 the type and creating our parent; fixes #75329.
17648 2005-10-04 Martin Baulig <martin@ximian.com>
17650 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
17651 non-dynamic parent classes.
17653 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
17655 * file-io.c : win32 build fix (ETXTBSY seems not found).
17657 2005-10-04 Martin Baulig <martin@ximian.com>
17660 (mono_image_get_methodspec_token): Make the cache actually work;
17663 2005-10-04 Martin Baulig <martin@ximian.com>
17665 * class.c (mono_class_name_from_token): Removed the unneccessary
17666 `MonoGenericContext *' argument.
17668 2005-10-04 Martin Baulig <martin@ximian.com>
17671 (method_from_methodspec): Make the caching work again; fixes the
17672 performance regression from #76262.
17674 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17678 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
17679 GetFileSystemEntries that performs the same work but without going
17680 into io-layer, locking, etc.
17682 2005-09-30 Zoltan Varga <vargaz@gmail.com>
17684 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
17685 ThreadState_Stopped as well. Fixes #76047.
17687 2005-09-29 Martin Baulig <martin@ximian.com>
17690 (inflate_generic_context): If the new context has a `gmethod', set
17691 its `container' that that gmethod's `container'.
17694 (mono_metadata_parse_generic_param): Simplify things;
17695 `generic_container = generic_context->container;' is just fine.
17697 * loader.c (method_from_methodspec): Code cleanups.
17699 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17701 * decimal.c: fix warning (and let gcc generate correct
17702 code on ARM with optimizations).
17704 2005-09-28 Martin Baulig <martin@ximian.com>
17707 (method_from_memberref): Added `MonoGenericContext *class_context'
17708 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
17709 (method_from_methodspec): If we're a memberref, use the enclosing
17710 context when parsing its parent. Fixes #76262; see gtest-206.cs.
17712 2005-09-28 Martin Baulig <martin@ximian.com>
17714 * object.c (mono_runtime_invoke_array): Added support for
17715 MONO_TYPE_GENERICINST; fixes #75917.
17717 2005-09-27 Martin Baulig <martin@ximian.com>
17719 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
17720 `k->byval_arg.type' to determine the actual type.
17722 * loader.c (method_from_methodspec): Removed some hacks.
17724 2005-09-27 Ben Maurer <bmaurer@ximian.com>
17726 * class-internals.h (mono_field_is_deleted): Do the test for
17727 rtspecialname before we check the actual name of the field. This
17728 prevents us from dereferencing a pointer into the string table,
17729 saving us from accessing a few pages
17731 * *.c: Replace the use of {Enter,Leave}CriticalSection with
17732 macros. This will allow a deadlock debugger to easily be plugged
17735 2005-09-27 Martin Baulig <martin@ximian.com>
17737 * loader.c (method_from_methodspec): Create a "signature"
17738 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
17740 2005-09-27 Martin Baulig <martin@ximian.com>
17743 (inflate_generic_class): Correctly set the new context's
17747 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
17748 instead of a `MonoGenericContext *'.
17749 (mono_method_signature_full): Take a `MonoGenericContainer *'
17750 instead of a `MonoGenericContext *'.
17753 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
17754 instead of a `MonoGenericContext *'.
17755 (mono_metadata_parse_method_signature_full): Likewise.
17757 2005-09-26 Martin Baulig <martin@ximian.com>
17760 (mono_class_from_generic_parameter): Set `klass->generic_container'
17761 (mono_class_from_generic_parameter): Likewise.
17762 (mono_bounded_array_class_get): We inherit the generic container
17763 from the element class.
17766 (find_method, find_method_in_class): Take a `MonoGenericContext *'
17767 argument rather than computing it here.
17768 (method_from_memberref): Correctly set the generic context before
17769 parsing the signature. Fixes #75681.
17771 2005-09-26 Zoltan Varga <vargaz@gmail.com>
17773 * object.c (mono_class_has_special_static_fields): Fix warnings.
17775 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
17777 * assembly.c: Add parse_public_key function, to
17778 par the public keys. Also added mono_assembly_name_parse_full,
17779 to define it the parsed key should be freed or not.
17780 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
17781 to parse a long format assembly name.
17782 * metadata-internals.h: Keep mono_assembly_name_parse_full as
17783 private, since calling it to preserve the key requires
17784 freeing it manually.
17786 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
17788 * locales.c : removed HAVE_ICU part.
17790 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
17792 * object.c (mono_class_create_runtime_vtable): Avoid calling
17793 field_is_special_static if the klass has no special static fields.
17795 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
17796 (MonoCachedClassInfo): Likewise.
17798 * object.c (mono_class_has_special_static_fields): New helper function.
17800 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17802 * class.c (mono_class_create_from_typedef): Don't call
17803 interfaces_from_typedef_full for enums.
17804 (mono_class_create_from_typedef): Compute the base types of enums directly
17805 without calling mono_class_setup_fields ().
17806 (mono_class_find_enum_basetype): New helper function.
17808 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
17809 one place inside the string heap.
17811 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
17813 * class.c: locking fixes, code cleanups, some docs added.
17814 Allocate some data structures in the image mempool.
17816 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17818 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17821 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
17823 * class-internals.h, class.c, reflection.c: reduce memory taken by
17826 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
17828 * metadata.c, metadata.h, loader.h: documentation updates, code and
17831 2005-09-23 Zoltan Varga <vargaz@gmail.com>
17833 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17836 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
17837 page faults caused by the runtime while reading metadata.
17839 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17841 * socket-io.c: the field names were changed 3 months ago and no one
17842 realized until bug #76077 got filed!
17844 2005-09-20 Martin Baulig <martin@ximian.com>
17846 * icall.c (assembly_icalls): Removed some unused debugger icalls.
17848 2005-09-20 Martin Baulig <martin@ximian.com>
17850 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
17851 write the rank into the class entry.
17853 2005-09-20 Martin Baulig <martin@ximian.com>
17855 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
17857 2005-09-19 Zoltan Varga <vargaz@gmail.com>
17859 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17861 * icall.c (custom_attrs_defined_internal): New icall.
17863 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
17865 (mono_custom_attrs_construct_by_type): New helper function.
17867 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
17869 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
17870 terminate the resulting string. Fixes #76123.
17872 2005-09-16 Martin Baulig <martin@ximian.com>
17875 (mono_debug_add_method): Ignore inflated methods for the moment.
17877 2005-09-14 Martin Baulig <martin@ximian.com>
17879 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
17881 2005-09-13 Zoltan Varga <vargaz@gmail.com>
17883 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
17884 return a success/failure indication.
17885 (mono_metadata_interfaces_from_typedef_full): Ditto.
17886 (get_constraints): Ditto.
17888 2005-09-12 Zoltan Varga <vargaz@gmail.com>
17890 * marshal.c (emit_marshal_array): Fix handling of null arrays.
17892 * marshal.c (emit_marshal_array): Add support for returning string
17893 arrays from delegates. Fixes #76063.
17895 * marshal.c: Use the emit_ldloc/stloc macros where possible.
17897 2005-09-11 Zoltan Varga <vargaz@gmail.com>
17899 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
17902 2005-09-09 Zoltan Varga <vargaz@gmail.com>
17904 * reflection.c icall.c: Fix after mono_get_exception_type_load
17907 * assembly.c (mono_assembly_get_assemblyref): New helper function.
17908 (mono_assembly_load_reference): Use the new helper.
17910 * class-internals.h (MonoLoaderError): New structure containing
17911 information about type loading errors.
17913 * class-internals.h loader.c: Add APIs to store per-thread loader
17916 * loader.c class.c: Set the loader error if needed.
17918 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
17920 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
17922 * decimal.c: fixed to handle the broken ARM fp format.
17924 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
17926 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
17929 2005-09-06 Martin Baulig <martin@ximian.com>
17931 * domain.c (supported_runtimes): Added v2.0.50727.
17933 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
17935 * culture-info.h: reduce the size of some structures.
17937 2005-09-05 Martin Baulig <martin@ximian.com>
17939 Reflect latest API changes in the August CTP.
17942 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
17943 ("MonoType.HasGenericArguments"): Removed.
17944 ("MonoMethod.BindGenericParameters"): Renamed to
17945 "MakeGenericMethod".
17946 ("MethodBuilder.BindGenericParameters"): Renamed to
17947 "MakeGenericMethod".
17949 2005-09-05 Martin Baulig <martin@ximian.com>
17951 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
17953 2005-09-05 Martin Baulig <martin@ximian.com>
17955 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17957 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
17958 generic_container is non-NULL.
17960 2005-09-05 Martin Baulig <martin@ximian.com>
17962 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17964 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
17966 2005-08-29 Michal Moskal <malekith@nemerle.org>
17968 * reflection.c (encode_locals,
17969 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
17970 for large generic types.
17972 2005-09-05 Martin Baulig <martin@ximian.com>
17974 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17976 * class.c (mono_dup_array_type): New public method.
17977 (mono_metadata_signature_deep_dup): New public method.
17978 (dup_type): Correctly duplicate array and function types.
17980 2005-09-05 Martin Baulig <martin@ximian.com>
17982 Applying a patch from Michal Moskal <malekith@nemerle.org>.
17984 * reflection.c (get_default_param_value_blobs): Handle generic types
17985 and generic methods.
17987 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
17989 * class.c: Fixed error reporting (method/class were inversed) for
17990 inheritance demands.
17991 * security-manager.c|h: Added the AppDomain when calling the managed
17992 System.Security.SecurityManager.InheritanceDemand method.
17994 2005-09-01 Raja R Harinath <rharinath@novell.com>
17996 * reflection.c (encode_marshal_blob): 'marshaltype' and
17997 'marshaltyperef' are alternate sources for the custom marshaler
18000 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
18002 * class.c: fix creation of array classes with rank == 1
18003 (patch by Ankit Jain <jankit@novell.com>).
18005 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
18007 * object.c: fix check for creating the bound data for arrays vs
18010 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18012 * object.c: configuration file name is now based on the executable name,
18013 not the image name. Fixes bug #75931.
18015 2005-08-29 Zoltan Varga <vargaz@gmail.com>
18017 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
18018 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
18020 2005-08-25 Zoltan Varga <vargaz@gmail.com>
18022 * rand.c: Use wincrypt.h instead of WinCrypt.h.
18024 2005-08-24 Ankit Jain <jankit@novell.com>
18025 Raja R Harinath <rharinath@novell.com>
18027 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
18028 called by it recursively.
18029 (mono_class_init): Remove special case in pending_init handling, since it's
18030 superseded by the fix to mono_class_from_typeref.
18032 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
18034 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
18035 BROKEN_THREAD_START stuff.
18037 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
18039 * class-internals.h object.c: Add a new kind of trampoline called a delegate
18042 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
18044 * object.c (mono_delegate_ctor): Replace the original function address with
18045 a delegate trampoline.
18047 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
18049 * icall.c: add boolean argument to base64_to_byte_array and
18050 InternalFromBase64String to control whether a whitespace-only string
18051 is allowed (or should casue a FormatException to be thrown). We need
18052 this as the behavior has changed between MS.NET 1.x and 2.0, and we
18053 to match the MS behaviour in both profiles.
18054 * appdomain.c: Bump corlib version.
18056 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18058 This patch implements a big portion of publisher policy
18059 support, used to bind assembly versions and redirect
18060 one assembly from version A to version B.
18063 New GSList loaded_assembly_bindings, for storing the cached
18065 (assembly_binding_maps_name): New static function for checking if a
18066 assembly binding information maps an assembly name.
18067 (mono_assembly_binding_info_free): New function for freeing
18068 assembly binding information resources.
18069 (get_publisher_policy_info): New static function for retrieving
18070 assembly binding information from a MonoImage.
18071 (compare_versions): New static function for comparing an assembly
18072 binding information data and the version of an assembly name.
18073 (check_policy_versions): New static function for checking if an
18074 assembly binding info mapping an assembly name is valid for it.
18075 (mono_assembly_load_publisher_policy): New static function for
18076 loading the 'policy.major.minor.MyAssembly' image for an assembly
18077 with an assembly name 'aname'.
18078 (mono_assembly_bind_version): New static function for updating
18079 assembly redirection.
18080 (mono_assembly_apply_binding): New static function for applying
18082 (search_binding_loaded): New static function for searching
18083 loaded assembly binding infos in the cache domain.
18084 (mono_assembly_load_full): Don't apply assembly binding for
18085 reflection only assemblies.
18087 * metadata-internals.h: Add MonoAssemblyBindingInfo,
18088 which contains information about assembly binding. Also
18089 declare signature for mono_config_parse_publisher_policy ()
18090 function, used to retrieve pub policy info.
18093 (publisher_policy_start): New static function used to parse publisher
18094 policy config files.
18095 (publisher_policy_parser): New static MonoParseHandler containing
18096 the functions used when parsing config files.
18097 (mono_config_parse_publisher_policy): New function for parsing
18098 publisher policy files.
18100 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
18102 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
18104 * marshal.c (mono_delegate_free_ftnptr): Ditto.
18106 * object.c (mono_get_addr_from_ftnptr): New helper function.
18108 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
18110 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18112 2005-08-19 Dick Porter <dick@ximian.com>
18114 * threads.c, threads.h, appdomain.c, appdomain.h,
18115 profiler-private.h, monitor.c, object.c, object-internals.h,
18116 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
18117 store the thread ID, so it can hold a 64 bit value if needed.
18119 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
18121 * reflection.c (mono_reflection_create_dynamic_method): Store the
18122 handle class into the method references as well so ldtoken works in
18125 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
18128 2005-08-19 Ankit Jain <jankit@novell.com>
18131 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
18132 here rather than using the method signature of a arbitrary function
18133 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
18135 Hack done with Harinath.
18137 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18139 * threadpool.c: disable printing stack traces when we get a exception
18140 in a threadpool thread. I need to do more testing to figure out which
18141 cases actually print this. Fixes bug #75828.
18143 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18145 * icall.c: there might be ignored whitespace after the last '='. This
18146 fixes length computation and bug #75840.
18148 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
18150 * assembly.c (mono_assembly_load_full): Consider .exe extension as
18151 well. Fixes #75809.
18153 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
18156 * reflection.c (create_custom_attr_data): Ditto.
18158 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
18160 * locales.c, culture-info.h : removed RegionLCIDMap.
18161 * culture-info-tables.h : regenerated.
18163 2005-08-16 Martin Baulig <martin@ximian.com>
18165 * class.c (mono_type_get_name_recurse): Small fix.
18167 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
18169 * locales.c : indentation fixie.
18171 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
18173 * object-internals.h,
18177 icall.c : added RegionInfo table support.
18178 * culture-info-table.h : regenerated for region support.
18180 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
18182 * reflection.c (resolve_object): handle all kinds of MonoMethod
18183 including generic ones
18185 2005-08-12 Ankit Jain <jankit@novell.com>
18187 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
18188 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
18190 2005-09-12 Lluis Sanchez <lluis@ximian.com>
18192 * process.c: Don't close a thread handle when it's NULL. This is a
18193 workaround for bug #75733.
18195 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
18197 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
18199 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
18201 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
18203 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18205 * threadpool.c: if a work item in the thread pool has a callback that
18206 catches a exception, don't propagate it after invoking the callback.
18209 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
18211 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
18213 * class-internals.h (MonoCachedClassInfo): Add some new fields.
18215 * class.c (mono_class_init): Load field info lazily in the AOT case.
18217 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
18219 2005-08-03 Ankit Jain <jankit@novell.com>
18222 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
18223 PInvoke calling convention is 0.
18225 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
18227 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
18228 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
18230 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
18232 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
18233 to handle threads not started by the GC (patch by Michael Meeks
18234 <michael.meeks@novell.com>).
18236 2005-07-31 Kamil Skalski <nazgul@omega.pl>
18238 * reflection.c: Make buffer used in emitting types larger for some
18239 big generic types (patch by Michal Moskal).
18241 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
18243 * mono-debug.c: Fix some (not all) alignment problems.
18245 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18247 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
18248 Invoke mono_image_load_from_data_full passing the refonly
18252 (mono_assembly_open_from_bundle): Add the refonly argument,
18253 in order to pass it to other methods it calls to.
18254 (do_mono_assembly_open): Add the refonly argument, in order
18255 to pass it to other methods it calls to.
18256 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
18257 the refonly parameter to it.
18259 * image.c: Add loaded_images_refonly_hash and
18260 loaded_images_refonly_guid_hash to cache the reflection
18261 only loaded images.
18262 (mono_images_init): Initialize the hash tables used for
18263 caching the reflection only images.
18264 (load_modules): Invoke mono_image_open_full passing the refonly
18265 parameter to load the modules the correct way.
18266 (build_guid_table): Add the refonly argument, to re-build the
18267 correct hash table.
18268 (do_mono_image_open): Added the refonly argument, in order to
18269 define it for the loaded image.
18270 (mono_image_loaded_full): New function, which receives an
18271 additional parameter to look for the image in the refonly or
18272 non-refonly section.
18273 (mono_image_loaded): Updated, using mono_image_loaded_full.
18274 (mono_image_loaded_by_guid_full): The same case that happens
18275 with mono_image_loaded_full.
18276 (mono_image_loaded_by_guid): Likewise.
18277 (register_image): Use the ref_only variable inside MonoImage
18278 to decide in which hash table store the current image.
18279 (mono_image_open_from_data_full): Rename
18280 mono_image_open_from_data to mono_image_open_from_data_full,
18281 adding the refonly argument, to define the ref_only variable
18283 (mono_image_open_from_data): Return
18284 mono_image_open_from_data_full.
18285 (mono_image_open_full): Rename mono_image_open to
18286 mono_image_open_full, receiving the new refonly argument,
18287 to pass it to inner methods.
18288 (mono_pe_file_open): Update this function, to open
18289 a MonoImage as a non-refonly image.
18290 (mono_image_close): Use the refonly variable inside
18291 MonoImage to remove the image from the correct caches.
18293 * image.h: Add the signatures of mono_image_open_full,
18294 mono_image_open_from_data_full, mono_image_loaded_full,
18295 mono_image_loaded_by_guid_full.
18297 * metadata-internals.h: Add the ref_only field to
18300 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18302 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
18303 Fix the last behavior, which used to load the assemblies and
18304 extract MonoReflectionAssemblyName information, instead of
18305 extract it from the metadata tables. Needed for Reflection
18308 2005-07-29 Martin Baulig <martin@ximian.com>
18310 * mono-debug-debugger.c
18311 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
18315 (mono_debug_address_from_il_offset): Check whether we have
18316 debugging support before attempting to take the lock.
18317 (mono_debug_source_location_from_address): Likewise.
18318 (mono_debug_source_location_from_il_offset): Likewise.
18319 (mono_debug_il_offset_from_address): Likewise.
18320 (mono_debug_address_from_il_offset): Likewise.
18322 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
18324 * class.c (mono_class_from_name_case): Add support for dynamic images.
18327 * object.c (mono_class_compute_gc_descriptor): Add a workaround
18330 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
18332 * reflection.c (mono_method_get_object): Fix warning.
18334 2005-07-28 Martin Baulig <martin@ximian.com>
18337 (mono_debug_add_wrapper): Also write the wrapper type.
18339 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
18341 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
18343 * class.c (mono_class_init): Avoid reading nested classes if the AOT
18344 data indicates the class has none.
18346 2005-07-26 Ben Maurer <bmaurer@ximian.com>
18348 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
18349 loader lock with the debugger lock. Prevents deadlocks for beagle.
18351 Beagle can now run on an smp box for a weekend without any
18354 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
18356 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
18357 in a module. Fixes #75629.
18359 2005-07-26 Martin Baulig <martin@ximian.com>
18361 * mono-debug.c (mono_debug_add_wrapper): New static method.
18362 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
18363 interncall or a wrapper.
18365 * mono-debug.h (MonoDebugWrapperData): New public typedef.
18366 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
18367 (MONO_DEBUGGER_VERSION): Bump to 51.
18369 * mono-debug-debugger.c
18370 (mono_debugger_add_type): Removed this empty function.
18371 (mono_debugger_add_method): Likewise.
18373 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
18375 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
18376 before accessing method->slot.
18378 2005-07-21 Jb Evain <jbevain@gmail.com>
18380 * reflection.c (method_encode_clauses/class): Handle filters clauses.
18383 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
18385 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
18388 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
18390 * image.h image.c: Add mono_image_get_guid () API function.
18392 2005-07-19 Ben Maurer <bmaurer@ximian.com>
18394 There were issues when multiple threads tried to load
18395 assemblies. A deadlock was created between assemblies_mutex and
18396 mono_domain_assemblies_lock. This fixes the issue by making the
18397 assembly ref counting be lock free. See bug 75586.
18399 * image.c (mono_image_close): The add ref function here was using
18400 Interlocked operations while the unref was using a mutex and a
18401 --. I don't think this was ever a bug that would be exposed in a
18402 non-pendantic way (ie, by an embedder doing a ref on one thread
18403 and an unref on another), but for the sake of correctness, this is
18406 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
18407 (mono_assembly_load_reference): Call mono_assembly_addref rather
18408 than touching the refcount ourselves.
18409 (mono_assembly_close): Use InterlockedDecrement to unref the
18410 assembly. Don't acquire the lock unless it is actually needed.
18412 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
18414 * class.c (mono_class_layout_fields): Fix calculation of has_references
18417 2005-07-12 Martin Baulig <martin@ximian.com>
18419 Applying a patch from Michal Moskal <malekith@nemerle.org>.
18422 (mono_type_hash): Provide better hashing for generic instances.
18423 (mono_generic_inst_hash): Improve hashing.
18424 (mono_generic_class_hash): Likewise.
18426 * reflection.c (mymono_metadata_type_hash): Improve hashing for
18429 2005-07-12 Martin Baulig <martin@ximian.com>
18431 * reflection.c (mono_reflection_create_runtime_class): Remove the
18432 hack for generic type definitions and non-`Run' assemblies.
18433 (mono_reflection_bind_generic_parameters): Also use
18434 `klass->wastypebuilder' to check for TypeBuilders.
18436 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
18438 * class.c (mono_class_layout_fields): Fix calculation of has_references
18441 * class.c (inflate_generic_class): Fix a leak.
18442 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
18445 2005-07-11 Martin Baulig <martin@ximian.com>
18447 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
18450 2005-07-11 Martin Baulig <martin@ximian.com>
18452 * loader.c (find_method): Also lookup in
18453 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
18455 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18457 * appdomain.c (mono_domain_unload): Don't free the error message
18458 before passing it to mono_get_exception_...
18460 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
18462 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
18464 * threads.c: try to better guess an available RT signal (bug #75387).
18466 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18468 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
18471 2005-07-07 Martin Baulig <martin@ximian.com>
18473 * class.c (mono_type_get_name_full): Return NULL for
18474 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
18477 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
18479 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
18480 exit the appdomain as well being aborted.
18482 * threadpool.c: Create all threadpool threads inside the root appdomain, and
18483 change back to the root domain after calling managed code. This enables
18484 appdomains using threadpools to be unloaded.
18486 2005-07-07 Martin Baulig <martin@ximian.com>
18488 * class-internals.h
18489 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
18490 into `MonoDynamicGenericClass' since we only need it for dynamic
18493 * reflection.c (mono_class_bind_generic_parameters): We don't need
18494 to compute the `parent' here.
18496 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
18498 * culture-info-table.h : regenerated.
18500 2005-07-06 Martin Baulig <martin@ximian.com>
18503 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
18505 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
18507 2005-07-06 Martin Baulig <martin@ximian.com>
18509 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
18510 we're doing a signature-only comparision; fixes #74945.
18512 2005-07-06 Martin Baulig <martin@ximian.com>
18514 * class-internals.h (MonoGenericClass): Moved some things out into
18515 a new `MonoInflatedGenericClass' type.
18516 (MonoInflatedGenericClass): New type; the `klass' of a
18517 `MonoGenericClass' is now computed lazyly in
18518 mono_get_inflated_generic_class().
18520 * class.c (mono_get_inflated_generic_class): New public function.
18521 (mono_class_inflate_generic_method): Removed the unused
18522 `MonoClass *' argument.
18523 (setup_generic_vtable): Don't call mono_get_inflated_method() on
18525 (mono_class_create_generic): Make this static and merge it with
18526 mono_class_create_generic_2(); we're now called automatically from
18527 mono_get_inflated_generic_class().
18529 * loader.c (mono_method_signature): Call
18530 mono_get_inflated_method() here.
18532 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
18534 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
18535 type of fields with RVA.
18537 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
18538 for this pseudo class.
18539 (my_mono_class_from_generic_parameter): Likewise.
18540 (mono_class_init): Allow interfaces to have cctors.
18542 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
18544 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
18545 lazily for AOT methods.
18547 2005-07-05 Martin Baulig <martin@ximian.com>
18549 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
18550 returns FALSE for a successful match, not TRUE.
18552 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
18554 * loader.c (mono_method_get_index): Optimize this a bit.
18556 2005-07-04 Martin Baulig <martin@ximian.com>
18559 (class_compute_field_layout): Move the check for generic type
18560 definitions into mono_class_layout_fields(). Fixes #74684.
18561 (mono_class_from_generic_parameter): Correctly compute
18562 `klass->parent'; fixes #75457.
18564 * reflection.c (register_assembly, register_module): Make sure
18565 `domain->rejobject_hash' is already created.
18567 2005-07-02 Martin Baulig <martin@ximian.com>
18569 * class-internals.h
18570 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
18571 `MonoDynamicGenericClass'.
18573 2005-07-01 Lluis Sanchez <lluis@ximian.com>
18575 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
18576 returned by a field getter is null, since null is a valid value.
18578 2005-07-01 Martin Baulig <martin@ximian.com>
18580 * reflection.c (mono_reflection_generic_class_initialize): Update
18581 the `dgclass->fields [i].parent' to the correct class.
18582 (mono_image_get_fieldref_token): Use the declaring type, not the
18585 2005-07-01 Martin Baulig <martin@ximian.com>
18587 * loader.c (find_method): Also look in the interfaces; fixes #75429.
18589 2005-06-30 Ben Maurer <bmaurer@ximian.com>
18591 * threads.c (thread_cleanup): assert that thread != NULL
18592 (wait_for_tids_or_state_change): We were using the wrong variable
18593 when accessing wait->threads. `i' was always out of the bounds of
18596 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18598 * loader.c: map user32 and kernel32 to libMonoSupportW
18600 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
18602 * appdomain.c (unload_thread_main): Mark this as WINAPI.
18604 2005-06-28 Martin Baulig <martin@ximian.com>
18606 * loader.c (method_from_methodspec): Fix #75334.
18608 2005-06-28 Martin Baulig <martin@ximian.com>
18610 Fix #74953 - Arrays now implement the generic IList<T> interface
18611 on the 2.0 platform.
18613 * class-internals.h (MonoDefaults): Added `generic_array_class'.
18615 * reflection.c (mono_class_bind_generic_parameters): New public
18616 function; similar to mono_reflection_bind_generic_parameters(),
18617 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
18619 * domain.c (mono_init_internal): Try to initialize.
18620 `mono_defaults.generic_array_class' here; this'll only succeed if
18621 we're using the 2.0 corlib.
18624 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
18625 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
18626 (mono_lookup_internal_call): Added support for nested classes.
18629 (mono_get_method_from_token): Set `result->signature->pinvoke' if
18630 we're an interncall and have generic arguments.
18633 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
18634 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
18635 instance of System.Array.InternalArray<T> for arrays, so they
18636 implement the generic IList<T> interface.
18638 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
18640 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
18641 (chastamar@yahoo.com). Fixes #75374.
18643 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
18645 * culture-info-table.h: regenerated.
18647 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18649 * icall.c: handle spaces correctly for base64 strings.
18651 2005-06-26 Ben Maurer <bmaurer@ximian.com>
18653 * *.c: Kill some warnings.
18655 2005-06-23 Duncan Mak <duncan@novell.com>
18657 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
18658 that this builds on Solaris 10 (x86).
18660 2005-06-23 Martin Baulig <martin@ximian.com>
18663 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
18664 generic type definitions.
18666 2005-06-23 Martin Baulig <martin@ximian.com>
18670 * metadata.c (mono_class_get_overrides): Renamed to
18671 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
18672 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
18673 pass it to mono_get_method_full().
18675 2005-06-22 Ben Maurer <bmaurer@ximian.com>
18677 * reflection.c (mono_reflection_create_runtime_class): take the
18678 mono_domain_lock in this method. Prevents deadlocks
18680 2005-06-22 Martin Baulig <martin@ximian.com>
18682 * loader.c (method_from_methodspec): Fix #75330.
18684 2005-06-22 Martin Baulig <martin@ximian.com>
18686 * reflection.c (type_get_qualified_name): Use
18687 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
18688 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
18689 argument; use it if we don't have an assembly name.
18691 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
18693 * object.c: In mono_message_init, set "copy out" flag for in
18694 parameters with the [Out] flag.
18696 2005-06-21 Martin Baulig <martin@ximian.com>
18699 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
18702 2005-06-21 Martin Baulig <martin@ximian.com>
18704 * class.c (mono_class_init): Don't initialize `class->fields' for
18705 generic instances since they're initialized again in
18706 compute_field_layout().
18707 (compute_field_layout): Set the field's `generic_info' here; fix
18710 2005-06-21 Martin Baulig <martin@ximian.com>
18712 * class-internals.h
18713 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
18715 * metadata.c (mono_metadata_generic_method_equal): Also
18716 distinguish the `generic_class'; fixes #75334.
18718 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18722 * domain-internals.h:
18723 * reflection.c: 'domain_assemblies' field is now protected by its own
18724 lock. Don't call into managed code to run the AssemblyLoad event if we
18725 now there are no registered delegates for it.
18727 2005-06-20 Martin Baulig <martin@ximian.com>
18729 * class.c (mono_class_is_assignable_from): Use a custom version of
18730 mono_class_has_parent() to make things work for generic instances;
18733 2005-06-20 Martin Baulig <martin@ximian.com>
18735 * loader.c (method_from_methodspec): Apply a patch from
18736 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
18738 2005-06-20 Martin Baulig <martin@ximian.com>
18740 * class.c (mono_class_init): Reverted Zoltan's last change; it
18743 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
18745 * threads.c (wait_for_tids_or_state_change): Add missing locking.
18747 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18749 * socket-io.c: fix the index in the socket array for writable/error
18750 sockets. Fixes bug #75306.
18752 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
18754 * class.c (mono_class_init): Allow interfaces to have static ctors.
18756 2005-06-17 Martin Baulig <martin@ximian.com>
18758 * loader.c (method_from_methodspec): Use `context->container' when
18759 parsing the `gmethod->inst'.
18761 2005-06-17 Martin Baulig <martin@ximian.com>
18763 * class.c (mono_type_get_name_recurse): Don't add the assembly
18764 name for type arguments.
18766 2005-06-15 Martin Baulig <martin@ximian.com>
18768 * reflection.c (mono_image_get_inflated_method_token): Encode
18769 correct klass; fixes #75260.
18771 2005-06-13 Michal Moskal <malekith@nemerle.org>
18773 * icall.c: Make GetCorrespondingMethod/Constructor take
18774 MonoReflectionMethod method not MonoMethod. Removed
18775 MonoType.GetCorrespondingField, and make
18776 MonoGenericType.GetCorrespondingField take name not
18779 2005-06-13 Michal Moskal <malekith@nemerle.org>
18781 * reflection.c (field_encode_signature, encode_locals):
18782 Make sizes of buffers for types larger (for big generic types).
18783 (create_generic_typespec,
18784 mono_reflection_sighelper_get_signature_local,
18785 mono_reflection_sighelper_get_signature_field):
18786 Add asserts for too small buffers.
18788 2005-06-15 Martin Baulig <martin@ximian.com>
18790 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
18791 if our parent is not a dynamic type.
18793 2005-06-15 Martin Baulig <martin@ximian.com>
18795 * class-internals.h (MonoTypeNameFormat): New enum.
18798 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
18799 (mono_type_get_full_name): Removed.
18800 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
18801 argument instead of the boolean's.
18803 * icall.c (ves_icall_System_MonoType_getFullName):
18804 Added `gboolean assembly_qualified'.
18807 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
18809 * reflection.c (mono_reflection_parse_type): Parse the new type
18812 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18814 * icall.c: no need to convert from utf16 to utf8 and then back again
18815 after the call to GetLogicalDrives.
18817 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18819 * icall.c: frombase64. Fix problems exposed by new tests.
18821 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18823 * icall.c: added internal calls for converting char [] and strings in
18824 base64 into byte [].
18826 2005-06-10 Martin Baulig <martin@ximian.com>
18828 * class.c (mono_class_create_generic_2): Read the nested classes
18829 from the metadata rather than from `gklass->nested_classes' since
18830 `gklass' might not be initialized yet.
18832 2005-06-09 Duncan Mak <duncan@novell.com>
18834 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
18835 all public headers. Fixes #74919.
18837 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
18839 * domain.c: The key for proxy_vtable_hash is now a pointer
18840 array. Added new GHashFunc and GCompareFunc functions for this.
18842 * class.h: The list of interfaces in MonoRemoteClass is known in
18843 advance and can't grow (we create a new MonoRemoteClass if needed),
18844 so now the interface array can be allocated together with
18847 * object.c: Added a new method create_remote_class_key.
18848 Fixed mono_remote_class so it does not depend on
18849 mono_upgrade_remote_class.
18850 Removed extend_interface_array.
18851 Added new method clone_remote_class(), which makes a copy of a remote
18852 class and adds a new interface or class to it.
18853 mono_upgrade_remote_class() now creates a new remote class (or gets
18854 it from the cache) if an vtable upgrade is needed. In this way
18855 we make sure that other objects sharing the same remote class
18856 don't get the new vtable with unwanted interfaces.
18858 * object-internals.h:
18859 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
18861 * marshal.c: Track changes in mono_upgrade_remote_class().
18863 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
18864 * icall.c: Add runtime methods for obtaining members of inflated
18865 class, which were created from supplied non-inflated members. It
18866 is used in internal Get{Method,Constructor,Field} methods in
18869 2005-06-09 Martin Baulig <martin@ximian.com>
18872 (mono_reflection_bind_generic_method_parameters): Fix #75169.
18874 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18875 * reflection.c (mono_image_basic_init): Define
18876 Version in MonoDynamicAssembly.
18878 2005-06-08 Martin Baulig <martin@ximian.com>
18883 (mono_method_signature_full): New public method; takes a
18884 `MonoGenericContext *'.
18885 (find_method): Use mono_method_signature_full() and pass the
18886 klass'es context to it.
18888 * class.c (mono_class_is_inflated_method): Use
18889 mono_method_signature_full() and pass the context to it.
18891 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
18893 * object.c: add proper locking in mono_remote_class_vtable(),
18894 fixes possible memory corruption.
18896 2005-06-08 Michael Meeks <michael.meeks@novell.com>
18898 * marshal.c (mono_remoting_marshal_init): set
18899 initialized after initialization.
18901 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
18903 * locales.c : hush.
18905 2005-06-06 Michael Meeks <michael.meeks@novell.com>
18907 * object.c (extend_interface_array): fix really silly
18908 memory corrupting / comparison bug.
18910 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18912 * reflection.c: Functions added to support the creation
18913 of CustomAttributeData, which includes Attribute data
18914 used by ReflectionOnly methods.
18916 * reflection.h: mono_reflection_get_custom_attrs_data and
18917 mono_custom_attrs_data_construct added (functions exposed).
18919 * icall.c: Added mono_reflection_get_custom_attrs_data
18922 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
18924 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
18927 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
18929 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
18931 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
18932 dynamic DllImportAttribute.
18934 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
18935 dynamic DllImportAttribute.
18937 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
18940 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18942 * threads.c: avoid segfault when an unstarted thread is aborted.
18944 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
18946 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
18947 Returns the name and version of the runtime for reporting.
18949 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18951 * appdomain.c: bump corlib version.
18952 * object-internals.h: new field in MonoReflectionAssembly.
18954 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18956 * object-internals.h: Carlos forgot to add this field.
18958 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
18960 * icall.c: Added create_version to create instances
18961 of Version of MonoReflectionAssemblyName. This change helps
18962 the AssemblyName tests to keep running fine.
18964 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
18966 * object.c (mono_method_return_message_restore): A somehow less
18967 intrusive fix for #75138.
18969 2005-06-03 Raja R Harinath <rharinath@novell.com>
18971 * object.c (mono_method_return_message_restore): Fix computation
18972 of expected number of out args.
18974 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
18976 * reflection.c (mono_image_get_method_info): Fix the case when the
18979 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
18981 * object.c: Added missing null check in
18982 mono_method_return_message_restore.
18984 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
18986 * reflection.c (mono_image_get_method_info): Handle the case when
18989 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
18991 * object.c: When creating the vtable for a proxy, take into account
18992 all inherited interfaces, not only the ones registered in
18993 iclass->interfaces. This fixs bug #74996.
18994 Also, in mono_method_return_message_restore, verify that the array
18995 of out args has the expected lengh.
18997 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18999 * socket-io.c: update the timeout in Poll when the call is interrupte.
19001 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19003 * socket-io.c: support abort/suspend in Select_internal after last
19006 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19008 * threadpool.c: remove warning.
19010 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19013 * socket-io.[ch]: Select_internal uses poll() now when available, thus
19014 removing the 1024 limit from select(). Runtime part of the fix for
19017 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19019 * socket-io.c: when resolving the addresses for the same
19020 host returned by gethostname(), get the local IPs from the interface
19021 list. Loopback addresses are discarded if the are interfaces up with
19022 non-loopback ones. Fixes bug #63265.
19024 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
19026 * appdomain.c, verify.c, object-internals.h, reflection.c:
19027 bumped corlib number to 36, and added new extra_flags field
19028 to ReflectionMethodBuilder and friends. Fixes #75060.
19030 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
19032 * gc.c: register a new weak link only if the object is non-null
19035 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
19037 * culture-info.h : short time pattern too.
19039 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
19041 * culture-info.h : expand long time pattern string length.
19043 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
19045 * culture-info-table.h : update (more French date format; #72788).
19047 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
19049 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
19050 the method is static. Fixes #75029.
19052 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
19054 * reflection.c: Update the table_idx field of method builders after
19055 saving the module, since it can change. This is a workaround for
19058 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
19060 * culture-info-table.h : update (additional French date format).
19062 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
19064 * icall.c (ves_icall_type_Equals): Revert last change.
19066 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
19068 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
19070 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
19072 * class-internals.h: Added executioncontext_class field to
19073 MonoDefaults structure.
19074 * domain.c: Cache System.Threading.ExecutionContext class in
19076 * object.c: Capture the ExecutionContext for asynchroneous calls in
19077 mono_async_result_new.
19078 * object-internals.h: Added execution_context and original_context
19079 fields to MonoAsyncResult. Added execution_context to MonoThread.
19080 * security-manager.c|.h: Added mono_get_context_capture_method to
19081 return the capture method (if required by the security manager or by
19082 the framework version used).
19083 * threadpool.c: Apply capture (if present) ExecutionContext in
19084 mono_async_invoke and revert to original context after it completes.
19086 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
19088 * culture-info-table.h : updated (real hacky solution for zh-CHT).
19090 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
19092 * culture-info-table.h : zh-CHT related workaround.
19094 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
19096 * marshal.c (emit_marshal_custom): Add some error checking and call the
19097 methods in the ICustomMarshaler interface. Fixes #74875.
19099 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
19100 native->managed wrappers.
19102 2005-05-12 Martin Baulig <martin@ximian.com>
19104 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
19105 here and use the loader lock.
19107 * mono-debug.c: Properly lock when the debugger is not attached.
19108 (mono_debug_init): Release the initial lock if we're not running
19111 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
19113 * marshal.c (emit_marshal_custom): Pass through NULL values without
19114 calling the custom marshalling routines.
19116 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
19117 conversion in structures. Fixes #74882.
19119 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
19121 * culture-info-table.h : zh-* cultures were missing.
19123 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
19125 * threads.c: Added a new event background_change_event which is signaled
19126 when a thread changes its background mode.
19127 Moved here several checks previously done in managed code. The checks
19128 require the thread lock, and using the thread lock in managed code
19129 can result in deadlocks.
19130 Merged Start_internal and Thread_internal into a single method. Now
19131 Thread_internal does all work of creating and starting a thread.
19132 Added icalls for setting and getting the state of the object. Moved from
19133 managed code to avoid locking there.
19134 Added wait_for_tids_or_state_change() which is called instad of
19135 wait_for_tids when waiting for non-backround threads to end. This method
19136 will return if one of the threads ends or the background_change_event
19138 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
19139 the background mode. This method signals the background_change_event
19142 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
19143 removed Start_internal.
19145 2005-05-11 Martin Baulig <martin@ximian.com>
19147 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
19148 to order of some fields to get proper alignment on 64-bit machines.
19150 2005-05-11 Martin Baulig <martin@ximian.com>
19152 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
19153 changes as they're broken and completely fuck up the debugger.
19155 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
19157 2005-05-10 Martin Baulig <martin@ximian.com>
19159 * reflection.c (mono_reflection_generic_class_initialize): Don't
19160 call mono_class_setup_parent() here.
19162 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19164 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
19165 send/receive timeout use an integer in milliseconds. We were using a
19168 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19171 (internal_get_cultures): reserve the first slot of the array for the
19172 InvariantCulture, which will be filled in managed code.
19174 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
19176 * reflection.c (mono_image_fill_module_table): Initialize the
19177 GENERATION field as well.
19179 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19181 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
19182 Monitor.Enter on the object.
19184 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
19186 * threads.c: Enable the wait for running threads when exiting.
19187 * icall.c: Suspend all threads before exiting.
19189 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
19191 * assembly.c (mono_assembly_load_reference): Fix warning.
19193 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19195 * threadpool.c: changed the default number of threads per cpu. From now
19196 on, the default will be 20 + (5 * number of cpus) instead of 50.
19198 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
19200 * loader.c (mono_method_get_signature_full): Add locking here.
19202 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
19204 * appdomain.c: Moved methods for parsing and freeing assembly
19205 names to assembly.c.
19206 * assembly.c, domain-internals.h: Created public methods for parsing
19207 assembly names. Fixed mono_assembly_load_with_partial_name:
19208 it now finds the best match, taking into account the version,
19209 token and culture specified in the partial name. Also return
19210 the latest version if no version information is specified.
19212 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
19214 * threadpool.c: replace check for SocketAsyncCall class.
19216 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19218 * threadpool-internals.h:
19219 * Makefile.am: added threadpool-internals.h
19221 * threadpool.c: call mono_unhandled_exception on exceptions not handled
19222 that happen in threadpool threads (tested on MS).
19223 (mono_thread_pool_remove_socket): new function that dispatch any pending
19224 AIO call on a socket that is closing. By now only epoll really needs it,
19225 as select/poll wake up when the socket closes.
19228 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
19230 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
19232 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
19234 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
19236 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
19238 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
19240 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
19241 has an abort request, convert it into a suspend request.
19243 2005-04-30 Ben Maurer <bmaurer@ximian.com>
19245 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
19246 warning for the usage of `UnmanagedFunctionPointerAttribute' which
19247 is not supported yet.
19249 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19251 * image.c: register assemblies loaded from data (bundles) in the loaded
19252 assemblies hash. Fixes bug #74772.
19254 2005-04-29 Martin Baulig <martin@ximian.com>
19256 * class.c (mono_type_get_name_recurse): Update to the new naming
19257 schema from the latest .NET 2.x beta2.
19258 (mono_class_setup_vtable_general): If we're a generic instance,
19259 copy the vtable from our generic type definition and inflate all
19262 * loader.c (find_method): Update to the new naming schema from the
19263 latest .NET 2.x beta2.
19265 2005-04-29 Raja R Harinath <harinath@gmail.com>
19267 * class.c (mono_class_init): Add a mono_loader_unlock to the
19270 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
19272 * icall.c (ves_icall_System_Environment_Exit): Remove the
19273 suspend_all_other_threads () call for the time being, since it can hang.
19275 * threads.c (mono_thread_manage): Similarly, disable the waiting for
19276 the background threads to exit, since it can also hang.
19278 * class.c (mono_class_init): Applied patch from Ankit Jain
19279 (radical@gmail.com). Avoid pending init errors when a field refers
19280 to a nested class using a typeref. Fixes #74734.
19282 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
19283 this for dynamic modules.
19285 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19287 * threads.c: don't wait for threads that are in the process of aborting
19288 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
19289 and waiting for background threads to finish. This makes xsp and
19290 mod-mono-server exit without random length delays and/or hangs.
19292 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19294 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
19296 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
19298 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
19299 dynamic types to prevent infinite loops. Fixes #74727.
19301 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
19302 ..._is_assignable_to.
19304 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
19306 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
19308 2005-04-25 Martin Baulig <martin@ximian.com>
19310 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
19313 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
19315 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
19317 * reflection.c (build_compressed_metadata): Set metadata header
19320 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
19322 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
19323 number into an integral and a decimal part. Fixes #70473.
19325 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
19327 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
19329 * culture-info-table.h : reflected the latest locale-builder output.
19331 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19333 * threadpool.c: check for SuspendRequested too when deciding if
19334 mono_thread_interruption_checkpoint should be called.
19336 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19338 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
19339 * threads.c: remove interruption_mutex and use Interlocked instead. When
19340 suspending all the threads, wait for all the suspended events at once.
19341 If we're shutting down and get an APC that is going to be queued,
19342 call mono_thread_execute_interruption immediately, as the thread might
19343 be sleeping on a pthread condition or mutex.
19345 * icall.c: call mono_runtime_set_shutting_down before suspending the
19348 Fixes bug #74693. And now xsp is happier when exiting.
19350 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
19352 * loader.c (mono_stack_walk): Fix #74690.
19354 2005-04-22 Martin Baulig <martin@ximian.com>
19356 * mono-debug.h (MonoDebugMethodJitInfo): Added
19357 `MonoDebugMethodJitInfo *jit'.
19359 * mono-debug.c (mono_debug_read_method): Cache the
19360 MonoDebugMethodJitInfo in `address->jit'.
19361 (mono_debug_free_method_jit_info): New public method.
19363 2005-04-22 Martin Baulig <martin@ximian.com>
19365 * class.c (mono_class_is_assignable_from): Disallow
19366 type parameter -> interface.
19368 2005-04-21 Dick Porter <dick@ximian.com>
19370 * threads.c (mono_thread_create): Turn an assertion into an error.
19372 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
19374 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
19376 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
19377 Fix some gcc 4.0 warnings.
19379 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
19381 * file-io.c: fix alt dir separator char on unix systems
19382 and cleanup (fixes bug #71214).
19384 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
19386 * marshal.c: Use CALLVIRT instead of CALL when dispatching
19387 a call to a remote domain, since the method may be an
19388 interface method in the client domain. This fixes bug #74192.
19390 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19392 * threadpool.c: recv/send are now performed before going back to managed
19393 code to save one transition.
19395 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19397 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
19399 * metadata/threadpool.c: removed hack to workaround the bug above.
19403 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
19405 * reflection.c reflection.h: Fix handling of parameter defaults in
19406 dynamic methods. Also fixes handling of parameter attributes.
19409 * mono-debug.c (mono_debug_close_image): Fix warning.
19411 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19413 * socket-io.h: replaced old unused field with new 'blocking'.
19414 * threadpool.c: restore socket blocking state on windows(tm).
19416 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
19418 * icall.c: don't return the codebase in the AssemblyName[] returned by
19419 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
19420 * object-internals.h: Removed FIXME (fields were presents) and fixed
19421 versioncompat declaration.
19423 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19425 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
19426 not closed, so don't cleanup when it happens.
19428 2005-04-13 Chris Toshok <toshok@ximian.com>
19430 * mono-debug-debugger.h: change prototype for
19431 mono_debugger_lookup_type.
19433 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
19434 this function, although it should probably be named
19435 mono_debugger_init_type.
19437 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19439 * threadpool.c: fix non-AIO case.
19441 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
19443 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
19444 the built-in profiler to measure just JIT compilation times.
19446 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19448 * threadpool.c: the epollfd might be closed by another thread at
19449 any time, so ignore EBADF at treat it as a "we're closing" sign.
19451 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19453 * threadpool.c: release the semaphores with a count equals to the number
19454 of working threads in both IO and regular pools. Fixed typo that messed
19455 up the count of IO pool threads. Don't initialize the pipe handles if
19458 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19460 * threadpool.c: some systems don't like a NULL when deleting the socket
19463 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19465 * threadpool.c: fix semaphore allocation.
19467 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19469 * threadpool.c: added epoll() based implementation for asynchronous IO
19470 that is used instead of the default poll() when available.
19471 It can be disabled by setting MONO_DISABLE_AIO.
19473 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19475 * threadpool.c: windows needs 'closesocket' and instead of returning
19476 0 when the stream is closed while in select, it returns -1. Fixes bug
19479 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
19481 * class.c (class_compute_field_layout): Fix the regression caused by
19484 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19486 * threadpool.c: separate pool for socket async. IO.
19487 * threadpool.h: mono_max_worker_threads is not a global any more.
19489 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
19491 * class.c (class_compute_field_layout): Fix #74549.
19493 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19495 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
19496 use 2 connected sockets instead.
19498 2005-04-08 Miguel de Icaza <miguel@novell.com>
19500 * mono-config.c: Add new entry point for mkbundle
19501 mono_config_parse_memory.
19503 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19505 * threadpool.c: removed another unused function.
19507 2005-04-08 Ankit Jain <radical@corewars.org>
19509 * reflection.c (get_default_param_value_blobs): Add 'types'
19510 parameter to get the types encoded in the constant table.
19511 (mono_param_get_objects): Use the type from the constant table,
19512 not the type of the parameter, when creating default values.
19513 Handle null default values correctly.
19515 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19522 * socket-io.c: removed dead code for async IO.
19524 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19526 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
19528 * threadpool.c: intercept socket async. calls and pass them to a thread
19529 that is polling and dispatching the job items to the threadpool as
19530 socket become ready. Fixes bugs #71217, #71933.
19532 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
19533 between char and short/ushort arrays.
19535 * socket-io.c: remove dead code.
19537 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
19540 icall.c : removed InternalToUpper_Comp() and
19541 InternalToLower_Comp().
19543 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
19545 * char-conversions.h : The tables were incorrectly generated. Should
19546 be generated against invariant culture.
19548 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
19550 * object.c (mono_runtime_invoke_array): Fix return value when
19551 passing pre-created valuetype objects to ctors.
19553 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
19554 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
19557 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
19559 * domain.c: removed g_assert for runtimesecurityframe_class. This is
19560 only used with --security and hides the wrong corlib version error.
19562 2005-03-30 Joshua Tauberer <tauberer@for.net>
19564 * class.c: Changed mono_class_name_from_token so that types
19565 outside of a namespace don't have an initial period. Improved
19566 the g_warning message used in _mono_class_get when loading
19568 * assembly.c: In mono_assembly_load_reference, when an assembly
19569 can't be found, "No such file or directory" is misleading and
19570 unhelpful because a few paths were checked for the presence of
19571 the assembly. When that happens (ENOENT), display a nicer
19572 message indicating the directories that were searched. In all
19573 cases, the warning is made easier to read for non-hackers.
19575 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
19577 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
19579 * appdomain.h|domain.c: Removed inline from functions.
19580 * appdomain.c: Reduced warnings when compiling on windows.
19581 * icall.c: Fixed output_debug declaration to gunichar2*.
19582 * mono-config.c: Reduced warnings when compiling on windows.
19583 * rand.c: Added missing "windows.h". Added missing return value.
19584 * rawbuffer.c: Added missing winsock2.h for windows.
19585 * sysmath.h: Added mono-compiler.h header to allow/ease
19586 compilation with non-GCC compilers.
19587 * threads.c: Fixed declarations to compile with VS.NET C compiler.
19588 Removed cast warnings.
19590 Adapted from the work of J Lothian (for VC6).
19592 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
19594 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
19597 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
19599 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
19602 2005-03-27 Raja R Harinath <harinath@gmail.com>
19604 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
19605 has to be in $(exec_prefix). $(prefix) is for arch-independent
19606 stuff, and it would probably use $(prefix)/share rather than
19609 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19611 * console-io.c: added 2 includes that might be missing.
19613 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
19615 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
19618 * reflection.c (create_custom_attr): Allocate the params array using
19619 alloca so it gets GC tracking.
19621 2005-03-23 Chris Toshok <toshok@ximian.com>
19623 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
19626 2005-03-24 Raja R Harinath <rharinath@novell.com>
19628 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
19629 changes to pick up any changes in prefix, etc.
19631 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19633 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
19635 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
19636 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
19638 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
19640 * class-internals.h object-internals.h class.c reflection.c: Extend the
19641 mono_lookup_dynamic_token () function to return the class of the
19644 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
19645 well. Fixes #73848.
19647 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
19649 * security-manager.c: Skip inheritance checks for intra-corlib
19650 class inheritance and method overrides. This skips a lot of checks
19651 and (anyway) permissions cannot work until corlib is loaded.
19653 2005-03-23 Martin Baulig <martin@ximian.com>
19655 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
19656 MONO_TYPE_GENERICINST.
19658 2005-03-23 Martin Baulig <martin@ximian.com>
19660 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
19662 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19664 * class.c: added locking comments to some functions.
19665 Cache the interface offsets arrays (saves about 20 KB
19666 of runtime memory in a typical app).
19667 Reduce the time overhead in mono_class_setup_supertypes ().
19669 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
19671 * icall.c: speedup and fix leaks in GetMethodsByName and
19672 GetPropertiesByName.
19674 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19676 * reflection.c: some locking fixes.
19678 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19680 * metadata.c: added missing break in case statement.
19682 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
19684 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19685 typedbyref return values. Fixes #73941.
19687 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
19689 * security-manager.c|h: Added demandunmanaged method and
19690 suppressunmanagedcodesecurity class to MonoSecurityManager.
19691 Renamed aptc class to allowpartiallytrustedcallers.
19693 2005-03-17 Martin Baulig <martin@ximian.com>
19695 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
19697 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19699 * file-io.c: disabled file async. IO using aio_*. It uses the
19700 threadpool now. Workaround for bug #73718.
19702 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19704 * assembly.h, mono-config.c: added code to deal with bundled configs
19705 for bundled assemblies.
19707 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
19709 * *.c, private.h: cleanup, removing old private.h header file.
19711 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
19713 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
19714 and throw_on_unmappable_char attributes.
19716 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
19718 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
19719 _ProcessName_internal.
19721 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
19723 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
19726 * icall.c threads.c threads-types.h: Remove slothash icalls as they
19727 are no longer used.
19729 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
19731 * object.c (compute_class_bitmap): Add support for generics. Fixes
19734 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
19736 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
19738 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19740 * filewatcher.c: commented out the code for windows watcher, as we don't
19741 use it (we use the managed implementation instead).
19743 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
19745 * object-internals.h (MonoThread): Remove 'unused1' field.
19747 * appdomain.c: Bump corlib version.
19749 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
19751 * reflection.c (mono_reflection_create_runtime_class): Remove the
19752 AssemblyBuilder.Save optimization since it causes too many problems.
19754 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
19756 * exception.c|h: Added mono_get_exception_reflection_type_load to
19757 create a ReflectionTypeLoadException object.
19758 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
19759 to return NULL is a InheritanceDemand fails during reflection. Updated
19760 ves_icall_System_Reflection_Assembly_GetTypes to throw a
19761 ReflectionTypeLoadException if an InheritanceDemand fails during
19762 reflection. Added icall mapping for GetLinkDemandSecurity.
19763 * security-manager.c|h: Added ves_icall_System_Security_
19764 SecurityManager_GetLinkDemandSecurity internal call to return the
19765 class and methods permissions set for a LinkDemand. Removed unused
19766 fields in MonoSecurityManager.
19768 2005-03-10 Martin Baulig <martin@ximian.com>
19770 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
19771 it's a generic instance.
19773 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
19775 * reflection.c (mono_get_object_from_blob): Applied patch from
19776 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
19778 * class.c (mono_class_is_assignable_from): Another try at fixing
19779 #73469 without breaking anything.
19781 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
19783 * class.c: (mono_class_is_assignable_from): Revert the last changes
19784 since they don't work with generics.
19786 * class.c (mono_class_is_assignable_from): Fix build bustage.
19788 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
19789 the managed IsAssignableFrom method. Fixes #73469.
19791 * reflection.c (mono_reflection_call_is_assignable_from): New helper
19794 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
19796 * object.c (mono_load_remote_field_new): Fix returning uninitialized
19797 memory when the remoting callback does not sets the out arguments.
19800 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
19803 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
19805 * object-internals.h (MonoStackFrame): Sync with managed object layout.
19807 * appdomain.c: Bump corlib version.
19809 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
19811 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
19814 * threads.c (mono_thread_attach): Detect threads which are not started
19815 by the GC pthread wrappers.
19817 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
19819 * icall.c: Added new icall for RNG.
19820 * rand.c|h: Added new icall to open the RNG. This allows to share a
19821 single handle on Linux to access /dev/urandom and fix #73183.
19823 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19825 * object.c: setting the new vtable in a transparent proxy object must
19826 not change the GC descriptor.
19828 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19830 * object.c: fixed compilation without GCJ support.
19831 * reflection.c: for runtime-created types ensure klass->has_references
19832 is correct (bug #73215).
19834 2005-03-02 Martin Baulig <martin@ximian.com>
19836 * class.c (mono_class_is_assignable_from): Make this work if
19837 `oklass' is a generic instance; fixes #72831.
19839 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
19841 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
19844 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
19846 * marshal.c: Reorganize native->managed marshalling code to also use
19847 the emit_marshal_... functions.
19849 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19851 * object.c: typed allocs have issues with bitmap sizes > 30,
19852 so check for max_set >= 30.
19854 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
19856 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
19857 managed code. Fixes #73012.
19859 * metadata.h (MonoMarshalSpec): Add elem_mult field.
19861 * metadata.c reflection.c: Load/Emit elem_mult as well.
19863 * metadata.h (MonoMarshalSpec): Add comment.
19865 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
19867 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
19868 num_elem to -1 if not given.
19870 * object-internals.h (MonoReflectionMarshal): Add has_size field.
19872 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
19875 2005-03-01 Marek Safar <marek.safar@seznam.cz>
19877 * null-gc.c (mono_gc_free_fixed): Was not compilable.
19879 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
19881 * reflection.c (encode_marshal_blob): Encode param_num field as well.
19883 * object-internals.h (MonoReflectionMarshal): Add param_num field.
19885 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19887 * object.c: generalized the reference bitmap creation
19888 and added hooks for the new GC.
19889 * class-internals.c: removed the gc_bitmap field from MonoClass.
19891 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19893 * domain.c: help the compiler to produce better code
19894 in mono_jit_info_table_find ().
19896 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19898 * object.c: make all allocations look typed.
19900 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19902 * socket-io.c: load Mono.Posix if it's not loaded already
19905 2005-02-24 Martin Baulig <martin@ximian.com>
19907 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
19908 * reflection.c (dup_type): Likewise.
19910 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
19912 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
19913 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
19915 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19917 * domain.c, threads.c, object-internals.h: make the critical thread
19918 local vars use the fast access mode (even when we're compiled in
19919 a lib). Provide accessors to be used by the jit during codegen.
19921 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19923 * appdomain.c: Changed hook functios behavior to include
19924 support for the reflection only assemblies. Some icalls were changed
19925 to support the mentioned assemblies too. Signatures of static methods
19926 try_assembly_resolve and real_load now have an additional parameter:
19929 * assembly.c: General changes to mono_assembly_ methods to support
19930 reflection only api. Functions mono_assembly_open, mono_assembly_load,
19931 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
19932 suffix, to support an additional gbool parameter to specify whether
19933 the assembli is reflection only or not. Created some new hook functions
19934 to add support for reflection only assemblies. Signatures of static
19935 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
19936 have now an additional parameter: refonly.
19938 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
19939 indicating whether the assembly is reflection only or not.
19941 * exception.c: Add mono_get_exception_invalid_operation.
19943 * icall.c: Throw an InvalidOperationException when trying to invoke
19944 a property/method/event, or trying to set/get the value of a field.
19945 Also add an icall to retrieve the ref_only flag to the
19946 MonoReflectionAssembly.
19948 2005-02-23 Chris Toshok <toshok@ximian.com>
19950 Part of fix for #72827.
19951 * mono-debug.c (mono_debug_add_method): add lexical block data to
19952 the info we write. Kind of a hack at the moment - we copy the
19953 lexical block info from the MonoDebugMethodInfo to the
19954 MonoDebugMethodJitInfo here, before writing it.
19955 (mono_debug_read_method): read the lexical block info.
19957 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
19959 * debug-mono-symfile.h: add lexical block support.
19961 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
19964 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
19966 * loader.c (mono_lookup_pinvoke_call): Fix warning.
19968 * object.c (mono_runtime_free_method): Call mono_free_method () and
19969 put the TODOs there.
19971 * loader.c (mono_free_method): Free up most memory allocated for
19974 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19976 * reflection.c: properly flag a Type argument to a
19977 named custom attr value (bug #72248).
19979 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19981 * reflection.c: reduce code duplication in named custom
19982 attribute encoding.
19984 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
19986 * reflection.c: properly encode custom attrs of type object
19989 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
19991 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
19993 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
19995 * socket-io.c: load System.dll if it's not loaded already
19996 (bug #72850 and #70477).
19998 2005-02-21 Martin Baulig <martin@ximian.com>
20000 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
20003 2005-02-21 Martin Baulig <martin@ximian.com>
20005 * reflection.c (mono_image_build_metadata): We also need to
20006 "fixup" the MethodImpl table after we computed the final method
20007 indices. Call fixup_methodimpl() to do that.
20008 (fixup_methodimpl): New private method.
20010 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
20012 * assembly.c: special case mscorlib.dll (bug#72536),
20013 patch from Carlos Alberto Cortez.
20015 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
20017 * threads-types.h threads.c: Fix build bustage.
20019 * threads.c: Use a union for long<->double conversions.
20021 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
20022 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
20024 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
20025 containing the checkpoint call with NOT_TAKEN.
20027 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
20028 checkpoint before pushing the arguments, so they won't have to be
20031 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20033 * domain.c, assembly.c, domain-internals.h: make some data
20034 const and relocation-free.
20036 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
20038 * object.c, appdomain.c, class-internals.h: introduce the
20039 MonoClassRuntimeInfo structure to hold the info needed to
20040 use a class at runtime. Made mono_class_vtable() lock-free
20041 for all the appdomains.
20043 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
20045 * metadata-internals.h, image.c: introduce a per-image mempool to
20046 be used for memory that has the same lifetime as the image.
20048 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
20050 * domain.c: In mono_init_internal(), instead of selecting the first
20051 runtime version supported by an executable, get a list of all
20052 supported versions and select the one for which an mscorlib exists
20053 (since even if the runtime supports a given version, it doesn't mean
20054 that the framework for that version is installed).
20055 Modified get_runtimes_from_exe to support this behavior.
20056 In supported_runtimes, added information about additional system
20059 * assembly.c: Added support for more than one system assembly version
20060 per runtime version. Updated the assembly list.
20061 In mono_assembly_remap_version, removed the initial version check,
20062 since we don't know to which version we need to compare until we
20063 get the version set on which the assembly is based.
20064 Moved the code for loading corlib into the new method
20065 mono_assembly_load_corlib(), so it can be used by the initialization
20068 * domain-internals.h: Updated data structures and added declaration
20069 for mono_assembly_load_corlib.
20071 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
20073 * reflection.c (resolve_object): Fix the creation of the signature in
20074 the SignatureHelper case.
20076 * assembly.c (mono_assembly_remap_version): Fix binary search.
20078 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
20080 * class.c: Added inheritance check when a method is overloaded (from a
20081 virtual method or when implementing an interface) and when a class is
20082 inherited. Added functions to set a failure for a class and to
20083 retreive the exception from a failure.
20084 * class-internals.h: Added fields to MonoClass to keep the exception
20085 information status for inheritance (or other exceptions) to be thrown
20086 later (i.e. not at load time).
20087 * object.c: Throw the inheritance SecurityException when a type is to
20088 be created with either class or method inheritance violations.
20089 * reflection.c|h: Fix when getting declsec from a class. Removed
20090 unrequired code for class. Improved sanity in parameter naming.
20091 * security-manager.c|h: Added functions to check for class and method
20094 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
20096 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
20097 and has_finalize in dynamic types as well.
20099 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
20101 * culture-info-table.h : fixed currency format for en-GB (and so on).
20103 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
20105 * gc.c: ensure the GC handles never have 0 as a value.
20107 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
20109 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
20110 a pointer to a struct to unmanaged code. Fixes #72625.
20112 2005-02-16 Martin Baulig <martin@ximian.com>
20114 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
20116 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
20118 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
20120 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
20122 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
20124 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
20125 UnmanagedFunctionPointerAttribute, use it for determining calling convention
20128 * reflection.c (mono_custom_attrs_get_attr): New helper function.
20130 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
20132 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
20134 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
20135 changes to make the current context a field in MonoThread.
20137 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
20139 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
20142 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
20143 extracted from mono_marshal_get_native_wrapper.
20145 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
20146 to create wrappers around native functions.
20148 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
20149 delegates for arbitrary function pointers. Fixes #71472.
20151 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20153 * threads.c: cleaned up the code a little.
20155 2005-02-15 Martin Baulig <martin@ximian.com>
20157 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
20160 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
20161 allocate larger chunks if needed.
20163 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
20165 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
20168 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
20170 * domain.c: keep the domains in an array and ensure the domain ids
20171 are kept small, so they can be used as indexes to domain-specific data
20172 with a small memory overhead.
20174 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
20176 * icall.c: Handle byref types in Type icalls. Fixes #72544.
20178 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
20180 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
20182 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
20184 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
20186 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
20189 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
20191 2005-02-12 Ben Maurer <bmaurer@ximian.com>
20193 * domain-internals.h: add the hashtable here.
20195 * class-internals.h: Remove `info' from MonoMethod
20197 * domain.c: Add a new hashtable, jit_trampoline_hash
20199 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20201 * object.c: don't set the value of static fields
20204 2005-02-11 Martin Baulig <martin@ximian.com>
20206 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
20207 (mono_debug_add_method): Silently ignore the method if it's too big.
20208 (mono_debug_add_type): Likewise.
20210 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
20212 * threads.c, appdomain.c: remove #ifdefs from the code.
20214 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
20216 * metadata-internals.h: Added flags to MonoAssembly to cache the most
20217 common security informations. This allows us to stay in unmanaged code
20218 when doing LinkDemand and it's special cases (except for the first
20219 time for initialization). The flags a very much used with --security.
20220 * reflection.c|h: Added code to get declarative security attributes
20221 for LinkDemand and InheritanceDemand. This required to refactor the
20222 existing code for Demand.
20223 * security-manager.c|h: Added new method fields for the special cases
20226 2005-02-10 Martin Baulig <martin@ximian.com>
20228 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
20229 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
20231 2005-02-10 Martin Baulig <martin@ximian.com>
20233 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
20234 debugging code; this is almost a complete rewrite.
20236 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
20238 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20240 * domain.c, object.h: expose mono_string_equal () and
20241 mono_string_hash ().
20242 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
20243 it's implemented in managed code.
20245 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20247 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
20248 lo leak objects between appdomains.
20250 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20252 * assembly.c: old compilers compilation fix from
20253 robertj@gmx.net (Robert Jordan).
20255 2005-02-09 Ben Maurer <bmaurer@ximian.com>
20257 * class-internals.h: Little reminder for the future.
20259 * debug-helpers.c: Fix up wrapper_type_names
20261 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20263 * image.c, metadata-internals.h: when loading an image from a file,
20264 mmap all of it and use the same codepaths as when using a
20265 in-memory image: the code is simpler and we use less memory
20266 (both writable and readonly).
20268 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
20270 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
20271 API to alloc runtime data structures that need to be tracked by the
20272 GC and contain pointers.
20273 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
20274 make the code more readable and eventually use a different GC.
20276 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
20278 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
20281 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
20283 * object.c: In release_type_locks(), don't release the cctor lock
20284 if it has already been released. This fixes a crash in the
20287 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20289 * gc.c, marshal.c, icall.c: register a delegate for finalization
20290 only when the native function pointer has been allocated for it.
20292 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20294 * object.c: cleaned up some code, allocate objects that are
20295 pointer free with the atomic malloc variant. Allocate memory
20296 for static data from the mempool if it's pointer-free.
20297 Allocate the bounds array at the end of the array data, when needed.
20298 * object-internals.h, object.h: move a private function in a private
20300 * class.c: handle missing case in tracking references in fields.
20302 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
20304 * class.c, class-internals.h: keep track if a type has
20305 reference fields in either the instance or static fields.
20307 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
20309 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
20310 and renamed to MonoRuntimeInfo. Added fields to store the expected
20311 framework assembly version. Changed mono_get_framework_version and
20312 mono_get_runtime_version for a single mono_get_runtime_info method.
20314 * assembly.c: Added method to remap system assembly versions to the
20315 current executing runtime version. Removed old mapping code.
20316 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
20318 * icall.c, reflection.c: Track api changes.
20320 2005-02-06 Miguel de Icaza <miguel@novell.com>
20322 * loader.c (method_from_memberref): Improve error reporting,
20323 produce the class name instead of the typeref/typedef index.
20325 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
20327 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
20329 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20331 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
20332 stdcall and charset name mangling. Reorganize the code and add
20333 some tracing stuff.
20335 2005-02-05 Ben Maurer <bmaurer@ximian.com>
20337 * monodiet.c: More iters!
20339 * marshal.c: Iter usage.
20341 * icall.c: Iter usage.
20343 * object.c: Use iters.
20345 * debug-helpers.c: More iters
20347 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20349 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
20352 2005-02-05 Ben Maurer <bmaurer@ximian.com>
20354 * mono-debug-debugger.c: use iters
20356 * class.c, class-internals.h: mono_class_setup_events is static
20359 * All callers: use iters
20361 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
20363 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
20364 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
20366 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
20368 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
20370 * marshal.h: Add prototypes for ldfld/stfld_remote.
20372 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
20373 this is called during startup.
20375 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
20377 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
20378 MonoThreadsSync struct private in monitor.c. Changed the way
20379 MonoThreadsSync is allocated so it's faster and there is no
20380 need to keep track of it with a finalizer and it uses less memory.
20381 This also finally allows us to allocate mono objects as ptrfree when
20382 there are no reference fields.
20384 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
20386 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
20387 disappearing link to the GC interface and use them to simplify
20388 the gchandles code.
20390 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
20392 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
20393 stfld_remote which call mono_load/store_field_new. This allows methods
20394 calling ldfld/stfld wrappers to be AOTed.
20396 * console-io.c: Include sys/filio.h under solaris.
20398 * console-io.c: Include curses.h if needed correctly.
20400 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
20402 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
20403 method->klass as well.
20405 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
20407 * class.c (mono_class_init): Switch on lazy initialization of
20410 * class.c (mono_class_get_finalizer): Handle the case when the
20411 finalizer is inherited.
20413 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20415 * console-io.c: <curses.h> is needed by term.h on solaris.
20417 2005-02-03 Ben Maurer <bmaurer@ximian.com>
20419 * icall.c, class-internals.h, monodiet.c, class.c: Remove
20420 mono_class_setup_properties where possible. Remove this ftn from
20421 the header file, and make it static.
20423 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
20425 * loader.c: Add missing setup_... call.
20427 * class.c: Add missing setup_... calls.
20429 * class.c (mono_class_init): Switch on lazy initialization of
20430 the generic vtable.
20432 * class.c (mono_class_init): Fix generics broken by the recent changes.
20434 * monodiet.c (handle_type): Add missing setup_... calls.
20436 * class.c: Back out garbage in previous patch.
20438 * class.c: Add missing setup_... calls.
20440 * class.c (mono_class_get_method_from_name_flags): Avoid calling
20441 mono_class_setup_methods () if possible.
20443 * class-internals.h (MonoClass): Add 'has_cctor' flag.
20445 * class-internals.h (MonoCachedClassInfo): New structure.
20447 * class.c: Initialize properties and events fields of MonoClass lazily.
20449 * class.c: Add infrastructure for lazily initializing the methods and
20450 vtable fields of MonoClass. Not yet used.
20452 * class.c (mono_class_get_finalizer): New helper function.
20454 * class.c: Add infrastructure for loading some class related data from
20457 * object.c: Add infrastructure for initializing the vtable from data
20460 * gc.c (run_finalize): Use mono_class_get_finalizer ().
20462 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
20463 appropriate initialization function before accessing parts of the
20464 MonoClass structure.
20466 * marshal.c: Fix warnings.
20468 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
20470 * mono-debug-debugger.c (get_exception_message): Use
20471 mono_class_get_method_from_name_flags ().
20473 2005-02-02 Ben Maurer <bmaurer@ximian.com>
20475 * reflection.c, appdomain.c: Replace a few manual searches that
20476 Zoltan missed. (Paolo approved this part of my initial patch).
20478 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
20480 * profiler.c: disable recording statistical events at report time.
20482 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20484 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
20485 to byteswap arrays of enum values, too (bug #72080).
20487 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
20489 * appdomain.c (set_domain_search_path): Allow this to be called if
20490 domain->setup is not yet set.
20492 * loader.c (mono_method_get_index): New helper function.
20494 * loader.c reflection.c: Use mono_method_get_index ().
20496 * class.c (mono_class_get_method_from_name_flags): New helper method.
20498 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
20501 * class.c (mono_class_get_cctor): New helper method.
20503 * string-icalls.c object.c class.c marshal.c reflection.c: Use
20504 mono_class_get_method () to look up methods.
20506 2005-02-01 Miguel de Icaza <miguel@novell.com>
20508 * console-io.c: Fix the build, this should work on Windows.
20510 2005-01-31 Ben Maurer <bmaurer@ximian.com>
20512 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
20513 be set to null to keep things valid
20515 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20517 * icall.c: added Console 2.0 icalls.
20518 * Makefile.am: added console-io.[ch]
20519 * console-io.[ch]: internal calls for Console 2.0 API.
20521 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20523 * class.c: make sure we consider all the interfaces
20524 when calculating max_interface_id (bug found by
20525 Jeroen Frijters running ikvm).
20527 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
20529 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
20530 valuetype fields to null.
20532 * object.c (set_value): Ditto. Fixes #71669.
20534 2005-01-31 Martin Baulig <martin@ximian.com>
20536 * metadata.c (mono_metadata_has_generic_params): New public
20537 function; checks whether something is a generic method.
20539 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20541 * appdomain.c: fix infinite recursion when adding assemblies.
20543 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
20545 * object.c: Fix small typo to return all items for Environment.
20546 GetCommandLineArgs.
20548 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20550 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
20551 reflection.c: more domain and assembly-unload related fixes
20552 and memory leaks plugs.
20554 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
20556 * 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.
20558 2005-01-29 Ben Maurer <bmaurer@ximian.com>
20560 * loader.c (mono_method_signature): Make this method lazy
20561 (mono_get_method_from_token): Don't computate the signature here.
20563 Doing this saves quite a bit of memory. I got 90 kb on starting up
20564 monodoc. It should also save some disk reads on startup.
20566 * *: MonoMethod->signature might be NULL now. You *MUST* use
20567 mono_method_signature.
20569 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
20571 * object.c (mono_runtime_get_main_args): Return an array from the
20572 current domain here. Fixes #71938.
20574 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20576 * monitor.c: formatting changes to comply with the
20577 mono coding style and remove #ifdefs from the code.
20579 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20581 * metadata.c, private.h: remove some unneeded data
20582 and use a more compact representation for table schemas.
20584 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20586 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
20587 to get a better distribution in hash tables.
20588 * *.c: use mono_aligned_addr_hash() where appropriate.
20589 * assembly.c: make var static.
20591 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
20593 * domain-internals.h: Put MonoJitInfo on a diet.
20595 * domain.c: Fix a warning.
20597 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20599 * gc.c: rework the gc handles code to reuse handles
20602 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20604 * domain.c: fixed long standing bug in mono_string_equal() which
20605 was brought to light with the ldstr changes.
20607 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
20609 * reflection.c: Remove warning by adding missing include for marshal.h
20611 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20613 * domain.c, object.c: change the ldstr_table to hold
20614 MonoString* as keys: makes the runtime isinterned lookup
20615 faster and simplifies memory management.
20617 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
20619 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
20620 possible to add imperative security checks before calling the icall.
20621 * reflection.c: Return security attributes on the original MonoMethod
20622 (and not the wrapped one). This fix permissions on icalls.
20624 2005-01-25 Dick Porter <dick@ximian.com>
20626 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
20627 the check for mktime() support actually test the mktime() return
20628 value. "Fixes" bug 71682, though the output is still different to
20631 2005-01-25 Martin Baulig <martin@ximian.com>
20633 * class.c (mono_class_is_assignable_from): Make this work for
20636 2005-01-24 Ben Maurer <bmaurer@ximian.com>
20638 * marshal.c (mono_string_utf8_to_builder)
20639 (mono_string_builder_to_utf16): We might not have ownership of the
20640 string. In thise case, we need to create a new buffer.
20642 * object-internals.h (mono_stringbuilder_capacity): sb->str might
20643 be null, in which case, use the default capacity.
20645 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20647 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
20648 GC events to the profiler.
20650 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20652 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
20653 if you don't want the GC to run.
20655 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
20657 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
20658 start providing a GC API and keeping different implementations in
20660 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
20662 2005-01-22 Ben Maurer <bmaurer@ximian.com>
20664 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
20665 mmap rather than allocating a huge buffer.
20666 (mono_debug_close_mono_symbol_file): Free the buffer allocated
20669 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
20671 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
20672 and CheckExecutionRights.
20673 * reflection.c|h: Keep the index of the declarative security to be
20674 used, instead of the pointer, when AOT compiler is used. Also add
20675 class initialization when requesting demands.
20676 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
20677 CheckExecutionRights. Both properties are now FALSE by default, and
20678 unmodifiable, unless the --security option is used.
20680 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20682 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
20683 reflection.c: properly refcount images and assemblies, many leaks fixed.
20685 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20687 * threadpool.c: increase the timeout for threads in the thread pool to
20688 10s. Fixes bug #67159.
20690 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
20692 * class-internals.h: Sun's compiler insists on explicit
20693 signed on bit fields to handle then correctly.
20695 2005-01-19 Miguel de Icaza <miguel@ximian.com>
20697 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
20698 Make the size of the array fit only the number of invalid path
20699 chars that we have.
20701 * class.c (_mono_class_get): Improve the error reporting when a
20702 class referenced is not found, to assist debugging.
20704 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
20706 * threads.c: fix off-by-one error.
20707 * domain.c: free data allocated in the domain.
20709 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20711 * reflection.c (mono_method_body_get_object): Fill out exception info
20714 * object-internals.h: Add MonoReflectionExceptionHandlingClause
20717 2005-01-19 Martin Baulig <martin@ximian.com>
20719 * loader.c (mono_get_method_constrained): Make this work again.
20721 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
20723 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
20724 guint16 to match the managed side.
20726 * reflection.c (mono_reflection_body_get_object): Fill out local
20729 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
20732 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
20733 'local_var_sig_token'.
20735 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
20737 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
20740 * reflection.c (mono_method_body_get_object): Handle abstract and
20743 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
20745 * marshal.c, loader.c, class-internals.h, reflection.c:
20746 store the emthod data for a wrapper in an array instead of a list.
20748 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
20750 * marshal.c: change the code to allocate memory more
20751 conservatively for method wrappers.
20753 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
20755 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
20756 fields from MonoClass to the marshal info structure where they belong.
20758 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20760 * class.c, object.c, class-internals.h, marshal.c: rearrange
20761 some fields and tweak some types to lower memory usage.
20763 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
20765 * threads.c (signal_thread_state_change): Handle the case when the
20766 target thread is the current thread.
20768 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
20770 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
20771 emit_ptr_to_object_conv.
20773 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
20774 marshalling. Fixes #71352.
20776 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20778 * metadata.h, blob.h: move table enum to blob.h so it can be included
20780 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
20781 cut the size of MonoImage/MonoDynamicImage.
20783 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
20785 * profiler.c (mono_profiler_install_simple): Fix default arguments.
20787 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
20789 * reflection.c, reflection.h, icall.c: add a function to check
20790 if an attribute type is defined for a metadata object.
20792 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
20794 * object-internals.h: Added some needed fields from StringBuilder class.
20795 * marshal.c: Set the maxCapacity when creating a StringBuilder.
20797 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
20799 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
20800 threads before shutting down the runtime.
20802 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
20804 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20806 * object-internal.h, threads.c: implement stacksize and
20807 parameterized thread start functionality (requires
20808 matching corlib). Marked broken code for later removal.
20810 2005-01-12 Martin Baulig <martin@ximian.com>
20812 * class-internals.h (MonoGenericClass): Moved the `initialized'
20813 flag to MonoDynamicGenericClass, removed `init_pending'.
20814 (MonoGenericInst): Added `is_reference' flag.
20816 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
20818 * reflection.c (mono_image_create_pefile): Only set the pe_offset
20819 inside the MSDOS header. Fixes #71201.
20821 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
20823 (mono_domain_finalize): Ditto.
20825 2005-01-12 Martin Baulig <martin@ximian.com>
20827 * class.c (mono_get_shared_generic_class): Use the cache for
20828 non-dynamic generic classes.
20830 * class-internals.h (mono_class_create_generic_2): Removed
20831 function prototype, this function is now static inside class.c.
20833 * class.c (mono_class_create_generic_2): Made this static, only
20834 call it from mono_class_init() and mono_class_setup_parent().
20835 (collect_implemented_interfaces_aux): Call mono_class_init() on
20836 the interfaces we collect.
20837 (mono_class_setup_vtable): Call mono_class_init (class->parent).
20839 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
20841 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
20842 it a real thread handle.
20844 * domain-internals.h: Move exvar_offset from MonoJitInfo to
20845 MonoJitExceptionInfo, since each catch clause needs its own variable.
20847 2005-01-11 Dick Porter <dick@ximian.com>
20849 * image.c (mono_pe_file_open): New variant on mono_image_open()
20850 that does not set up the CLI metadata; used for FileVersionInfo so
20851 it can get the data for windows binaries too.
20853 * process.c (process_read_string_block): Don't read off the end of
20854 the StringTable block.
20856 These both fix bug 70766.
20858 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
20860 * gc.c: set some fields to NULL at GC cleanup time.
20861 * threads.c: if we quit the main thread, call exit ().
20863 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
20865 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
20867 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
20869 * threads.h, threads.c, object.c: added accessor and settor for
20870 main_thread. Handle it specially when exiting from it: wait
20871 for other foreground threads to exit.
20873 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20875 * process.c, verify.c: remove some bloat.
20877 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
20879 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
20880 the calling convention to cdecl under win32.
20882 2005-01-08 Ben Maurer <bmaurer@ximian.com>
20884 * object.c (mono_object_get_size): New function to get the size of
20885 an object instance.
20887 * profiler.c (simple_allocation): Use above.
20889 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
20891 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
20892 ves_icall_System_AppDomain_getRootDomain (as it's not required to
20893 get an appdomain by it's id and we can't assume the root's id is 0).
20894 * domain-internals.h: Change the function prototype to match.
20895 * icall.c: Change the icall table for AppDomain.
20897 2005-01-08 Miguel de Icaza <miguel@ximian.com>
20899 * locales.c (string_invariant_compare_char): Only compute
20900 GUnicodeTypes in the case where we need them. Test for ordinality
20901 first and return if so.
20906 * FIXME: here we must use the information from c1type and c2type
20907 * to find out the proper collation, even on the InvariantCulture, the
20908 * sorting is not done by computing the unicode values, but their
20909 * actual sort order.
20912 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20914 * loader.c: for P/Invoke methods, allow the "Internal" shared
20915 library name to refer to the calling process symbol namespace.
20917 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
20919 * Makefile.am: Add the security manager to the build.
20920 * security-manager.c|h: New. Initialization of the security manager.
20922 2005-01-07 Dick Porter <dick@ximian.com>
20925 * monitor.c: Update thread state during Monitor and WaitHandle
20926 waits. Fixes bug 71031.
20928 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
20930 * reflection.c (property_encode_signature): Correctly handle when the
20931 property has no methods.
20933 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
20935 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
20937 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
20938 fields from mb, not rmb. Fixes #71017.
20940 * marshal.c (emit_ptr_to_str_conv): Add support for
20941 ByValTStr -> string conversion. Fixes #71015.
20943 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
20945 * mempool.c (mono_mempool_contains_addr): New helper function.
20947 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
20949 * metadata.c (mono_metadata_compute_size): Fix size calculation of
20950 HasSematics encoded fields.
20952 * metadata.c (mono_type_to_unmanaged): Improve error message for
20953 invalid string marshalling.
20955 * metadata.c: Fix warnings.
20957 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20959 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
20962 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
20964 * domain.c object.c domain-internals.h: Revert part of r38077 since the
20965 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
20968 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
20970 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
20971 so methods containing these can be AOTed.
20973 2005-01-03 Martin Baulig <martin@ximian.com>
20975 * loader.c (find_method): Removed the hack for generic instances.
20976 (method_from_memberref): If our parent is a generic instance, pass
20977 its generic type definition to find_method() and then inflate the
20979 (mono_get_method_constrained): Pass the generic type definition to
20980 find_method() and inflate the method later.
20982 * class-internals.h (MonoStats): Added `generic_class_count'.
20984 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
20985 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
20987 * reflection.c (mono_custom_attrs_from_params): Don't ignore
20988 generic type definitions.
20990 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
20992 * loader.c icall.c: Fix warnings.
20994 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
20996 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
20997 blittable types. Fixes #70864.
20999 2004-12-29 Martin Baulig <martin@ximian.com>
21002 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
21004 * reflection.c (mono_method_get_object): Create a
21005 "System.Reflection.MonoGenericMethod" for inflated methods; don't
21006 call mono_get_inflated_method().
21008 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
21010 2004-12-27 Martin Baulig <martin@ximian.com>
21012 * class-internals.h (MonoMethod): Added `is_inflated' flag.
21013 (MonoMethodInflated): Added `inflated' field.
21015 * class.c (mono_class_inflate_generic_method): Don't really
21016 inflate the method here; just set the `is_inflated' flag in the
21018 (mono_class_get_inflated_method): Actually inflate the method here
21019 if it's not already inflated; we use the MonoMethodInflated's new
21020 `inflated' field as a cache.
21022 2004-12-26 Martin Baulig <martin@ximian.com>
21025 (inflate_generic_class): Moved some code out of inflate_generic_type().
21026 (mono_class_inflate_generic_method): If we're already inflated,
21027 inflate the context and use the declaring method; ie. make sure
21028 the declaring method of an inflated method is always the generic
21030 (mono_class_create_from_typedef): Create
21031 `class->generic_container->context->gclass'.
21033 2004-12-24 Ben Maurer <bmaurer@ximian.com>
21035 * metadata-internals.h, marshal.c, reflection.c: More
21036 MonoGHashTable->GHashTable.
21038 * domain-internals.h, class.c: Change MonoGHashTable's into
21039 GHashTables for some cases where no gc stuff is used
21041 All users: update apis
21043 2004-12-23 Ben Maurer <bmaurer@ximian.com>
21045 * metadata.c (builtin_types): Make this `const'. Makes this get
21046 put into the shareable section.
21047 (mono_metadata_init): Casts to make gcc happy.
21049 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
21051 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
21053 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
21055 * icall.c: Added an internal call to retrieve the position and length
21056 of assembly-level declarative security attributes (RequestMinimum,
21057 RequestOptional and RequestRefuse). This is used by the Assembly class
21058 to re-create the corresponding permission sets.
21060 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
21062 * marshal.c: fix the stelemref wrapper to be type correct
21065 2004-12-20 Ben Maurer <bmaurer@ximian.com>
21067 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
21068 to do key & 0x7fffffff. Hashtable already does this. It just
21069 results in longer code.
21071 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
21073 * appdomain.c: Bump corlib version.
21074 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
21075 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
21076 * reflection.c|h: Add functions to get declarative security infos
21077 (blob position and length) for assemblies, classes and methods.
21079 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
21081 * reflection.c: sort the constant table (bug #70693).
21083 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
21085 * object-internals.h, threads.c, domain.c: add accessors for
21086 the MonoThread and MonoDomain tls keys.
21088 2004-12-18 Martin Baulig <martin@ximian.com>
21090 * class.c (inflate_generic_type): If we're inflating a generic
21091 instance, set `ngclass->context->container = context->container';
21092 ie. the container we inflated into.
21094 * metadata.c (mono_metadata_parse_generic_param): Reflect above
21095 inflate_generic_type() changes.
21097 2004-12-17 Martin Baulig <martin@ximian.com>
21099 * class-internals.h
21100 (MonoGenericClass): Replaced `MonoType *generic_type' with
21101 `MonoClass *generic_class'. Removed `dynamic_info'; if
21102 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
21103 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
21105 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
21107 * exception.c (mono_exception_from_token): New helper function.
21109 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
21111 * assembly.c (mono_assembly_load_with_partial_name): Call
21112 mono_assembly_loaded before invoking the preload hooks. Fixes
21115 * object-internals.h (MonoThread): Change culture_info and
21116 ui_culture_info into an array.
21118 * threads.c: Cache culture info objects from more than one appdomain.
21120 * threads.c threads-types.h icall.c: Add icalls for manipulating the
21121 current UI culture.
21123 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
21125 * threads.h threads.c appdomain.c: Clear the culture_info field of
21126 all threads during unloading if they point to an object in the dying
21129 2004-12-13 Ben Maurer <bmaurer@ximian.com>
21131 * culture-info.h (TextInfoEntry): New struct
21132 * object-internals.h: sync with managed
21133 * locales.c: fill the `text_info_data' field
21134 * culture-info-tables.h: update
21136 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
21138 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
21141 2004-12-12 Ben Maurer <bmaurer@ximian.com>
21143 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
21144 (ves_icall_ModuleBuilder_getMethodToken): Ditto
21146 2004-12-12 Martin Baulig <martin@ximian.com>
21148 * mono-debug-debugger.c (write_type): If we're an enum and the
21149 builtin types have already been initialized, call mono_class_init().
21151 2004-12-11 Martin Baulig <martin@ximian.com>
21153 * metadata.c (mono_metadata_load_generic_params): Added
21154 `MonoGenericContainer *parent_container' argument; automatically
21155 compute `container->is_method'; pass the correct owner to
21158 * reflection.c (compare_genericparam): Sort the GenericParam table
21159 according to increasing owners.
21161 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
21163 * profiler.c: allow disabling the default profiler.
21165 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
21167 * decimal.c, icall.c: allow disabling System.Decimal support.
21169 2004-12-09 Marek Safar <marek.safar@seznam.cz>
21171 * reflection.c: Add support for null attribute arguments.
21173 2004-12-09 Martin Baulig <martin@ximian.com>
21175 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
21176 names to get rid of compiler warnings.
21178 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
21180 * marshal.c (mono_marshal_get_struct_to_ptr): Call
21181 mono_marshal_load_type_info (). Fixes #69625.
21182 (mono_marshal_get_ptr_to_struct): Likewise.
21184 2004-12-08 Martin Baulig <martin@ximian.com>
21186 * mono-debug.h: Bumped version number to 47.
21188 * mono-debug-debugger.c
21189 (mono_debugger_event_handler, mono_debugger_event): Take two
21190 guint64 arguments insteed of a gpointer and a guint32.
21192 2004-12-08 Martin Baulig <martin@ximian.com>
21194 * debug-mono-symfile.h
21195 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
21196 `address' to `native_offset'.
21198 2004-12-08 Martin Baulig <martin@ximian.com>
21200 * class.c (mono_class_create_from_typespec): Only inflate if we
21201 either have `context->gclass' or `context->gmethod'.
21203 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
21205 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
21207 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
21209 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
21211 * reflection.c (mono_assembly_get_object): Remove the workaround put
21212 in for the release.
21214 * appdomain.c: Use the corlib_internal field from MonoAssembly.
21216 * appdomain.c: Bump corlib version.
21218 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
21219 be visible in other appdomains.
21221 2004-12-07 Ben Maurer <bmaurer@ximian.com>
21223 * threads.c: Interlocked inc and dec for longs were messed up,
21224 use a KISS based impl for this. Fixes 70234
21226 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
21228 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
21230 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
21232 * icall.c: fix to follow policy not to allow struct
21233 arguments in icalls.
21235 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21237 * process.c: make the patch that handles spaces in file paths work
21238 on mono/windows too.
21240 2004-12-06 Martin Baulig <martin@ximian.com>
21242 * class.c (mono_class_create_generic): Call
21243 mono_class_setup_supertypes() if we're dynamic.
21244 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
21246 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
21248 * object-internals.h: Add new fields to MonoThread.
21250 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21252 * icall.c threads-types.h threads.c: Add new icalls.
21254 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
21256 * object-internals.h (MonoReflectionAssembly): Sync object layout with
21259 * appdomain.c: Bump corlib version.
21261 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
21262 internal assemblies. Fixes #69181.
21264 2004-12-05 Martin Baulig <martin@ximian.com>
21266 * class.c (mono_class_inflate_generic_signature): Make this a
21267 no-op if `context' is NULL or we don't have any type parameters;
21268 also copy `sentinelpos'.
21270 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
21272 * image.c: Add unbox_wrapper_cache.
21274 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
21276 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
21277 function generator.
21279 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
21282 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
21284 2004-12-04 Martin Baulig <martin@ximian.com>
21286 * loader.c (mono_method_get_signature_full): New public function;
21287 like mono_method_get_signature(), but with an additional
21288 `MonoGenericContext *' argument.
21290 * class.c (mono_class_inflate_generic_signature): Formerly known
21291 as inflate_generic_signature(); make this public.
21293 2004-12-04 Martin Baulig <martin@ximian.com>
21296 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
21297 instead of a `MonoGenericContainer *'.
21298 (mono_metadata_parse_array_full): Likewise.
21299 (mono_metadata_parse_signature_full): Likewise.
21300 (mono_metadata_parse_method_signature_full): Likewise.
21301 (mono_metadata_parse_generic_inst): Likewise.
21302 (mono_metadata_parse_generic_param): Likewise.
21303 (mono_metadata_parse_mh_full): Likewise.
21304 (mono_type_create_from_typespec_full): Likewise.
21306 2004-12-03 Martin Baulig <martin@ximian.com>
21308 * class-internals.h (MonoGenericContainer): Replaced the
21309 `MonoGenericContext * pointer with a `MonoGenericContext'
21310 structure and made it the first element.
21312 2004-12-03 Martin Baulig <martin@ximian.com>
21315 (inflate_generic_type): Set the `context->container' when creating
21316 a new MonoGenericContext.
21317 (mono_class_inflate_generic_method): Likewise.
21318 (mono_class_create_from_typespec): Just use `context->container'
21319 to get the container.
21321 * loader.c (method_from_methodspec): Set `context->parent' from
21322 `context->container' - and if that's a method container, use its
21323 parent. Also set the `context->container' when creating a new
21324 MonoGenericContext.
21325 (mono_get_method_from_token): Use just `context->container' to get
21328 * metadata.c (do_mono_metadata_parse_generic_class): Also set
21329 `gclass->context->container'.
21331 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
21332 the `context->container' when creating a new MonoGenericContext.
21334 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
21336 * reflection.c (compare_genericparam): Sort params with identical
21337 owner by their number. Fixes gen-111 on sparc.
21339 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
21341 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
21342 around the domain changes.
21344 * appdomain.c (mono_domain_unload): Handle the case when the thread
21345 calling Unload is itself being aborted during unloading. Fixes #70022.
21347 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
21349 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
21350 checkpoint_func as an icall so it gets a wrapper.
21351 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
21352 in the cross-appdomain wrappers too.
21354 * threads.c (mono_thread_has_appdomain_ref): Make this public.
21356 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
21358 * reflection.c: Fix some memory leaks.
21360 2004-12-02 Martin Baulig <martin@ximian.com>
21362 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
21364 * metadata.c (generic_class_cache): New static hashtable.
21365 (mono_metadata_lookup_generic_class): New public method.
21367 2004-12-02 Martin Baulig <martin@ximian.com>
21369 * class.c (mono_class_create_from_typedef): Call
21370 mono_class_setup_parent() and mono_class_create_mono_type() before
21371 parsing the interfaces.
21373 2004-12-02 Martin Baulig <martin@ximian.com>
21375 * metadata.c (generic_inst_cache): New static hashtable.
21376 (mono_metadata_lookup_generic_inst): New public function.
21377 (mono_metadata_inflate_generic_inst): New public function.
21378 (mono_metadata_parse_generic_inst): New public function.
21379 (do_mono_metadata_parse_generic_class): Use the new
21380 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
21381 since this'll also use the cache.
21383 * reflection.c (mono_reflection_bind_generic_method_parameters):
21384 Use mono_metadata_lookup_generic_inst() to use the new cache.
21386 * class.c (inflate_mono_type): Use
21387 mono_metadata_inflate_generic_inst() to inflate a generic
21388 instance; this'll also use the new cache.
21390 * loader.c (method_from_methodspec): Use
21391 mono_metadata_parse_generic_inst() and
21392 mono_metadata_inflate_generic_inst() rather than parsing it
21393 manually, so we can use the new cache.
21395 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
21397 * threads.c (wait_for_tids): Do not incorrectly free threads when
21398 the wait times out.
21400 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21402 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
21403 iter->args based on whether parameters are passed in registers (i.e.
21404 MONO_ARCH_REGPARMS is defined)
21406 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
21408 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
21409 the exception message. Fixes #70070.
21410 (method_from_methodspec): Fix warnings.
21412 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21414 * process.c: (complete_path) return the path quoted
21416 2004-12-01 Martin Baulig <martin@ximian.com>
21418 * class-internals.h (MonoGenericInst): New structure.
21419 (MonoGenericClass): Replaced `type_argc', `type_argv' and
21420 `is_open' with `MonoGenericInst *inst'.
21421 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
21422 `is_open' with `MonoGenericInst *inst'.
21424 2004-11-30 Martin Baulig <martin@ximian.com>
21426 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
21428 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
21429 to `generic_class_cache'.
21432 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
21433 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
21434 (mono_generic_inst_is_valuetype): Renamed to
21435 mono_generic_class_is_valuetype().
21437 * class-internals.h
21438 (MonoGenericInst): Renamed to MonoGenericClass.
21439 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
21440 (MonoClass): Renamed `generic_inst' to `generic_class'.
21441 (MonoGenericContext): Renamed `ginst' to `gclass'.
21443 * object-internals.h
21444 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
21446 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
21447 mono_reflection_generic_class_initialize().
21449 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
21450 now known as "System.Reflection.MonoGenericClass".
21451 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
21453 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
21455 * class-internals.h: Added a flag field to MonoClass to cache the
21456 declarative security attributes actions associated with the class.
21457 * domain-internals.h: Added booleans to MonoJitInfo to cache the
21458 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
21459 applicable to the JITted method.
21460 * reflection.c|h: Added functions to extract (as flags) which security
21461 actions are available (declaratively) for a method, class or assembly.
21462 * metadata.c|h: Added functions to search the declarative security
21463 table in the metadata.
21465 2004-11-29 Ben Maurer <bmaurer@ximian.com>
21467 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
21468 EXPORTEDTYPES are already in the class name cache, so there is no
21469 need to add extra code here to look at them. Just removes a bit of
21472 (ves_icall_System_Environment_get_TickCount): No need for #if
21473 WINDOWS. We already have the code in io-layer.
21475 2004-11-28 Martin Baulig <martin@ximian.com>
21478 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
21481 2004-11-27 Miguel de Icaza <miguel@ximian.com>
21483 * assembly.c (do_mono_assembly_open): Instead of having a
21484 conditional WITH_BUNDLE, incorporate support for bundles here, by
21485 having a global `bundles' variable holding a pointer to the actual
21488 (mono_register_bundled_assemblies): New API call used by the
21491 See mkbundle.1 for details.
21493 2004-11-27 Martin Baulig <martin@ximian.com>
21495 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
21496 the vtable for generic methods.
21498 2004-11-26 Martin Baulig <martin@ximian.com>
21501 (mono_metadata_generic_method_hash): New public function.
21502 (mono_metadata_generic_method_equal): Likewise.
21504 * class-internals.h
21505 (MonoGenericContainer): Added `GHashTable *method_hash'.
21507 * reflection.c (ReflectionMethodBuilder): Added
21508 `MonoGenericContainer *generic_container'.
21509 (reflection_methodbuilder_to_mono_method): Don't create a new
21510 MonoGenericContainer each time we're called.
21511 (mono_reflection_bind_generic_method_parameters): Use
21512 `container->method_hash' to cache the results so we don't create a
21513 different method if we're called several times with the same
21516 * loader.c (method_from_methodspec): Use the new
21517 `container->method_hash' here, too.
21519 2004-11-26 Martin Baulig <martin@ximian.com>
21521 * class.c (inflate_generic_signature): Correctly compute
21522 `res->has_type_parameters'.
21523 (mono_class_vtable): Use the `has_type_parameters' flag to
21524 determine whether we're a generic method.
21526 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
21528 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
21530 * object.c (mono_runtime_run_main): Fix a small memory leak.
21532 2004-11-25 Martin Baulig <martin@ximian.com>
21534 * class.c (set_generic_param_owner): Fixed the loop.
21536 2004-11-25 Martin Baulig <martin@ximian.com>
21538 * object.c (mono_class_vtable): Don't create any JIT wrappers for
21541 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
21543 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
21544 names. Fixes #69787.
21546 2004-11-24 Martin Baulig <martin@ximian.com>
21548 * class.c (mono_class_create_generic_2): If we don't have a
21549 `ginst->parent', inflate `gklass->parent' to get our parent.
21551 2004-11-24 Martin Baulig <martin@ximian.com>
21553 * reflection.c (compare_genericparam): Correctly sort the
21554 GenericParam table; fixes #69779.
21556 2004-11-23 Ben Maurer <bmaurer@ximian.com>
21558 * reflection.c: When writing a PE file, don't create a huge
21559 buffer in memory. Just write the arrays we have to the file.
21560 This reduces memory usage.
21562 * metadata-internals.h: MonoDynamicStream pefile is no longer used
21565 2004-11-17 Martin Baulig <martin@ximian.com>
21567 * class.c (mono_class_init): Don't setup `class->parent' for
21568 dynamic instances; moved this to mono_class_generic_2().
21569 (mono_class_create_generic): Also set `klass->inited' for dynamic
21571 (mono_class_create_generic_2): Don't do anything for dynamic
21572 generic instances. Set `klass->parent' here and also call
21573 mono_class_setup_parent() here.
21575 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
21576 `MonoType *parent' argument; set `ginst->parent' before calling
21577 mono_class_create_generic_2(), so we set the correct parent.
21579 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
21581 * reflection.c: allow getting attributes from ModuleBuilder
21584 2004-11-17 Martin Baulig <martin@ximian.com>
21586 * class.c (mono_class_create_from_typedef): If a type parameter is
21587 inherited from an outer class, set its owner to that class.
21589 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
21591 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
21592 for (int*) written size. This fixes bug #69592.
21594 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
21596 * icall.c: Added IsAuthenticodePresnet internal call.
21597 * image.c|h: New function that check a MonoImage for an Authenticode
21598 signature in the certificate PE data directory.
21599 * security.c|h: New internal call to ask the runtime if an
21600 Authenticode signature seems referenced in the PE header.
21602 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
21604 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
21606 * reflection.c (mono_image_create_pefile): Free the assembly streams
21607 after writing out the assembly file.
21609 * object.c (mono_runtime_run_main): Fix small memory leak.
21611 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
21612 property access modifiers. Fixes #69389.
21614 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21616 * domain.c, object.c, object-internals.h, domain-internals.h,
21617 object.h, marshal.c: keep dynamic code info per domain.
21619 2004-11-15 Martin Baulig <martin@ximian.com>
21621 * class.c (mono_type_get_name_recurse): Put type arguments in
21622 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
21625 2004-11-15 Martin Baulig <martin@ximian.com>
21627 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
21628 (mono_class_setup_vtable): When computing `the_cname' for a
21629 generic instance, don't include the namespace since we'd otherwise
21632 2004-11-15 Martin Baulig <martin@ximian.com>
21634 * class.c (mono_class_create_generic): Changed return type to void.
21635 (mono_class_create_generic_2): New public function; setup
21636 `class->method', `class->field' and `class->interfaces' here
21637 instead of in mono_class_init().
21639 * class.h (mono_class_create_generic): Moved to class-internals.h.
21641 2004-11-14 Ben Maurer <bmaurer@ximian.com>
21643 * reflection.c (mono_image_create_pefile): take a file HANDLE.
21644 rather than writing to memory, write to this file. Right now,
21645 we are just writting into a buffer, and copying that. However
21646 we can avoid the buffer later.
21648 (mono_dynamic_stream_reset): new function
21650 * icall.c, object-internals.h: update for the above.
21652 2004-11-13 Ben Maurer <bmaurer@ximian.com>
21654 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
21655 have been using gc'd memory. First it is slower, unlikely
21656 the comment in the source code said, secondly, it increases
21657 our footprint to do it in the gc.
21659 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
21660 the method so that it does not have to copy to managed code.
21662 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
21664 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
21666 2004-11-12 Martin Baulig <martin@localhost>
21668 * reflection.c (mono_image_create_token): Allow generic method
21669 definitions here, since they may appear in an `.override'; see
21670 gen-98/gen-99 for an example.
21672 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
21674 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
21677 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
21680 2004-11-11 Martin Baulig <martin@ximian.com>
21682 * class.c (mono_class_setup_vtable): In an explicit interface
21683 implementation, the method name now includes the arity.
21685 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
21687 * object.c (mono_array_full_copy): Fix warning.
21689 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
21691 * appdomain.c: Removed look_for_method_by_name(). Use the new method
21692 mono_class_get_method_from_name() instead.
21694 * class-internals.h: Added two new types of wrappers.
21695 Added MonoRemotingTarget enum. Added new trampoline function type, which
21696 takes an additional MonoRemotingTarget value as parameter, so it is
21697 possible to request a trampoline for a specific target.
21699 * class.c: Added new mono_class_get_method_from_name() method.
21701 * class.h: In MonoRemoteClass, we can have now to vtables, one for
21702 general remoting sinks and one specific for cross domain calls.
21704 * debug-helpers.c: Added new wrapper names.
21706 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
21709 * image.c: Porperly delete value objects form the remoting invoke hashtable.
21711 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
21712 with several other methods (mono_marshal_get_xappdomain_dispatch,
21713 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
21714 and others) can generate a fast remoting wrapper for cross domain calls.
21715 More information can be found in docs/remoting.
21716 Other changes: Removed mono_find_method_by_name, and used
21717 mono_class_get_method_from_name instead.
21718 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
21719 is stored in the remoting invoke hashtable.
21721 * marshal.h: published the new method for getting the xdomain wrapper,
21722 and also added a method for getting the adequate wrapper for a given
21725 * object-internals.h, object.c: Added a couple of methods for capying and
21727 Modified mono_install_remoting_trampoline, which takes the new remoting
21728 trampoline that has a remoting target as parameter.
21729 mono_class_proxy_vtable now also takes a remoting target as parameter, and
21730 will return the most suitable vtable for the target.
21731 Added mono_remote_class_vtable, which returns the vtable of a remote class
21732 (which can be the normal remoting vtable or the xdomain vtable).
21734 * threads.c: the xdomain invoke and dispatch wrappers must also be
21735 protected against interruptions.
21737 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21739 * icall.c: use memmove in BlockCopyInternal when the source and
21740 destination arrays are the same.
21742 2004-11-09 Martin Baulig <martin@ximian.com>
21744 * class-internals.h (MonoGenericContainer): Removed `method' and
21745 `signature', replaced them with `is_method' and `is_signature'
21746 flags. Added `context'.
21748 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
21749 instead of a `MonoGenericContainer *'.
21751 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
21752 for dynamic type parameters.
21753 (mono_metadata_load_generic_params): Setup `container->context'.
21755 * reflection.c (mono_reflection_setup_generic_class): Setup
21756 `tb->generic_container->context'.
21757 (do_mono_reflection_bind_generic_parameters): Use
21758 mono_class_inflate_generic_type() to correctly inflate types,
21759 rather than using our own hack just for MONO_TYPE_VAR.
21761 2004-11-09 Martin Baulig <martin@ximian.com>
21763 * class.c (mono_class_inflate_generic_method): Small fix; don't
21767 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
21768 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
21769 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
21770 (ves_icall_Type_BindGenericParameters): Likewise.
21771 (ves_icall_Type_get_IsGenericInstance): Likewise.
21772 (ves_icall_Type_GetGenericParameterPosition): Likewise.
21773 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
21774 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
21775 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
21777 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
21779 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
21780 assembly versions and public key tokens. Fixes #69113.
21782 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
21784 * metadata.c: fix bug introduced with the type cache changes
21787 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
21789 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
21790 the MonoClass pointer instead of the token in exception clauses.
21791 * reflection.c: updates for the above and make the code not depend
21792 on the structure of MonoExceptionClause.
21794 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
21796 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21797 Add support for dynamic assemblies. Fixes #69114.
21799 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
21801 2004-11-07 Ben Maurer <bmaurer@ximian.com>
21803 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
21804 since most only those methods use it. the code member of
21805 MonoMethodPInvoke was dead, so that can be removed too. Also,
21806 remove inline_count (again, not used), and move slot so that it
21807 can share bits with some other flags. This saves 8 bytes in the
21808 structure and gives us about 50 kb back for mcs helloworld.cs
21810 * *.[ch]: Do naming changes for the above.
21812 * loader.c (mono_method_get_header): Lazily init the header
21814 (mono_get_method_from_token): don't init the header here
21815 (mono_free_method): the header may never be allocated
21817 Overall, this saves 150 kb of unmanaged allocations
21818 for mcs helloworld.cs. That accounts for 10% of the unmanaged
21821 * loader.c, loader.h (mono_method_get_header): new accessor.
21823 * *.[ch]: use the above method. Prepares us to lazily load
21826 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
21827 three warnings, which are actual bugs (see 69206).
21829 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
21830 unused. Saves a cool 4 bytes / method.
21832 2004-11-06 Ben Maurer <bmaurer@ximian.com>
21834 * metadata.c (builtin_types): Add types for System.Object here.
21835 (mono_metadata_parse_type_full): Cache MonoType*'s that are
21836 for a class or valuetype from klass->this_arg or klass->byval_arg.
21838 On mcs for a hello world, this gets us down from 21836 MonoType's
21841 (mono_metadata_free_type): Account for the above change.
21843 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
21845 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
21846 exception instead of asserting if name is null.
21847 (ves_icall_System_AppDomain_GetData): Ditto.
21849 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
21851 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
21854 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
21855 Return NULL when the domain does not have entry_assembly set.
21857 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
21858 Add a 'resource_modules' argument.
21859 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
21861 * reflection.c (mono_reflection_create_runtime_class): Move setting
21862 of wastypebuilder here, so mono_get_type_object () returns a MonoType
21865 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
21866 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
21867 Throw an ArgumentNullException if 'ptr' is null.
21869 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
21870 assemblies here. Fixes #69020.
21872 2004-11-05 Geoff Norton <gnorton@customerdna.com>
21874 * reflection.c (build_compressed_metadata): Fix the previous patch for
21875 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
21878 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
21880 * assembly.c (mono_assembly_names_equal): Allow a match if one of
21881 the cultures is false. Fixes #69090.
21883 * reflection.c (build_compressed_metadata): Fix invalid memory read
21884 detected by valgrind.
21886 * reflection.c (mono_reflection_get_type): Avoid triggering a
21887 TypeResolve multiple times for the same type. Fixes #65577.
21889 2004-11-04 Ben Maurer <bmaurer@ximian.com>
21891 * marshal.c: Avoid using ldftn to call managed functions. It is
21892 much slower than just a call.
21894 * reflection.c (mono_module_get_object): free the basename we
21895 allocate here from glib.
21897 * reflection.c (ensure_runtime_vtable): make sure to free
21898 overrides. Also, we were allocating an array of MonoMethod not an
21899 array of MonoMethod*.
21901 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
21903 * image.c (mono_image_close): free image->guid here.
21905 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
21907 * reflection.c: Fix some spec conformance issues with the PE file
21908 structures so mcs compiled apps run on the Net 2.0 beta.
21910 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
21912 * string-icalls.c (ves_icall_System_String_ctor_encoding):
21913 Implement this. Fixes #67264.
21915 * debug-helpers.h debug-helpers.c marshal.c: Move
21916 mono_find_method_by_name to debug-helpers.c.
21918 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
21920 * object.c (mono_release_type_locks): type_initialization_hash is
21923 * reflection.c object.c object-internals.h: Fix warnings.
21925 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
21926 without accessors. Fixes #61561.
21928 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
21929 application base from the root domain if not set. Fixes #65641.
21930 (mono_runtime_init): Fix warning.
21932 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21934 * appdomain.c: call mono_thread_pool_init.
21935 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
21936 of worker threads based on the number of CPUs and the environment
21937 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
21938 for non-windows (windows) systems.
21940 2004-10-27 Chris Toshok <toshok@ximian.com>
21942 * mono-debug-debugger.c (write_class): don't call mono_class_init
21943 here, as even with the check for (!klass->init_pending), we get
21944 into a situation where we're hitting cycles in class
21945 initialization. Fixes #68816.
21947 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
21949 * image.c: Avoid overwriting values in the loaded_images_hash when an
21950 assembly is loaded multiple times. Fixes #61152.
21952 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
21953 so multiple satellite assemblies for the same name can be loaded.
21956 * mono_domain_assembly_preload: Actually return the loaded assembly,
21959 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
21960 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
21962 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
21963 pending finalizers are not invoked after the appdomain has been
21964 unloaded. Fixes #67862.
21966 2004-10-22 Martin Baulig <martin@ximian.com>
21968 * mono-debug-debugger.c
21969 (mono_debugger_runtime_invoke): Don't box valuetypes.
21971 2004-10-22 Chris Toshok <toshok@ximian.com>
21973 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
21974 don't hide private methods.
21976 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
21978 * icall.c: Allows the runtime to "share" (when known) the public key
21979 token of an assembly. This avoid the need to recalculate the token
21980 (from the public key) in managed code.
21982 2004-10-21 Chris Toshok <toshok@ximian.com>
21984 * debug-helpers.c (append_class_name): argh, revert last patch.
21986 2004-10-21 Chris Toshok <toshok@ximian.com>
21988 * debug-helpers.c (append_class_name): use '+' as the delimiter,
21989 not '/', so that it matches what the debugger uses to look up
21992 2004-10-21 Martin Baulig <martin@ximian.com>
21994 * mono-debug-debugger.c (mono_debugger_throw_exception): New
21995 public method; this is called each time an exception is thrown and
21996 allows the debugger to use exception catch points.
21998 2004-10-21 Martin Baulig <martin@ximian.com>
22000 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
22001 the stack pointer and the exception object in some struct and pass
22002 that to the debugger.
22004 2004-10-21 Chris Toshok <toshok@ximian.com>
22006 * mono-debug-debugger.c (do_write_class): add instance/static
22007 event support. We don't expose "raise" or "other" yet.
22008 (event_is_static): new method.
22010 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
22012 * mono-debug-debugger.c
22013 (mono_debugger_handle_exception): Remove
22014 bogus return value for fussy compilers.
22016 2004-10-20 Martin Baulig <martin@ximian.com>
22018 * mono-debug-debugger.c
22019 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
22020 (mono_debugger_handled_exception): Likewise.
22022 2004-10-20 Martin Baulig <martin@ximian.com>
22024 * mono-debug-debugger.h (MonoDebuggerEvent): Added
22025 MONO_DEBUGGER_EVENT_EXCEPTION.
22027 * mono-debug-debugger.c (mono_debugger_handle_exception): New
22028 public function to send the debugger a notification for an
22029 exception and inform it about a catch/finally clause.
22031 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
22033 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
22034 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
22037 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
22039 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
22041 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
22042 marshalled as [In,Out]. Fixes #58325.
22044 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
22046 * reflection.c (mono_method_body_get_object): Implement some fields.
22048 2004-10-12 Martin Baulig <martin@ximian.com>
22050 * reflection.c (mono_reflection_bind_generic_parameters): Small
22051 fix, correctly retrieve our parent from a generic instance.
22053 2004-10-12 Martin Baulig <martin@ximian.com>
22055 * metadata.c (mono_metadata_generic_param_equal): We always have
22059 (mono_class_from_generic_parameter): We need to have an owner.
22060 (my_mono_class_from_generic_parameter): Likewise.
22062 * reflection.c (mono_reflection_setup_generic_class): Renamed to
22063 mono_reflection_create_generic_class() and added a new
22064 mono_reflection_setup_generic_class().
22065 (mono_reflection_initialize_generic_param): If we're a nested
22066 generic type and inherited from the containing class, set our
22067 owner to the outer class.
22069 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
22071 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
22073 * reflection.c (mono_method_body_get_object): New function to create
22074 a MethodBody object.
22076 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
22078 2004-10-11 Martin Baulig <martin@ximian.com>
22080 * metadata.c (_mono_metadata_type_equal): Renamed to
22081 do_mono_metadata_type_equal() and made static.
22083 2004-10-11 Martin Baulig <martin@ximian.com>
22085 * appdomain.c: Bump corlib version number to 28.
22087 2004-10-10 Martin Baulig <martin@ximian.com>
22089 * class-internals.h
22090 (MonoGenericInst): Added `MonoGenericContainer *container'.
22091 (MonoGenericMethod): Likewise.
22092 (MonoGenericContext): Likewise.
22093 (MonoGenericParam): Added `MonoGenericContainer *owner'.
22096 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
22097 (do_mono_metadata_parse_generic_inst): Likewise.
22098 (mono_metadata_parse_type_full): New public method. This is the actual
22099 mono_metadata_parse_type() implementation - with an additional
22100 `MonoGenericContainer *' argument.
22101 (mono_metadata_parse_array_full): Likewise.
22102 (mono_metadata_parse_signature_full): Likewise.
22103 (mono_metadata_parse_method_signature_full): Likewise.
22104 (mono_metadata_parse_mh_full): Likewise.
22105 (mono_type_create_from_typespec): Likewise.
22106 (mono_metadata_interfaces_from_typedef_full): New public method;
22107 this is similar to the other _full() methods, but we take a
22108 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
22109 (mono_metadata_parse_generic_param): Take an additional
22110 `MonoGenericContainer *' argument and lookup the MonoGenericParam
22111 from that container.
22112 (mono_metadata_generic_param_equal): New static method to compare
22113 two type parameters.
22114 (_mono_metadata_type_equal): New static method; takes an
22115 additional `gboolean signature_only' argument - if true, we don't
22116 compare the owners of generic parameters.
22117 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
22118 with a TRUE argument - do a signature-only comparision.
22120 * loader.c: Use the new _full() methods and pass the
22121 MonoGenericContainer to them.
22123 * object-internals.h (MonoReflectionTypeBuilder): Added
22124 `MonoGenericContainer *generic_container' field.
22125 (MonoReflectionMethodBuilder): Likewise.
22127 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
22129 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
22130 case initial images of dynamic assemblies.
22132 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
22134 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
22136 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
22137 length of event->other array.
22138 (typebuilder_setup_events): Ditto.
22140 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
22141 'assembly_by_name' and add an 'assemblies' list.
22143 * assembly.h assembly.c: Add a new search hook for determining whenever
22144 an assembly is already loaded. Use this instead of searching in the
22145 loaded_assemblies list.
22147 * domain.c appdomain.c: Implement the new search hook so loaded
22148 assemblies are now scoped by appdomain. Fixes #67727.
22150 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
22152 * threads.c (mono_thread_attach): Initialize synch_lock field so
22153 mono_thread_detach works again.
22155 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
22156 'lib' too. Fixes #63130.
22158 2004-10-06 Jackson Harper <jackson@ximian.com>
22160 * culture-info-tables.h: regenerated.
22162 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
22164 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
22165 implemented by other interfaces in the result. Fixes #65764.
22167 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22168 Handle unloadable modules without crashing.
22170 * image.c (load_modules): Revert the previous patch since modules must
22171 have a fixed index inside the array.
22173 * image.c (load_modules): Don't include native modules in the modules
22176 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
22178 * reflection.h: Add param_defaults field.
22180 * reflection.c: Add support for parameter defaults in dynamic methods.
22183 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
22184 an empty string when a type has no namespace. Fixes #64230.
22186 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
22188 * tabledefs.h: Added "internal" security actions to support non-CAS
22189 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
22190 Note: they do not seems to be used anymore in 2.0 (new metadata format)
22192 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
22194 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
22195 constructor of abstract class. Fixes #61689.
22197 2004-10-04 Martin Baulig <martin@ximian.com>
22199 * class-internals.h (MonoGenericContainer): New type.
22200 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
22201 `MonoGenericContainer *generic_container'.
22202 (MonoClass): Replaced `gen_params' and `num_gen_params' with
22203 `MonoGenericContainer *generic_container'.
22205 * metadata.c (mono_metadata_load_generic_params): Return a
22206 `MonoGenericContainer *' instead of a `MonoGenericParam *';
22207 removed the `num' argument.
22209 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
22211 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
22212 for dynamic images.
22214 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
22217 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
22219 * reflection.c: Save pe_kind and machine values into the generated
22222 * appdomain.c: Bump corlib version number.
22224 * object-internals.h: Reorganize layout of LocalBuilder.
22226 * class-internals.h class.c (mono_class_get_implemented_interfaces):
22227 New helper function.
22229 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
22230 created MonoType for dynamic types. Fixes #66180.
22232 2004-10-02 Ben Maurer <bmaurer@ximian.com>
22234 * threadpool.c: the ares hashtable needs a critical section around it.
22235 this prevents some nasty segfaults
22237 2004-10-02 Massimiliano Mantione <massi@ximian.com>
22239 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
22240 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
22243 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
22245 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
22247 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
22249 * image.c: Always canonicalize image file names, to avoid loading
22250 the same assembly twice when referenced using a relative path.
22252 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
22254 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
22256 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
22258 * marshal.c: Fix warnings.
22260 2004-09-29 Geoff Norton <gnorton@customerdna.com>
22262 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
22263 attempting to marshal the delegate_trampoline as the method_addr.
22264 This patch has a static hashtable of marshalled delegates so that
22265 we can map delegate_trampoline addresses back to delegates. This
22266 allows a delegate passed to managed code to be passed back into native
22269 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
22271 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
22273 * reflection.c (method_encode_code): Align method headers properly.
22276 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
22278 * marshal.c: In the runtime invoke wrapper, reset the abort
22279 exception if it is cached. This avoids the automatic rethrowal of
22280 the exception after the catch of the wrapper. Also check for pending
22281 interruptions before calling the managed method. This is done using
22282 the new method emit_thread_force_interrupt_checkpoint, since the
22283 normal checkpoint method is ignored when running the invoke wrapper.
22284 * object.c: If the abort exception is rethrown, set the abort_exc
22285 field of the thread, so it will be rethrown aftere every catch.
22286 * threadpool.c: Only run an interruption checkpoint if what has been
22287 requested is a stop of the thread (aborts will be ignored).
22288 * threads.c: By default, a thread will now never be interrumped while
22289 running the runtime invoke wrapper (this ensures that runtime_invoke
22290 will always return to the caller if an exception pointer is provided).
22291 There is a new special method mono_thread_force_interruption_checkpoint()
22292 to force an interruption checkpoint even if running a protected
22293 wrapper, which is used by the same runtime invoke wrapper to do a check
22296 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
22298 * object.c, object-internals.h: Implemented mono_release_type_locks,
22299 which releases the cctor locks held by a thread.
22300 * threads.c, threads.h: In thread_cleanup, release cctor locks held
22301 by a thread. Added mono_thread_exit() method to be used to safely stop
22304 2004-09-28 Raja R Harinath <rharinath@novell.com>
22306 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22307 Move null check before dereference. Avoid indexing beyond the end
22308 of the 'modules' array.
22310 2004-09-28 Raja R Harinath <rharinath@novell.com>
22312 * metadata-internals.h (MonoImage): Add module_count field.
22313 * image.c (load_modules): Set image->module_count.
22314 (mono_image_load_file_for_image): Use image->module_count.
22315 * reflection.c (mono_image_load_module): Append to image->modules array
22316 of dynamic assembly.
22317 (mono_module_get_object): Fix loop to actually increment index.
22318 Use image->module_count.
22319 * assembly.c (mono_assembly_load_references): Use image->module_count.
22320 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22323 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
22325 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
22326 Avoid assert on generic types.
22328 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
22330 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
22332 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
22334 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
22335 function to convert a MarshalSpec structure to its managed counterpart.
22337 * reflection.c: Fix warnings.
22339 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
22342 * icall.c (mono_create_icall_signature): Fix build.
22344 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
22346 * icall.c: Add MakePointType icall.
22348 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
22351 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22353 * threadpool.c: reuse allocated slots in the queue.
22355 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
22357 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
22359 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
22361 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
22364 * tabledefs.h: Add constants for pinvoke attributes BestFit and
22365 ThrowOnUnmappableChar.
22367 * icall.c (ves_icall_Type_GetPacking): New icall.
22369 2004-09-24 Martin Baulig <martin@ximian.com>
22371 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
22373 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22376 (mono_domain_set): allow setting a domain that is being unloaded.
22377 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
22380 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
22382 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
22383 the GetCustomAttributes icall.
22385 2004-09-23 Martin Baulig <martin@ximian.com>
22387 * object-internals.h (MonoReflectionGenericParam): Replaced
22388 'has_ctor_constraint', `has_reference_type' and `has_value_type'
22389 with `guint32 attrs'.
22391 2004-09-23 Martin Baulig <martin@ximian.com>
22393 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
22395 2004-09-23 Martin Baulig <martin@ximian.com>
22397 * object-internals.h (GenericParameterAttributes): New enum.
22399 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
22401 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
22403 * class.c (init_events): Fill out event->other field.
22405 * class.c: Fix warnings.
22407 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
22409 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
22411 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
22412 walk which doesn't supply the IL offset.
22414 2004-09-22 Martin Baulig <martin@ximian.com>
22416 * reflection.c (mono_reflection_setup_internal_class): If we're
22417 System.ValueType, System.Object or System.Enum, set
22418 `klass->instance_size' and create the vtable.
22419 (mono_reflection_create_internal_class): If we're an enum type,
22420 get the base class from our current corlib.
22422 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
22424 * reflection.h (MonoResolveTokenError): New type.
22426 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
22429 * icall.c: Add an 'error' argument to the ResolveToken icalls.
22431 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
22433 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
22434 Support also calling constructors, but only for already allocated objects.
22436 2004-09-17 Geoff Norton <gnorton@customerdna.com>
22438 * reflection.c (type_get_qualified_name): If the klass is null
22439 return the typename to avoid a NullRefEx.
22440 (encode_cattr_value): Get the qualified name of the boxed type,
22441 not the underlying enumtype. Fixes #62984.
22443 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
22445 * marshal.c: Fix problems with previous checkin.
22447 2004-09-21 <vargaz@freemail.hu>
22449 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
22450 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
22452 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
22454 2004-09-21 Geoff Norton <gnorton@customerdna.com>
22456 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
22457 should only return a type for pointers, arrays, and passbyref types.
22460 2004-09-21 Martin Baulig <martin@ximian.com>
22462 * domain.c (mono_debugger_check_runtime_version): New public
22465 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
22467 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
22469 * reflection.c: Added missing sort to the declarative security
22470 attributes table. MS implementation stops seeing the attributes if the
22471 token number regress in the table (as shown by ildasm and permview).
22473 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
22475 * object-internals.h (MonoReflectionModule): Add 'token' field.
22477 * reflection.c (mono_reflection_get_token): Add support for Module
22479 (mono_module_get_object): Set 'token' field.
22480 (mono_module_file_get_object): Set 'token' field.
22482 * icall.c: Add new Assembly and Module icalls.
22484 * appdomain.c: Bump corlib version.
22486 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
22488 * loader.h loader.c class.h class.c: Add helper functions for obtaining
22489 tokens of metadata objects.
22491 * reflection.h reflection.c (mono_reflection_get_token): New function
22492 to obtain the token of a metadata object.
22494 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
22496 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
22498 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
22500 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
22502 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
22504 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
22505 * object-internals.h: Added 3 MonoArray* members to MonoReflection
22506 AssemblyBuilder to access the permissions set in the class lib.
22507 * reflection.c: Added security attributes encoding step in
22508 mono_image_build_metadata.
22509 * tabledefs.h: Added new security actions defined in 2.0:
22510 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
22512 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
22514 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
22517 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
22519 * locales.c: nullify the ICU_collator member of CompareInfo when it is
22520 finalized. There where random SIGSEVs at program termination, when
22521 an object being finalized was trying to do a string comparison and
22522 the current culture was already finalized.
22524 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22526 * threads.c: call thread_cleanup before finishing the thread if we get
22529 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
22531 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
22532 assemblies from the parent. Fixes #65665.
22534 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
22536 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
22539 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
22541 * reflection.h: add prototype for mono_get_dbnull_object
22542 * reflection.c: add prototypes for get_default_param_value_blobs
22543 and mono_get_object_from_blob for fussier compilers
22545 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
22547 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
22548 false deadlock checks in class initialization.
22550 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
22552 * image.c (mono_image_addref): Fix comment.
22554 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
22557 2004-09-12 Jambunathan K <kjambunathan@novell.com>
22559 * reflection.c (mono_param_get_objects): Modified to return
22560 ParameterInfo.DefaultValue object.
22562 (get_default_param_value_blobs):
22563 (mono_get_object_from_blob):
22564 (mono_get_dbnull_object): New helper routines.
22566 * object.c (mono_get_constant_value_from_blob): New helper routine
22567 carved out from get_default_field_value ()
22569 * object-internals.h (mono_get_constant_value_from_blob): Added
22570 function declaration.
22572 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
22574 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
22575 referenced assemblies. Fixes #62135.
22577 * exception.h exception.c (mono_get_exception_file_not_found2): New
22580 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
22582 * class.h class.c: Add mono_type_get_underlying_type ().
22584 2004-09-09 Geoff Norton <gnorton@customerndna.com>
22586 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
22587 Fix GetTypes() to support dynamically created assemblies.
22589 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
22591 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
22593 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
22596 * reflection.h reflection.c loader.c: Allow dynamic construction of
22597 pinvoke methods. Fixes #65571.
22599 * reflection.c (mono_reflection_get_type): Revert previous change since
22600 it causes regressions.
22602 2004-09-08 Martin Baulig <martin@ximian.com>
22604 * class.c (class_compute_field_layout): Don't call
22605 mono_class_layout_fields() for open generic instances.
22607 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
22608 * threads.c appdomain.c: fix typo in GC macro
22610 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22612 * threads.c: don't call mono_thread_detach() in start_wrapper(),
22613 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
22615 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
22617 * image.c (mono_image_close): Applied patch from
22618 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
22619 assembly is loaded multiple times from data.
22621 * image.c (mono_image_open): Fix warning.
22623 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22625 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
22626 once. Fixes #58334.
22628 * reflection.c (mono_reflection_create_runtime_class): Initialize
22629 klass->nested_classes. Fixes #61224.
22631 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22633 * threads.c: sched_yield() on exit, to allow threads to quit.
22635 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22637 * object.c (mono_unhandled_exception): Remove leftover debug code.
22639 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
22641 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
22643 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
22645 * marshal.c (emit_marshal_array): Really null terminate string arrays.
22647 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
22649 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22651 * marshal.c (emit_marshal_array): Null terminate string arrays.
22653 * marshal.c (raise_auto_layout_exception): Fix warning.
22655 * reflection.c (mono_param_get_objects): Initialize the default value
22656 with DBNull.Value, not null. Fixes #62123.
22658 2004-09-01 Miguel de Icaza <miguel@ximian.com>
22660 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
22661 throw an exception with a cute explanation.
22663 2004-09-06 Dick Porter <dick@ximian.com>
22665 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
22666 Close the new process's thread handle, as we don't use it. The
22667 handle stays around forever otherwise.
22669 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22671 * object.c (arith_overflow): Fix warning.
22673 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
22674 calling conventions in method refs. Fixes #65352.
22676 * reflection.c: Fix warnings.
22678 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22680 * icall.c: Add a new icall for Array.Clear
22682 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
22684 * object.c: When allocating an array, we have to throw
22685 an overflow exception if any of the lengths are < 0.
22687 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
22689 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
22690 properly. Also move implementation of string array marshalling to
22691 managed code. Fixes #42316.
22693 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22695 * assembly.c: provide more information when loading an assembly fails.
22697 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22699 * filewatcher.c: don't expect the development fam package to be
22702 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
22704 * marshal.c: Make a copy of the signature cookie since it will be
22705 freed by the caller.
22707 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
22709 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
22711 * metadata.c (mono_metadata_free_marshal_spec): New function to free
22714 * marshal.c: More refactoring.
22716 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
22719 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
22721 * object.c: In mono_message_invoke, fill the output parameter array after
22722 calling the managed method (it was done before the call). This fixes
22725 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22727 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
22730 2004-09-02 Martin Baulig <martin@ximian.com>
22732 * class.c (mono_class_instance_size): Don't allow generic type
22733 definitions or open generic instances.
22734 (mono_class_array_element_size): If we're a value type, call
22735 mono_class_instance_size() on the original class.
22737 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
22738 handle generic instances.
22740 * mono-debug-debugger.c (write_type): Handle generic instances
22743 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
22745 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
22746 the allocation request fails. Fixes #65089.
22748 * object.c (mono_runtime_free_method): Do not call mono_free_method.
22750 * object.c (mono_runtime_free_method): New function to free a dynamic
22753 * marshal.c (mono_delegate_free_ftnptr): New function to free the
22754 delegate trampoline.
22756 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
22757 with hasthis as dynamic,
22759 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
22761 * domain.c (mono_jit_info_table_remove): New function to remove an
22762 entry from the jit info table.
22764 * class-internals.h (MonoMethod): Add 'dynamic' field.
22766 * loader.c: Fix warnings.
22768 2004-09-01 Martin Baulig <martin@ximian.com>
22770 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
22771 instead of mono_debugger_lock() because the latter one is a no-op
22772 unless running in the debugger.
22774 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
22776 * class.c (class_compute_field_layout): Classes with auto-layout or
22777 reference fields are not blittable.
22779 2004-09-01 Dick Porter <dick@ximian.com>
22781 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
22782 mono_image_get_filename() to get the assembly location.
22785 * metadata.h: Fix compile warnings
22787 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
22789 * class.c (class_compute_field_layout): System.Object is blittable.
22791 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
22792 as in/out. Fixes #59909.
22794 2004-09-01 Martin Baulig <martin@ximian.com>
22796 * metadata.h (MONO_TYPE_ISREFERENCE): Call
22797 mono_metadata_generic_inst_is_valuetype() if we're a generic
22798 instance to check whether our underlying type is a reference type.
22800 2004-09-01 Martin Baulig <martin@ximian.com>
22802 * metadata.c (mono_type_size): If we're a generic instance, call
22803 mono_class_value_size() for value types.
22805 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
22807 * marshal.c: Implement more custom marshalling functionality. Fixes
22810 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22812 * mono-debug.c, debug-mono-symfile.c: add some locking love.
22814 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
22816 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
22818 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
22820 * icall.c: Fix some warnings.
22822 * threads.c (abort_appdomain_thread): Fix unref errors.
22823 (mono_thread_current): Fix THREAD_DEBUG define.
22825 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
22827 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
22829 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
22831 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
22833 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
22836 2004-08-28 Martin Baulig <martin@ximian.com>
22839 (mono_metadata_generic_inst_is_valuetype): New public function.
22841 * metadata.h (MONO_TYPE_ISSTRUCT): Call
22842 mono_metadata_generic_inst_is_valuetype() if we're a generic
22843 instance to check whether our underlying type is a valuetype.
22845 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
22847 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
22850 2004-08-25 Martin Baulig <martin@ximian.com>
22852 * loader.c (mono_get_method_from_token): Abstract methods can also
22853 be generic and thus have type parameters.
22855 * metadata-internals.h
22856 (MonoDynamicImage): Added `GPtrArray *gen_params'.
22858 * reflection.c (mono_image_get_generic_param_info): Don't create a
22859 metadata row, just add an entry to the `gen_params' array.
22860 (build_compressed_metadata): Sort the `gen_params' array and then
22861 actually create the metadata.
22863 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22865 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
22867 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
22869 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
22871 2004-08-24 Martin Baulig <martin@ximian.com>
22873 * class.cs (mono_class_is_subclass_of): Like an interface, a
22874 generic instance also derives from System.Object.
22876 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
22878 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
22879 custom modifiers to be in any order. Fixes #61990.
22881 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
22883 * object.c: Register mono_object_new_fast icall.
22885 * object.c (mono_class_get_allocation_ftn): Return to calling
22886 mono_object_new_fast, since it seems faster to compute the object
22887 size in unmanaged code than passing it as a parameter.
22889 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
22891 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
22892 this function with Boehm as the oom handler, so we don't have to check
22893 the result of GC_malloc.
22895 * object.c: Remove checks for oom.
22897 * object.h object.c (mono_class_get_allocation_ftn): New function to
22898 return the icall which can be used to allocate an instance of a given
22901 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
22903 * class-internals.h: Add 'enabled' field.
22905 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
22907 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
22909 2004-08-18 Jambunathan K <kjambunathan@novell.com>
22910 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
22913 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
22915 * appdomain.c: use the Tls function for appdomain too,
22916 at Zoltan's request. Actually return in mono_context_get
22918 * appdomain.c, profiler.c, threads.c: use __thread
22920 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
22922 * appdomain.c threads.c: Call GC_CreateThread on windows.
22924 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
22925 multiple libraries since this don't work on windows.
22927 2004-08-18 Martin Baulig <martin@ximian.com>
22929 * class-internals.h
22930 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
22933 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
22934 MonoMethodNormal since we also need it for abstract and interface
22938 (build_compressed_metadata): Sort the GenericParam table.
22939 (mono_image_create_token): Added `gboolean create_methodspec'
22940 argument; this is false when generating a MethodImpl token.
22941 (reflection_methodbuilder_to_mono_method): Abstract and interface
22942 methods may also have generic parameters.
22944 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
22946 * appdomain.c: thread local alloc
22948 2004-08-17 Martin Baulig <martin@ximian.com>
22950 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
22953 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
22956 * class.c (mono_type_get_full_name): New public function.
22957 (mono_type_get_name): Don't include the type arguments.
22959 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
22961 * Makefile.am: Build static versions of libmetadata and libmonoruntime
22962 for inclusion into the mono executable.
22964 2004-08-16 Martin Baulig <martin@ximian.com>
22966 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
22967 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
22969 2004-08-14 Martin Baulig <martin@ximian.com>
22971 * class.c (dup_type): Also copy the `byref' field.
22973 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
22975 * reflection.c (create_dynamic_mono_image): Revert the last change
22976 since it breaks bootstrap.
22978 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
22980 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
22982 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
22983 not free them with g_free.
22985 2004-08-11 Martin Baulig <martin@ximian.com>
22987 * reflection.c (mono_reflection_setup_internal_class): Also call
22988 mono_class_setup_mono_type() if we already have a `tb->type.type'.
22990 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
22992 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
22993 called during default (first) AppDomain creation. Keep track of
22994 Evidence when loading assemblies.
22996 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22998 * opcodes.c, opcodes.h: reduce runtime relocations.
23000 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
23002 * culture-info.h, locales.c: fixes and chages to sue the new
23003 optimized format of the locale data.
23004 * culture-info-tables.h: regenerated.
23006 2004-08-06 Geoff Norton <gnorton@customerdna.com>
23008 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
23010 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
23012 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
23013 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
23014 * domain-internals.h: icall declaration.
23015 * icall.c: icall registration.
23016 * object-internals.h: New fields in MonoAssembly for CAS.
23018 2004-08-05 Duncan Mak <duncan@ximian.com>
23020 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
23023 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23025 * reflection.c: fix to deal with object[] arrays in custom ctors
23028 2004-08-05 Martin Baulig <martin@ximian.com>
23030 * class.c (mono_class_array_element_size): Added support for
23031 generic instances and correctly handle "recursive" types.
23033 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
23035 * assembly.c: Fix warnings.
23037 2004-08-04 Martin Baulig <martin@ximian.com>
23040 (mono_type_get_name_recurse): Added `gboolean include_arity'
23041 argument specifying whether or not we should include the generic
23042 arity in the type name.
23043 (_mono_type_get_name): New static function.
23044 (mono_class_setup_vtable): If we're a generic instance, don't
23045 include the generic arity in the names of explicit method
23048 2004-08-03 Martin Baulig <martin@ximian.com>
23050 * class.c (mono_type_get_name_recurse): Enclose the generic type
23051 arguments in `<', '>'.
23053 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23055 * gc.c: make GC warning messages use the trace API, they are just
23056 noise to most of the users.
23058 2004-08-03 Martin Baulig <martin@ximian.com>
23060 * debug-mono-symfile.c (read_string): Correctly read the string.
23062 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
23064 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
23066 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
23068 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
23070 2004-07-30 Martin Baulig <martin@ximian.com>
23072 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
23073 Reflect latest symbol writer changes.
23075 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
23077 * object.c: always create an object if null is passed
23078 to Invoke() where a valuetype is expected.
23080 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
23082 * marshal.c (mono_marshal_init): make managed
23083 signatures match native ones better for 64bits.
23085 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23087 * appdomain.c: hack to build correctly the private bin path on windows.
23090 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
23092 * assembly.c: Load mscorlib from the correct framework directory
23093 (mono/<version>/mscorlib.dll).
23094 * appdomain.h: Added prototypes for new functions.
23095 * internals.h: Added some prototypes.
23096 * domain.c: When initializing the runtime, get from the executable and
23097 the configuration files the runtime version that the app supports.
23098 Added support methods for reading app.exe.config. Added list of versions
23099 supported by the JIT. Added two new methods: mono_init_from_assembly,
23100 which initializes the runtime and determines the required version from
23101 the provided exe file, and mono_init_version, which initializes
23102 the runtime using the provided version.
23103 * icall.c: Get machine.config from version-specific directory.
23104 * reflection.c: When generating an image, embed the version number
23105 of the current runtime.
23107 2004-07-28 Dick Porter <dick@ximian.com>
23110 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
23111 returned sockaddr size before creating the remote address object.
23112 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
23115 2004-07-28 Dick Porter <dick@ximian.com>
23117 * locales.c (string_invariant_compare_char): Fix invariant char
23118 compares between upper and lower cases. Fixes bug 61458.
23120 2004-07-27 Ben Maurer <bmaurer@ximain.com>
23122 * marshal.c: actually cache stelem.ref wrappers.
23124 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
23126 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
23127 sections and remove the mono_cli_rva_map () function.
23129 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23131 * debug-mono-symfile.c: fix one more endianess issue, from a patch
23132 by Geoff Norton (<gnorton@customerdna.com>).
23134 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23136 * class.c: fix class loads for pointer types (typeof(int) !=
23139 2004-07-27 Martin Baulig <martin@ximian.com>
23141 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
23142 reading the debugging information from an external ".mdb" file.
23144 2004-07-24 Martin Baulig <martin@ximian.com>
23146 * reflection.c (mono_image_get_type_info): Only write a class
23147 layout entry if we actually have a size or a packing size.
23149 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
23151 * reflection.c (type_get_fully_qualified_name):
23152 insert cast to get type checking of ?: with non-gcc compilers
23154 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
23156 * rand.c: use g_getenv for both lookups of
23159 2004-07-17 Martin Baulig <martin@ximian.com>
23161 * reflection.c (mono_reflection_bind_generic_method_parameters):
23162 Set `gmethod->reflection_info'.
23164 2004-07-17 Martin Baulig <martin@ximian.com>
23166 * class.c (mono_class_create_from_typedef): Insert the newly
23167 created class into the hash table before computing the interfaces
23168 since we could be called recursively.
23170 2004-07-16 Ben Maurer <bmaurer@ximain.com>
23172 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
23173 function to implement stelem.ref in managed code
23174 * class-internals.h, debug-helpers.c: a new wrapper type
23177 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
23179 * gc.c: allow GC handles to work even when no GC is compiled in.
23180 Fix part of bug #61134 (GetAddrOfPinnedObject).
23182 2004-07-13 Peter Williams <peter@newton.cx>
23184 * process.c (complete_path): Make sure we don't attempt to execute
23187 2004-07-12 Geoff Norton <gnorton@customerdna.com>
23189 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
23190 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
23191 and will add/subtract the hour if needed
23193 2004-07-12 Martin Baulig <martin@ximian.com>
23195 * reflection.c (mono_field_get_object): If we have
23196 `field->generic_info', take the attributes from
23197 `field->generic_info->generic_type'.
23199 2004-07-12 Martin Baulig <martin@ximian.com>
23201 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
23202 This function must be called before initializing the runtime.
23203 (mono_debug_init_1): New function; call this after initializing
23204 the runtime, but before loading the assembly. It tells the
23205 debugger to load corlib and the builtin types.
23207 * mono-debug-debugger.c: Did some larger changes in the debugging
23208 code; support recursive class declarations, make sure we actually
23211 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23213 * debug-helpers.c: undo my previous patch and fixed the real issue in
23214 ../mini/exceptions-x86.c
23216 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23218 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
23219 when no HOME env. variable was set and a NullRef was thrown in a .cctor
23220 called from other .cctors.
23222 2004-07-09 Miguel de Icaza <miguel@ximian.com>
23224 * loader.c: Removed the mono_loader_wine_init hack now that we are
23225 doing a managed version of Windows.Forms.
23227 2004-07-09 Ben Maurer <bmaurer@ximian.com>
23229 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
23230 threadpool.c, threads.c: remove static data from rootset.
23232 2004-07-09 Dick Porter <dick@ximian.com>
23234 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
23235 Don't do any more processing if the matched length was 0. It was
23236 increasing the size of the string before. Fixes bug 61167.
23238 2004-07-09 Dick Porter <dick@ximian.com>
23242 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
23243 Add support for SO_PEERCRED if its available.
23245 2004-07-09 Peter Bartok <pbartok@novell.com>
23246 * loader.c: winelib.exe.so error message is now only displayed if
23247 MONO_DEBUG is set. To help us avoid questions when people are trying
23248 out the new Managed.Windows.Forms.
23250 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
23252 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
23253 for isinst and castclass wrappers.
23255 * class-internals.h icall.c: Move registration and lookup of JIT icalls
23256 to libmetadata from the JIT, so they could be used by the marshalling
23257 code and the interpreter.
23259 * marshal.c: Register marshalling related JIT icalls here instead of
23260 in mini.c. Use CEE_MONO_ICALL instead of the family of
23261 CEE_MONO_PROC<x> opcodes to call marshalling functions.
23263 * metadata.h: Remove unneeded marshalling conversions.
23265 * opcodes.c: Update for new opcodes.
23267 2004-07-08 Martin Baulig <martin@ximian.com>
23269 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
23270 (mono_debug_get_domain_data): Make this function static.
23272 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23274 * gc.c, object.h: add nice GC handle API for embedders.
23276 2004-07-06 Ben Maurer <bmaurer@ximian.com>
23278 * reflection.c: more changes for the new api
23280 * object.c: When we reflect on a field w/ a constant value, it
23281 will not have a memory location, so we must access metadata. Also,
23282 allow easier reading of strings so that we can read them from
23285 * class.c (mono_class_layout_fields): no need for literal fields here.
23287 * class-internals.h: api changes for const fields
23289 * icall.c (ves_icall_get_enum_info): use new apis for const fields
23291 2004-07-06 Martin Baulig <martin@ximian.com>
23293 * mono-debug.h: Increment version number to 44.
23295 * mono-debug.c (mono_debug_add_wrapper): The second argument is
23296 now a gpointer, rewrote this whole method.
23298 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
23299 function. Add information about the wrapper in a new "misc table".
23301 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
23302 for the new misc table.
23304 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
23306 * metadata-internals.h image.c: Add a cache for helper signatures.
23308 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
23310 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
23312 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
23313 delegates from a delegate. Fixes #61033.
23315 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
23316 marshalling of stringbuilder arrays. Fixes #59900.
23318 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
23320 * icall.c: Add EnumBuilder:setup_enum_type icall.
23322 2004-06-30 Ben Maurer <bmaurer@ximian.com>
23324 * icall.c: Added a new icall for the property version of
23325 OffsetOfStringData.
23327 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
23329 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
23330 it has a constant size across platforms.
23332 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
23335 2004-06-29 Martin Baulig <martin@ximian.com>
23337 * mono-debug.c (mono_debug_add_method): Protect the whole function
23338 in mono_debugger_lock(), not just parts of it.
23340 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
23342 * reflection.c: make sure padding bytes in heaps are zeroed.
23344 2004-06-24 David Waite <mass@akuma.org>
23346 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
23347 image.c, loader.c, locales.c, marshal.c, metadata.c,
23348 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
23349 string-icalls.c, threads.c: change to C90-style comments from C99 /
23352 2004-06-24 Dick Porter <dick@ximian.com>
23355 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
23356 return createdNew. Fixes bug 60412.
23359 * icall.c: Add createdNew parameter to CreateMutex icall
23361 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23363 * reflection.c, object-internals.h: save default value in params.
23365 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23367 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
23368 no need to build a new path combining that with the application base.
23371 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
23373 * reflection.c: fixed minor standard compliance issues.
23375 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23377 * reflection.c: fixed issue with encoding some custom attributes
23378 (arrays in properties and fields, bug #60411).
23380 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23382 * reflection.c: fix start address when copying the public key token.
23384 2004-06-23 Martin Baulig <martin@ximian.com>
23386 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
23387 the `exc' object in a static object to put it into the GC's root set.
23389 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
23391 * reflection.c: make mono_reflection_setup_internal_class ()
23392 callable a second time to setup a new parent class.
23394 2004-06-23 Dick Porter <dick@ximian.com>
23396 * threads.c: Check for WAIT_IO_COMPLETION return values.
23398 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
23400 * appdomain.c: Removed the g_free on the public key token. Now copy
23401 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
23402 * assembly.c: Added public key token string value when loading
23403 assemblies. Fix bug #60439.
23404 * icall.c: Added missing informations (like public key) in
23405 GetReferencedAssemblies. Fix #60519.
23406 * image.h: Changed definition for public key token from const char*
23407 public_tok_value to guchar public_key_token [17];
23408 * reflection.c: Updated for changes to public key token.
23410 2004-06-22 Lluis Sanchez Gual
23412 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
23413 for the field in base classes.
23415 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23417 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
23418 mark headers as not supported, they are installed only for use by the
23421 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
23423 * *.c, *.h: avoid namespace pollution in public headers.
23425 2004-06-21 Martin Baulig <martin@ximian.com>
23427 * exception.c (mono_get_exception_security): It's in
23428 "System.Security", not in "System".
23430 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
23431 the exception classes.
23433 2004-06-21 Martin Baulig <martin@ximian.com>
23435 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
23436 Protect the exception object from being finalized.
23438 2004-06-21 Martin Baulig <martin@ximian.com>
23440 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
23443 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
23445 * reflection.c: Load the assembly in mono_reflection_type_from_name,
23446 if it was not loaded before. Fix parts of #60439.
23448 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
23450 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
23451 code that was broken since Ben's change: wrappers are now
23452 dependent on the method signature only again.
23454 2004-06-21 Martin Baulig <martin@ximian.com>
23456 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
23457 added interface support.
23459 2004-06-21 Martin Baulig <martin@ximian.com>
23461 * class.c (mono_vtable_get_static_field_data): New public method.
23463 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
23465 * filewatcher.c : Windows build fix to be compliant with API changes.
23467 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23469 * class.h, class.c: more accessors.
23470 * metadata.h, metadata.c: prepare for hiding MonoType and
23471 MonoMethodSignature: people should use the accessors from now on
23472 outside of the tree.
23474 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23476 * *.c, *.h: more API cleanups.
23478 2004-06-18 Jackson Harper <jackson@ximian.com>
23480 * assembly.c: Trace loading assemblies.
23481 * loader.c: Trace loading native libraries.
23482 * mono-config.c: Trace loading config files.
23484 2004-06-18 Dick Porter <dick@ximian.com>
23486 * locales.c: Tell ICU the lengths of strings, it can cope with
23487 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
23489 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
23491 * image.c: swapped name/filename;
23493 2004-06-18 Martin Baulig <martin@ximian.com>
23495 * mono-debug-debugger.c (write_class): Write the parent class at
23496 the end of the header.
23498 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23500 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
23502 2004-06-17 Raja R Harinath <rharinath@novell.com>
23504 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
23505 (bundle_obj): New conditional define.
23506 (BUILT_SOURCES): Remove.
23507 ($(bundle_srcs)): Make parallel-make safe.
23508 (libmonoruntime_la_LIBADD): Make unconditional.
23509 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
23510 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
23512 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
23514 * culture-info-tables.h: It was inconsistent with the latest
23517 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
23519 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
23522 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
23525 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23527 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
23528 cleaned up public header threads.h.
23530 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23532 * Makefile.am, *.c, *.h: more API cleanups.
23534 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23536 * Makefile.am: removed monosn from compilation.
23537 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
23538 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
23539 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
23540 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
23541 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
23542 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
23544 2004-06-15 Jackson Harper <jackson@ximian.com>
23546 * assembly.c: Make locales lower case when searching the GAC for
23547 assemblies. gacutil will always make locales lowercase when
23548 installing so this effectively makes them case insensitive.
23550 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
23552 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
23553 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
23554 parameter which allows to choose whether the wait can be interrupted or
23555 not. Also added the method mono_monitor_enter(), which locks the monitor
23556 using an infinite wait and without allowing interruption.
23557 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
23559 * object.h: Added new fields in MonoThread. suspend_event holds the event
23560 used to susped/resume the thread. synch_lock is the lock object to use for
23561 modifying the thread state.
23562 * threads.c: Use the new synch_lock object for locking, instead of "this",
23563 which can generate deadlocks.
23564 Moved thread state change in Thread.Sleep and Thread.Join from managed
23565 to unmanaged code. This avoids a deadlock when the thread was suspended
23566 just after acquiring the thread lock.
23567 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
23568 Implemented Thread.Suspend using an event instead of ThreadSuspend,
23569 which is not fully implemented in the io-layer.
23570 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
23572 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
23574 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
23575 threads-types.h: more API cleanups.
23577 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23579 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
23580 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
23581 threadpool.c, threads.c: first pass at the exported API cleanup.
23583 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23585 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
23587 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23589 * icall.c: added internalGetHome.
23591 2004-06-14 Dick Porter <dick@ximian.com>
23593 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
23594 possible to return successfully when '.' or '..' were the only
23595 entries in a directory, but were skipped. The MonoIOStat was not
23596 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
23599 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23601 * reflection.c: make binaries run on .Net 1.1 by default.
23603 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
23605 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
23607 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
23609 * marshal.c: keep track of struct size with explicit layout
23612 2004-06-12 Martin Baulig <martin@ximian.com>
23614 * mono-debug-debugger.c: Comment out a debugging g_message().
23616 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23618 * reflection.c, reflection.h: do not free custom attrs that are cached.
23619 * icall.c: use braces to make code clearer.
23621 2004-06-11 Martin Baulig <martin@ximian.com>
23623 * class.h (MonoInflatedField): New type.
23624 (MonoClassField): Replaced `MonoType *generic_type' with
23625 `MonoInflatedField *generic_info'.
23628 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
23630 2004-06-11 Martin Baulig <martin@ximian.com>
23632 * reflection.c (mono_image_create_method_token): Correctly encode
23635 2004-06-11 Martin Baulig <martin@ximian.com>
23637 * metadata.c (mono_metadata_parse_method_signature): When parsing
23638 a MethodDef which has VarArgs, also set sentinelpos if we don't
23639 have any parameters.
23641 2004-06-11 Martin Baulig <martin@ximian.com>
23643 * verify.c (mono_method_verify): In CEE_CALL, use
23644 mono_method_get_signature() to get the method's signature, unless
23645 we're a PInvoke method.
23647 2004-06-10 Jackson Harper <jackson@ximian.com>
23649 * assembly.c: Use <path>/lib/mono/gac for the extra paths
23650 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
23651 logical name as the supplied path is just a prefix to the gac not
23652 the direct path to it.
23654 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
23656 * reflection.c: make the token for a created method match
23657 the token of the MethodBuilder it was created from
23658 (IKVM requires this behaviour now).
23660 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
23662 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
23663 reflection.c, socket-io.c: leak fixes.
23665 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23667 * icall.c: handle sentinel pos in vararg methods in position different
23670 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23672 * culture-info-tables.h: freshly generated.
23674 2004-06-09 Martin Baulig <martin@ximian.com>
23676 * loader.c (mono_get_method_constrained): Call `mono_class_init
23677 (constrained_class)'.
23679 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
23681 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
23682 any methods. Fixes #59629.
23684 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23686 * culture-info-tables.h: reflecting locale-builder updates.
23688 2004-06-08 Dick Porter <dick@ximian.com>
23691 * locales.c: Fixed compile warnings, including a real bug in
23692 CompareInfo_internal_compare.
23694 2004-06-08 Dick Porter <dick@ximian.com>
23697 (ves_icall_System_Globalization_CompareInfo_internal_index):
23698 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23699 Double-check the resuls of usearches, because ICU currently
23700 ignores most of the collator settings here. Fixes bug 59720.
23702 2004-06-08 Dick Porter <dick@ximian.com>
23705 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23706 Fix memory leak and segfault-causing typo. No idea how this one
23707 lasted so long without being noticed.
23709 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
23711 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
23712 any methods. Fixes #59629.
23714 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23717 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
23718 own the critical section before). Removed dead code (that's done
23719 in the preload hook).
23721 (mono_assembly_load_with_partial_name): call the preload hook.
23723 2004-06-08 Martin Baulig <martin@ximian.com>
23725 * metadata.c (mono_metadata_signature_alloc): Default
23726 `sentinelpos' to -1.
23728 * reflection.c (mono_image_get_array_token): Likewise.
23730 2004-06-08 Martin Baulig <martin@ximian.com>
23732 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
23734 * metadata.c (mono_metadata_parse_method_signature): When parsing
23735 a MethodDef which has VarArgs, set sentinelpos.
23737 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
23738 `gint16' since we're using -1 for non-varargs methods.
23741 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
23742 (method_encode_signature): Added varargs support.
23743 (method_builder_encode_signature): Likewise.
23744 (mono_image_get_varargs_method_token): New static method.
23745 (mono_image_create_method_token): New public method; this is
23746 called via an icall instead of mono_image_create_token() when
23747 calling a varargs method.
23749 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
23751 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
23753 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23755 * culture-info-tables.h : Reflecting the latest locale-builder that
23756 fixed empty array representation ({} to {0}).
23758 2004-06-07 Jackson Harper <jackson@ximian.com>
23760 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
23761 looking up extra gac paths. This allows MONO_GAC_PATH to act
23762 exactly like a prefix.
23764 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
23766 * reflection.c (mono_reflection_type_from_name): Make a copy of the
23767 type name before modifying it. Fixes #59405.
23769 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
23771 * culture-info.h: added fields for "all datetime patterns".
23772 * locales.c: ( ves_icall_System_Globalization_CultureInfo
23773 _construct_datetime_format ()): fill xxx_patterns fields.
23774 * object.h: added fields for "all datetime patterns" to
23775 MonoDateTimeFormatInfo.
23776 * culture-info-tables.h: reflecting locale-builder updates.
23778 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
23780 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
23781 the event has no add and remove methods. Fixes #59629.
23783 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
23785 * object.c: Fixed possible integer overflow when allocating large
23788 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
23790 * culture-info-tables.h: reflecting locale-builder updates.
23792 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
23794 * culture-info-tables.h: reflecting locale-builder updates.
23796 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
23798 * culture-info-tables.h: reflecting locale-builder updates.
23800 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
23802 * threads.c: Made Thread.Sleep abortable.
23804 2004-06-02 Martin Baulig <martin@ximian.com>
23806 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
23808 * debug-mono-symfile.h: Bumped symbol file version number to 37.
23810 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
23812 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
23814 2004-05-30 Jackson Harper <jackson@ximian.com>
23816 * reflection.c: Do not hardcode assembly versions or public key
23817 tokens anymore. All of this except the corlib section was dead
23820 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
23822 * object.c (mono_runtime_invoke_array): Automatically create boxed
23823 objects for byref valuetypes if needed. Fixes #59300.
23825 * object.c (mono_method_return_message_restore): Handle
23826 MONO_TYPE_OBJECT as well.
23828 2004-05-28 Jackson Harper <jackson@ximian.com>
23830 * reflection.c: The modified type encoding was causing build
23831 problems. Reverted for now.
23833 2004-05-28 Jackson Harper <jackson@ximian.com>
23835 * reflection.c/h: Take an assembly ref so that we dont create
23836 fully qualified names when encoding types in the same assembly as
23837 the custom attribute being emitted.
23838 * appdomain.c: Increment version number.
23840 2004-05-26 Duncan Mak <duncan@ximian.com>
23843 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
23844 Set the full version number (major, minor, build, revision).
23846 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
23848 * marshal.c (emit_struct_conv): increment src/dst after blit
23849 (mono_marshal_get_managed_wrapper,
23850 mono_marshal_get_native_wrapper): make sure we have marshalling
23851 info before marshalling params (info computation affects
23854 * class.c (class_compute_field_layout): correctly deal with
23856 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
23857 value types (as per what windows dows by default)
23858 (mono_class_setup_mono_type): System.ValueType is blittable
23859 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
23862 * marshal.c (mono_marshal_load_type_info): flag types as
23863 non-blittable if the native layout doesn't match the managed
23866 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23868 * appdomain.c: don't add stuff in the private search path that is
23869 above the application base. If application base is not set, there's
23870 no private search path.
23872 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
23874 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
23875 byref struct arguments in native->managed marshalling.
23877 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
23879 * marshal.c (mono_marshal_get_runtime_invoke): correctly
23880 cache methods using signature (special case for methods
23881 that are value type or string class)
23883 * image.c (mono_image_close): clean up allocated GSList's
23884 in runtime_invoke_cache.
23886 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23888 * mono-config.c: set the correct path for mono_cfg_dir on windows when
23889 there's no MONO_CFG_DIR environment variable defined.
23891 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23893 * threads.c: windows version must be >= 0x0500 to include OpenThread.
23895 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
23897 * threadpool.c: Really wait for 500ms after the async call, even if the wait
23899 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
23900 before waiting for it, and call CloseHandle after the wait to unref it.
23901 This will make sure that handles are not disposed too early.
23903 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23908 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
23911 * object.c: se the application_base only for the domain that runs
23912 Main. Fixes bug #59216,
23914 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23917 * object.c: only the domain in which Main is run have
23918 SetupInformation.ConfigurationFile set, so moved a few lines from
23919 appdomain.c to object.c.
23921 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23923 * appdomain.c: we tried to load [name].(dll|exe), but according
23924 to bug #57710, we must also try [culture]/[name].(dll|exe) and
23925 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
23926 There's a test case attached to bug #58922.
23928 2004-05-27 Dick Porter <dick@ximian.com>
23931 * file-io.c: Implemented icalls for locking and unlocking regions
23933 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
23934 FALSE on error (fixes both compiler warning and real bug.)
23936 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
23938 * culture-info-tables.h: reflecting locale-builder updates.
23940 (Added missing ChangeLog entry for 05/26)
23942 2004-05-27 Jackson Harper <jackson@ximian.com>
23944 * locales.c: Fix some cut and paste errors.
23946 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23948 * mono-config.c: set the correct path for config. directory on windows.
23950 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
23952 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
23955 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
23957 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
23958 from pinvoke functions.
23960 * marshal.c (mono_ftnptr_to_delegate): Implement this.
23962 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
23964 * culture-info-tables.h: reflecting locale-builder updates.
23966 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
23968 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
23971 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
23973 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
23974 * icall.c: Modified icalls for RNG.
23975 * rand.c|h: Changed RNG interface to allow thread-safe usage under
23976 Windows (CryptoAPI).
23978 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
23980 * locales.c: Fix build.
23982 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
23984 * culture-info-tables.h: reflecting locale-builder updates.
23986 2004-05-25 Jackson Harper <jackson@ximian.com>
23988 * locales.c: When creating the current culture use the $LANGs
23989 specific culture. So DateTimeFormat and NumberFormat entries are created.
23991 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
23993 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
23994 a char array as parameter.
23996 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
23998 * image.c: In mono_image_open(), always use an absolute path name to
23999 look for already loaded images.
24001 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
24003 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
24004 missing in the windows build (like older cygwin include files).
24006 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
24008 * icall.c: Fixed check for possible integer overflow in Buffer_
24009 BlockCopy icall. Replaced comments style // by /* */.
24011 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
24013 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
24015 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
24016 check after MONO_VTADDR. Fixes pinvoke2.exe.
24018 * marshal.h marshal.c metadata.h: Add beginnings of support for
24019 ftnptr -> delegate marshalling.
24021 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
24023 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
24024 * threads.c: Fix warnings.
24026 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
24028 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
24029 * icall.c: Registered icalls for Suspend and Resume.
24030 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
24032 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
24033 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
24034 * process.c: Use WaitForSingleObjectEx.
24035 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
24037 * threads.c, threads.h: Make use of new Ex wait methods. Improved
24038 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
24039 for Suspend and Resume. Added new mono_thread_stop, used for stoping
24040 background threads. Added basic support for Abort in Windows.
24041 Start new threads using a managed delegate invoke wrapper. This wrapper
24042 has an interruption checkpoint that is needed since an interruption
24043 can be requested before the thread leaves the unmanaged code that starts
24045 * marshal.c: Added interruption checkpoint after every native call, and
24046 also before managed calls for wrappers called from unmanaged code to
24047 go into managed code.
24048 * object.h: Added new field in MonoThread to keep track of interruption
24051 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
24053 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
24056 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24063 * rand.c: getenv -> g_getenv (windows!)
24065 * process.c: complete_path is also used on non-windows platforms.
24067 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24069 * icall.c: new signature for Process_Start.
24071 * process.[ch]: new signature for Process_Start. If we're on windows
24072 and UseShellExecute is false, we have to search for the program by
24073 ourselves if we don't get a full path.
24075 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
24077 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
24078 marshalling and call CleanUpNativeData if needed. Fixes #58646.
24080 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24082 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
24085 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24087 * process.c: use double quotes to quote program name and arguments on
24088 windows. Fixes bug #58575.
24090 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24092 * file-io.c: don't return "." and ".." when using windows Find*File.
24094 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
24096 * marshal.c: Don't pass wrappers to message init because method
24097 addressed used to lookup metadata. part of remoting[2|3] fix.
24099 2004-05-15 Jackson Harper <jackson@ximian.com>
24101 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
24102 path is essentially the same as MONO_PATH except that it points to
24103 GACs instead of lib directories.
24104 * loader.h: The user gac is gone so we dont need function to
24106 * mono-config.c: user gac option is now gone.
24108 2004-05-15 Jackson Harper <jackson@ximian.com>
24110 * culture-info.h: Make defines more consistent, add calendar data
24111 to the culture info table.
24112 * culture-info-tables.h: Add basic calendar data. Basically
24113 everyone gets default gregorian until all the data is
24115 * locales.c: Use the new consistent defines. Set calendar data for
24116 culture info objects.
24117 * object.h: add a field for calendar data to CultureInfo
24119 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
24121 * image.c: image->runtime_invoke_cache is keyed on signatures now.
24122 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
24124 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
24125 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
24126 an extra param that is the pointer of the method to invoke. The IL for
24127 the invoke method is no longer specific to the method, but to the
24128 signature of the method. Thus, we can share the same code for multiple
24129 methods. This reduces the number of methods that have to be compiled.
24131 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
24133 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
24135 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
24137 * icall.c: Optimize Buffer.BlockCopy.
24139 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24141 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
24142 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
24143 quote). Changed them to "MMMM yyyy".
24145 2004-05-12 Miguel de Icaza <miguel@ximian.com>
24148 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
24150 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
24152 * reflection.h: Updated after changes to managed structures.
24154 * appdomain.c: Bump corlib version.
24156 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24158 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
24161 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24163 * Makefile.am: link to ../os/libmonoos.la on windows.
24166 -If MONO_DEBUG, warn about non-existing directories in
24168 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
24169 compile time variable.
24170 -Removed init_default_path and call mono_set_rootdir from
24171 libmonoos.a instead (windows only).
24173 * assembly.h: declare mono_assembly_getrootdir().
24176 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
24178 * loader.c: s/getenv/g_getenv/
24180 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
24182 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
24184 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
24186 * metadata.h: Add new marshalling conversions.
24188 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
24191 * reflection.c (mono_reflection_get_type): Lookup the type in all
24192 modules of a multi-module assembly. Fixes #58291.
24194 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
24196 * threads.c: Before aborting a background, set the StopRequested
24197 state. This avoids throwing the Abort exception.
24198 In mono_thread_manage, don't continue with the shutdown until all
24199 aborted threads have actually stopped.
24201 2004-05-10 Jackson Harper <jackson@ximian.com>
24203 * locales.c: Remove the modifier from culture names.
24205 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24207 * Makefile.am: monosn is not installed any more. It has been deprecated
24210 2004-05-07 Jackson Harper <jackson@ximian.com>
24213 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
24214 Fix array construction, add bailout if the length is 0.
24216 2004-05-07 Dick Porter <dick@ximian.com>
24218 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
24219 machine doesn't have a DNS entry. Patch by Urs Muff
24220 (umuff@quark.com), fixes bug 57928.
24222 2004-05-06 Jackson Harper <jackson@ximian.com>
24224 * reflection.c: Handle null PublicTokens properly. alloc mem for
24225 assembly names culture so we dont crash when freeing it.
24227 2004-05-06 Jackson Harper <jackson@ximian.com>
24229 * assembly.c: Check the usergac when loading with partial names.
24231 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
24233 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
24234 does nothing for now (not required for Linux/Windows) but the class
24235 library can call it (and a newer or modified runtime could need it).
24236 * icall.c: Registred icall.
24238 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24240 * loader.c: prints a message on module loading error we set MONO_DEBUG
24241 environment variable.
24243 2004-05-05 Jackson Harper <jackson@ximian.com>
24245 * appdomain.c: Handle PublicKeyToken=null properly.
24247 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
24249 * environment.c|h: Added icall ves_icall_System_Environment_
24250 GetOSVersionString to get the current OS version as a string.
24251 * icall.c: Registred icall.
24253 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
24255 * object.c: in mono_object_get_virtual_method(), take into account that
24256 non-virtual methods don't have a slot in the vtable. Check needed when
24257 the object is a proxy.
24259 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
24261 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
24262 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
24264 * object.c (mono_class_compute_gc_descriptor): Fix warning.
24266 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
24267 passed when a valuetype is expected.
24269 * object.c (mono_unhandled_exception): Only set the exit code if the
24270 exception happens in the main thread. Fixes thread5.exe.
24272 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
24273 invalid names. Fixes #58047.
24275 2004-05-03 Jackson Harper <jackson@ximian.com>
24277 * assembly.c: This line was committed accidently and is unneeded.
24279 2004-05-03 Jackson Harper <jackson@ximian.com>
24281 * icall.c: Add new icall for Assembly::LoadWithPartialName
24282 * assembly.c/.h: new function that probes the GAC to load partial
24283 assembly names by Paolo Molaro.
24285 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24287 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
24288 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
24289 (type_get_fully_qualified_name): Added PublicKeyToken when building a
24292 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24294 * appdomain.c: fixed check for 'neutral' culture and removed warning.
24295 * reflection.c: fix bug when parsing a full type name and Version is not
24296 the last thing in the string.
24298 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
24300 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
24301 crashes when it is freed.
24303 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24305 * assembly.c: print the compat warning to stderr.
24307 2004-05-01 Miguel de Icaza <miguel@ximian.com>
24309 * assembly.c (mono_assembly_load_references): Add a compatibility
24310 hack to run old applications that might be still referencing the
24311 3300-based assemblies, only do this for System.xxx.
24313 2004-05-01 Jackson Harper <jackson@ximian.com>
24315 * appdomain.c: If the culture is neutral we set it to "".
24317 2004-04-29 Jackson Harper <jackson@ximian.com>
24319 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
24321 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
24323 * string-icalls.c: added low overhead function for copying chars
24324 * icall.c: added needed icall for the above function
24326 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24328 * icall.c: fix return value of get_global_assembly_cache. Implemented
24329 Environment.GetLogicalDrives.
24331 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
24333 * rand.c: try and talk to egd or prngd
24334 for random bytes if opening devices fail.
24336 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
24338 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
24339 alignment for the type using the native alignment of its members
24340 instead of using klass->min_align.
24342 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
24344 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24347 * socket-io.c: added check for sys/aio.h.
24349 2004-04-28 Dick Porter <dick@ximian.com>
24351 * threads.c: Don't abort a thread thats already aborting, when
24352 terminating everything.
24354 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24356 * icall.c: added 2 new async calls for Socket.
24358 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
24359 IO on *nix systems.
24361 * threadpool.c: removed unused variable.
24363 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
24365 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
24367 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
24369 * locales.c: put back string_invariant_tolower () and
24370 string_invariant_toupper ().
24372 2004-04-26 David Waite <mass@akuma.org>
24377 * unicode.h: remove comma from end of enumeration declarations
24379 2004-04-26 David Waite <mass@akuma.org>
24381 * debug-mono-symfile.h:
24384 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
24387 2004-04-26 Jackson Harper <jackson@ximian.com>
24389 * appdomain.c: Increment version number.
24391 2004-04-26 Jackson Harper <jackson@ximian.com>
24393 * appdomain.c: Set assembly references public token value when
24394 PublicKeyToken is specified, not the hash_value. Free public token
24395 values when free assembly name data. Previously the public key
24396 token was hex decoded, however we are using hex encoded public key
24397 tokens, so this is not neccasary.
24398 * assembly.c: Lookup assemblies in the gac if their public token
24399 value is set. Add function to allow enabling user gac
24400 lookups. Specify whether or not the assembly was loaded from the
24401 GAC. Compare full assembly names when checking the cache for
24402 assemblies (Temporarily disabled see comment in code). Remove
24403 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
24404 specifies trace-loader they get extra info to stdout on the
24405 loading of assemblies.
24406 * image.h: Add a field for an assembly references public token
24407 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
24408 whether an assembly has been loaded from the GAC.
24409 * image.c: Remove a corlib -> mscorlib name mapping.
24410 * loader.h: Add function to enable/disable the user gac.
24411 * mono-config.c: Check if the usergac is enabled in the config
24413 * icall.c: New icall to determine whether or not an assembly has
24414 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
24415 * tabldefs.h: Add constant for assemblyref flag that specifies a
24416 full public key is used instead of a public token.
24417 * reflection.c: Remove mscorlib -> corlib mappings. Set
24418 PublicTokenValue instead of hash value. This value is a hex
24419 string so it does not need to be expanded.
24421 2004-04-26 Martin Baulig <martin@ximian.com>
24423 * mono-debug-debugger.c (mono_debugger_initialize): Set
24424 `mono_debugger_initialized' before calling mono_debug_lock().
24426 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
24428 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
24429 InternalToUpper/InternalToLower.
24430 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
24431 removed invariant culture shortcut. This is now done in managed code.
24432 * locales.c: (string_invariant_toupper/tolower) removed.
24434 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24436 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
24437 Added Poll internal call.
24439 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
24440 call for Poll. Select was too heavy for polling a single socket.
24442 * threadpool.[ch]: added mono_threadpool_cleanup.
24443 * threads.c: use it. Don't use Thread_Abort on windows.
24445 2004-04-23 Martin Baulig <martin@ximian.com>
24447 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
24449 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
24451 * icall.c: Registred new icalls for key pair protection and added an
24452 icall for Environment.GetFolderPath on Windows.
24453 * security.c|h: Added new icalls for key pair protection.
24455 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24457 * socket-io.c: don't display the non-supported family warning for known
24458 families. Now this is not displayed on windows when checking support
24461 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24463 * class.c: don't display the layout warning for static fields.
24465 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
24467 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
24468 * locales.c, locales.h: Added new icalls for culture-specific
24469 Char.ToLower and Char.ToUpper.
24471 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24473 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
24476 2004-04-20 Martin Baulig <martin@ximian.com>
24478 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
24479 of the type name before passing it to mono_reflection_type_from_name().
24481 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
24483 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
24484 encodings here. Fixes #56965.
24486 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
24488 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24489 fix test on strstr result not that I can see anything that
24490 relies on the result.
24492 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
24494 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
24497 * marshal.c (mono_marshal_get_string_encoding): New helper function.
24499 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
24500 function to determine which marshalling to use for strings. Fixes
24503 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
24505 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
24507 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
24509 * icall.c: #include mono-config.h
24511 2004-04-15 Jackson Harper <jackson@ximian.com>
24513 * culture-info-tables.h: Fix date formats for en-US culture.
24515 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
24517 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
24518 ThreadPool.SetMinThreads.
24519 * threadpool.c: Implemented ThreadPool.GetMinThreads and
24520 ThreadPool.SetMinThreads.
24522 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
24524 * mono-config.c: also load the .config file in the directory
24525 where the assembly was found.
24527 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
24529 * assembly.c: load per-assembly config files.
24530 * icall.c: decrapified code to get the config dir and moved to
24532 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
24533 per-assembly config files. When doing a dll map lookup give precedence
24534 to the per-assembly data.
24536 2004-04-14 Martin Baulig <martin@ximian.com>
24538 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
24539 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
24540 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
24542 * mono-debugger-debugger.c: While the debugger is locked, remember
24543 whether the symbol tables have changes and send one single
24544 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
24546 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
24548 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
24550 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
24553 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
24554 account when marshalling string arrays. Fixes #56965.
24556 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
24558 * icall.c: Add new icalls mapping for security.
24559 * security.c|h: Add internal calls for WindowsIdentity,
24560 WindowsImpersonationContext and WindowsPrincipal.
24562 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
24564 * class.c: Added comment to ensure the System.MonoDummy class
24565 is removed when no longer necessary
24567 2004-04-13 Miguel de Icaza <miguel@ximian.com>
24569 * appdomain.c: Pass arguments to the bootstraping exceptions to
24570 minimize JITed methods at boot
24572 * metadata.c (mono_exception_from_name_two_strings): Allow for the
24573 second string to be null.
24575 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24576 Change the protocol to minimize the JIT methods at startup. Now
24577 it Returns the internal codepage, if the value of "int_code_page"
24578 is 1 at entry, and we can not compute a suitable code page
24579 number, returns the code page as a string.
24581 2004-04-13 Jackson Harper <jackson@ximian.com>
24583 * culture-info-tables.h: Fix number of decimal digits for all
24586 2004-04-13 Jackson Harper <jackson@ximian.com>
24588 * icall.c: Clairfy out of sync error message. It is not always
24589 your corlib that is out of sync.
24591 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
24593 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
24594 properties when only the set accessor is overriden. Fixes #55874.
24596 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
24598 * assembly.c (mono_assembly_load_references): Make this thread safe.
24601 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
24603 * monosn.c: Add missing initialization calls.
24605 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
24608 ves_icall_System_Globalization_CultureInfo_construct_number_format
24609 Fix g_assert so it compiles on fussier compilers re int/ptr
24612 2004-04-08 Dick Porter <dick@ximian.com>
24615 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
24616 53992. Also rearrange the code so that the internal calls return
24617 an error value and exceptions are thrown from managed code.
24619 * icall.c: Add type info to the socket icalls.
24621 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24623 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
24626 2004-04-07 Martin Baulig <martin@ximian.com>
24628 * class.c (mono_class_from_generic_parameter): Don't default
24629 `klass->parent' to `mono_defaults.object_type'.
24631 2004-04-07 Martin Baulig <martin@ximian.com>
24633 * reflection.c (mono_reflection_initialize_generic_parameter): Set
24634 `param->pklass->reflection_info'.
24636 2004-04-07 Jackson Harper <jackson@ximian.com>
24638 * culture-info-tables.h: Fix date separator symbol.
24640 2004-04-07 Martin Baulig <martin@ximian.com>
24642 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
24643 from System.Type to System.MonoType.
24645 2004-04-07 Martin Baulig <martin@ximian.com>
24648 (MonoReflectionGenericParam): Added `has_reference_type' and
24649 `has_value_type' fields.
24651 * reflection.c (mono_image_get_generic_param_info): Encode the
24652 correct flags if we have the `class' or `struct' constraint.
24654 2004-04-07 Martin Baulig <martin@ximian.com>
24657 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
24659 2004-04-07 Jackson Harper <jackson@ximian.com>
24661 * appdomain.c: Revert extra patches, just wanted to bump the
24664 2004-04-07 Jackson Harper <jackson@ximian.com>
24666 * Makefile.am: Add culture-info private headers.
24667 * icall.c: Add new icalls for contructing locales.
24668 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
24669 * locales.h: Declare new culture info construction methods.
24670 * object.h: Add new fields used to avoid the CultureMap to
24672 * culture-info.h: Definition of structs used in the culture info
24674 * culture-info-tables.h: Autogenerated tables that contain culture
24675 info data. This file was generated with the locale-builder tool.
24676 * appdomain.c: Incement corlib version number.
24678 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
24680 * appdomain.c: (mono_runtime_init) move mono_thread_init
24681 to before mono_object_new calls so critical sections
24682 are initialized before use.
24684 2004-04-07 Martin Baulig <martin@ximian.com>
24687 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
24688 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
24689 (ves_icall_MonoGenericParam_initialize): Removed.
24690 (monogenericparam_icalls): Removed.
24691 (generictypeparambuilder_icalls): Added new table for
24692 System.Reflection.Emit.GenericTypeParameterBuilder.
24695 (mono_reflection_define_generic_parameter): Removed.
24696 (mono_reflection_initialize_generic_parameter): This is now called
24697 from GenericTypeParameterBuilder's .ctor.
24699 2004-04-06 Martin Baulig <martin@ximian.com>
24701 * class.c (mono_class_init): Don't inflate nested classes in a
24703 (mono_type_get_name_recurse): Include the generic arguments for
24704 generic instances and generic type declarations.
24705 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
24706 (_mono_class_get_instantiation_name): Removed.
24707 (mono_class_create_generic): Always use `gklass->name' as our name.
24709 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
24711 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
24712 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
24713 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
24714 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
24715 closed generic methods here.
24718 (mono_reflection_generic_inst_get_nested_types): Removed.
24719 (inflate_mono_method): Copy the generic parameters from the
24720 MonoMethodHeader into out MonoGenericMethod.
24722 2004-04-06 Martin Baulig <martin@ximian.com>
24725 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
24727 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
24729 * reflection.c (build_compressed_metadata): If we have any entries
24730 in the GenericParam, MethodSpec or GenericParamConstraint tables,
24731 set the header version to 1.1.
24733 2004-04-06 Martin Baulig <martin@ximian.com>
24735 * class.c (mono_class_init): If we're a generic instance,
24736 initialize our nested classes, too.
24737 (_mono_class_get_instantiation_name): Deal with the new `!%d'
24740 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24742 * process.c: quote the argument passed to the shell on windows.
24744 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
24746 * threads.c (mono_alloc_special_static_data): Allow this to be
24747 called during startup.
24749 2004-04-02 Martin Baulig <martin@ximian.com>
24752 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
24754 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
24756 * icall.c: Fix build.
24758 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
24760 * Makefile.am: Added security.c|h.
24761 * icall.c: Added icall for get_UserName;
24762 * security.c: New file for security related icalls. Added function
24763 get_UserName for System.Environment (fix #56144).
24764 * security.h: New. Header file for security.c
24766 2004-04-02 Dick Porter <dick@ximian.com>
24768 * icall.c: Deleted the icalls that were obsoleted some time ago
24769 by the ICU string code, and which were mixed into the icall
24770 rearranging. Fixes bug 55969.
24773 * string-icalls.c: Deleted the code that those icalls reference.
24775 2004-04-01 Martin Baulig <martin@ximian.com>
24777 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
24779 * class.c (mono_class_from_generic_parameter): Don't set
24780 TYPE_ATTRIBUTE_INTERFACE.
24781 (my_mono_class_from_generic_parameter): Likewise.
24783 2004-04-01 Martin Baulig <martin@ximian.com>
24785 * loader.c (find_method): Added an optional `MonoClass *ic'
24786 argument to search in a specific interface.
24787 (mono_get_method_constrained): New public function.
24789 2004-04-01 Martin Baulig <martin@ximian.com>
24791 * reflection.c (mono_image_get_generic_field_token): Use the
24792 `handleref' cache here.
24794 2004-04-01 Martin Baulig <martin@ximian.com>
24796 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
24798 * reflection.c (create_generic_typespec): Use the `typespec' hash
24799 here, not the `typeref' one.
24801 2004-04-01 Martin Baulig <martin@ximian.com>
24803 * class.c (mono_class_inflate_generic_type): Moved the
24804 functionality into a new static inflate_generic_type() which
24805 returns NULL if it didn't do anything. Only increment the
24806 `mono_stats.inflated_type_count' if we actually inflated
24808 (mono_class_get_full): Check the classes type to see whether we
24809 need to inflate it; also inflate MONO_TYPE_(M)VAR.
24811 2004-04-01 Jackson Harper <jackson@ximian.com>
24813 * reflection.c: Set culture for assembly references.
24815 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
24817 * reflection.[ch], icall.[ch], Fix support for pinning variables.
24819 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24822 (do_mono_assembly_open): the critical section also covers
24823 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
24825 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24828 (mono_manage_threads): abort the background threads when finishing.
24831 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24833 * gc.c: only close the done_event handle if there was no timeout.
24836 2004-03-30 Martin Baulig <martin@ximian.com>
24838 * icall.c (icall_entries): It's called "System.Activator", not
24839 "System.Activation".
24841 2004-03-30 Martin Baulig <martin@ximian.com>
24843 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
24844 (mono_class_create_from_typespec): Likewise.
24846 2004-03-30 Martin Baulig <martin@ximian.com>
24848 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
24849 `has_ctor_constraint' and `initialized'.
24851 2004-03-30 Martin Baulig <martin@ximian.com>
24853 * reflection.c (encode_new_constraint): New static function to add
24854 the constructor constraint attribute to a type parameter.
24855 (encode_constraints): Call encode_new_constraint() if necessary.
24858 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
24860 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
24862 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
24864 * reflection.c, icall.c: add support for pinning variables.
24866 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
24868 * marshal.c (mono_marshal_get_managed_wrapper):
24869 init bool local with zero rather than null.
24871 2004-03-29 Martin Baulig <martin@ximian.com>
24873 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
24874 the "official" behavior here.
24875 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
24877 2004-03-29 Martin Baulig <martin@ximian.com>
24879 * icall.c: Reflect latest API changes.
24881 2004-03-29 Martin Baulig <martin@ximian.com>
24883 * loader.c (mono_get_method_from_token): Also call
24884 mono_metadata_load_generic_params () for abstract and interface
24885 methods; replace the type arguments in the method signature with
24886 the ones which are loaded from the metadata.
24888 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
24890 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
24891 of the lock is not the current thread. MS.NET don't do it, in spite of
24892 what the documentation says. See bug #56157.
24894 2004-03-28 Martin Baulig <martin@ximian.com>
24896 * class.c (mono_class_init): Don't call init_properties() and
24897 init_events() for generic instances; set `prop->parent' when
24898 inflating properties.
24900 * reflection.c (mono_generic_inst_get_object): Call
24901 `mono_class_init (ginst->klass)'.
24902 (mono_type_get_object): Only create a MonoGenericInst if your
24903 generic type is a TypeBuilder.
24904 (do_mono_reflection_bind_generic_parameters): Only set
24905 `ginst->is_dynamic' if our generic type is a TypeBuilder.
24907 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
24909 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
24912 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24914 * icall.c: added Kill_internal icall.
24915 * process.[ch]: added Kill_internal icall.
24917 2004-03-25 Martin Baulig <martin@ximian.com>
24919 * class.h (MonoStats): Added `generic_instance_count',
24920 `inflated_method_count', `inflated_type_count' and
24921 `generics_metadata_size'.
24923 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24925 * reflection.c: no warnings now.
24927 2004-03-25 Martin Baulig <martin@ximian.com>
24929 * class.c (mono_class_get_full): New public function; does a
24930 mono_class_get(), but also takes a `MonoGenericContext *'.
24932 * loader.c (mono_field_from_memberref): Renamed to
24933 `field_from_memberref', made static and added `MonoGenericContext *'
24935 (mono_field_from_token): Added `MonoGenericInst *' argument.
24936 (method_from_memberef): Likewise.
24937 (mono_get_method_from_token): Likewise.
24938 (mono_get_method_full): New public function; does a
24939 mono_get_method(), but also takes a `MonoGenericContext *'.
24941 * verify.c (mono_method_verify): Get the method's generic context
24942 and pass it to mono_field_from_token(), mono_get_method_full() and
24943 mono_class_get_full().
24945 2004-03-25 Martin Baulig <martin@ximian.com>
24947 * class.c (mono_class_inflate_generic_type): Take a
24948 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
24949 `MonoGenericMethod *'.
24951 2004-03-25 Martin Baulig <martin@ximian.com>
24953 * loader.h (MonoMethodInflated): Store the MonoGenericContext
24954 instead of the MonoGenericMethod here.
24956 2004-03-25 Martin Baulig <martin@ximian.com>
24958 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
24959 each time we create a new MonoGenericInst, we also create a new
24960 context which points back to us.
24962 * class.c (inflate_method): Use `ginst->context' instead of
24963 creating a new context.
24965 * loader.c (method_from_memberref): Use
24966 `klass->generic_inst->context' instead of creating a new context.
24968 2004-03-25 Martin Baulig <martin@ximian.com>
24970 * class.h (MonoGenericContext): New struct.
24971 (MonoGenericMethod): Removed `generic_inst'.
24973 * class.c (mono_class_inflate_generic_method): Take a
24974 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
24976 2004-03-25 Martin Baulig <martin@ximian.com>
24978 * loader.h (MonoMethodInflated): New typedef.
24980 * metadata.h (MonoMethodSignature): Removed `gen_method', make
24981 `generic_param_count' consume just 30 bits, added `is_inflated'
24982 and `has_type_parameters' flags (one bit each).
24984 * class.c (mono_class_inflate_generic_method): Create a
24985 MonoMethodInflated instead of a MonoMethodNormal and set
24986 `is_inflated' in the method signature.
24988 * class.h (MonoGenericMethod): Removed `generic_method'.
24990 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
24992 * image.c: Make sure the name of a MonoImage is always an absolute path.
24993 This fixes bug #54415.
24995 2004-03-24 Martin Baulig <martin@ximian.com>
24997 * class.c (mono_class_setup_vtable): If we're a generic instance,
24998 use our generic type's vtable size.
25000 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
25002 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
25003 MONO_NO_UNLOAD env var as a temporary workaround for unloading
25006 2004-03-23 Martin Baulig <martin@ximian.com>
25008 * class.h (MonoDynamicGenericInst): Added `int count_events' and
25009 `MonoEvent *events'.
25011 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
25012 (typebuilder_icalls): Added "get_event_info"; calls
25013 mono_reflection_event_builder_get_event_info().
25015 * reflection.c (mono_reflection_generic_inst_initialize): Added
25016 `MonoArray *events'.
25017 (mono_reflection_event_builder_get_event_info): New function.
25019 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
25021 * object.h: add mono_type_initialization_init
25023 * object.c (mono_runtime_class_init):
25024 implement class constructor synchronization rules
25025 to cope with threading issues.
25026 add mono_type_initialization_init
25028 * appdomain.c (mono_runtime_init): call
25029 mono_type_initialization_init
25031 * class.h: removing initializing field from MonoVTable
25033 2004-03-23 Martin Baulig <martin@ximian.com>
25035 * class.c (my_mono_class_from_generic_parameter): Use
25036 `param->name' if it's not NULL.
25038 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
25040 * class.c: do not insert non-virtual methods in the vtable.
25041 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
25042 that means the method is non-virtual. This never would have
25045 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
25047 * profiler.c: Added lock for accessing coverage_hash.
25049 2004-03-22 Martin Baulig <martin@ximian.com>
25051 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
25052 `method->method->signature->generic_param_count != 0' to make it
25053 work for interface methods.
25055 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25057 * process.c: quote the string passed to the shell using g_shell_quote.
25059 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25062 (mono_threads_manage): don't remove the finalizer thread and self
25063 from the threads hash table so that mono_thread_manage can be called
25066 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25068 * process.c: quote the arguments when UseShellExecute is true. Fixes
25071 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25073 * threads.c: set mono_thread_detach as a cleanup routine for every
25074 thread. This way it's always executed upon thread termination, either
25075 aborted or finished normally. No more xsp hangs!
25077 2004-03-17 Martin Baulig <martin@ximian.com>
25079 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
25080 `int count_nested' and a `MonoType **nested'.
25082 * reflection.c (mono_reflection_bind_generic_parameters): Moved
25083 most of the functionality into a new static
25084 do_mono_reflection_bind_generic_parameters() and don't take a
25085 `MonoType *nested_in' argument any more. Don't compute nested
25087 (mono_reflection_generic_inst_get_nested_types): New public method
25088 to get nested types.
25090 * class.c (mono_class_create_generic): Set `klass->nested_in' if
25091 we're a nested class.
25093 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
25094 mono_reflection_generic_inst_get_nested_types() to compute the
25097 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
25099 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
25100 descriptive error message under windows.
25102 2004-03-17 Martin Baulig <martin@ximian.com>
25104 * class.c (dup_type): Added `const MonoType *original' argument;
25105 copy the attrs from the original type.
25107 2004-03-17 Martin Baulig <martin@ximian.com>
25109 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
25110 `m->generic_inst_cache' here.
25112 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
25114 * exception.h exception.c: Add stack_overflow_exception.
25116 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25119 (overlapped_callback): call SetEvent *after* invoking the callback.
25120 No need to call CloseHandle.
25122 2004-03-16 Martin Baulig <martin@ximian.com>
25124 * reflection.c (mono_image_get_fieldref_token): Take a
25125 `MonoReflectionField *' instead of a `MonoClassField *' and a
25126 `MonoClass *'; store the `MonoReflectionField *' in the hash.
25128 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25130 * appdomain.c: don't add the culture to the filename we're looking for
25131 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
25133 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25135 * locales.c: don't ignore symbols when doing case insensitive compares.
25136 Thanks Dick! Fixes bug #54046.
25138 * threads.c: surround 'threads' usage with enter/leave in
25139 mono_thread_manage.
25141 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
25143 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
25144 implicitly marshalled as [Out]. Fixes #55450.
25146 (mono_marshal_get_runtime_invoke): Zero out the result if there is
25149 2004-03-16 Martin Baulig <martin@ximian.com>
25151 * class.c (mono_class_from_generic_parameter): Use the actual
25154 2004-03-16 Martin Baulig <martin@ximian.com>
25156 * reflection.c (type_get_signature_size): New static function.
25157 Compues the size of the type in a method signature.
25158 (method_get_signature_size): New static function; calls
25159 type_get_signature_size() to compute the actual size of the
25160 method's signature.
25161 (method_encode_signature): Use method_get_signature_size() to get
25162 the signature's size rather than using `nparams * 10'.
25164 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25166 * file-io.h: define here WapiOverlapped on windows. I don't want the
25167 regular OVERLAPPED one.
25170 * threadpool.c: somehow, BindIoCompletionCallback is not found.
25171 Disabling AIO on windows.
25173 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25175 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
25178 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25180 * appdomain.c: upgraded corlib version.
25182 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
25183 and BeginWrite. Allow opening files for asynchrnous operations.
25185 * file-io.h: new struct that maps FileStreamAsyncResult.
25186 * icall.c: added new icalls.
25187 * process.[ch]: support setting child process environment variables
25188 and use the SHELL or COMSPEC when UseShellExecute is true.
25190 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
25191 callback for async. IO is here and also BindHandle.
25193 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
25196 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
25198 * reflection.c (create_custom_attr): Allow len == 0.
25200 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
25201 computation on big-endian machines.
25203 2004-03-13 Martin Baulig <martin@ximian.com>
25205 * class.h (MonoGenericInst): Added `int count_ifaces'.
25207 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
25208 `ginst->count_ifaces' instead `klass->interface_count' since we
25209 may get called before the vtable is created.
25211 * loader.c (mono_method_get_param_names): If we're a generic
25212 instance, return and don't initialize the class.
25214 * reflection.c (mono_reflection_setup_generic_class): Don't call
25215 ensure_runtime_vtable().
25216 (mono_reflection_bind_generic_parameters): Set
25217 `ginst->count_ifaces'.
25219 2004-03-11 Jackson Harper <jackson@ximian.com>
25223 * unicode.h: Remove unused System.Char icalls.
25225 2004-03-11 Miguel de Icaza <miguel@ximian.com>
25227 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
25228 code when we P/Invoke the first library in Windows.Forms, instead
25229 of when we first open the assembly.
25231 * assembly.c: Drop the lookup from here.
25233 2004-03-10 Martin Baulig <martin@ximian.com>
25235 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
25236 class for properties, fields and events. Finally fixes #54945.
25238 2004-03-10 Martin Baulig <martin@ximian.com>
25240 * metadata.c (mono_metadata_class_equal): New static function;
25241 checks whether two generic instances or two generic parameters are
25243 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
25246 2004-03-10 Martin Baulig <martin@ximian.com>
25248 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
25250 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
25251 argument and write it into the `reflection_info' field.
25254 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
25255 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
25257 2004-03-09 Jackson Harper <jackson@ximian.com>
25259 * char-conversions.h: use 8 bits for numeric data its all we need
25260 * icall.c: numeric data is only 8 bits now.
25262 2004-03-09 Martin Baulig <martin@ximian.com>
25264 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
25266 * class.c (init_properties, init_events): Initialize the new
25269 * reflection.c (typebuilder_setup_properties): Likewise.
25270 (typebuilder_setup_events): Likewise.
25272 * reflection.h (MonoEventInfo): Replaced `parent with
25273 `declaring_type' and `reflected_type'.
25275 * icall.c (ves_icall_get_property_info): Distinguish between
25276 declaring and reflected type.
25277 (ves_icall_get_event_info): Likewise.
25279 2004-03-09 Martin Baulig <martin@ximian.com>
25281 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
25282 (ves_icall_Type_GetField): Correctly set field->klass.
25284 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
25286 * loader.h: Fix warning.
25288 2004-03-08 Miguel de Icaza <miguel@ximian.com>
25290 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
25291 library routine if present. Notice that it will still continue
25292 executing even if its missing, for those working on the Gtk#
25293 edition of Windows.Forms.
25295 * assembly.c (do_mono_assembly_open): If loading the
25296 System.Windows.Forms call mono_loader_wini_init.
25298 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
25300 * class.h: Added MonoRemoteClass struct.
25301 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
25302 function for MonoStrings.
25303 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
25304 Added internal call for getting the proxy type.
25305 * marshal.c: Get the type of transparent proxies from its remote_class.
25306 Added methods that generate the IL for type checks and casts:
25307 mono_marshal_get_isinst, mono_marshal_get_castclass,
25308 mono_marshal_get_proxy_cancast.
25309 * marshal.h: Declaration of the previous new methods.
25310 * object.c: Added new moethods for creating and updating MonoRemoteClass
25311 instances: mono_remote_class, mono_upgrade_remote_class,
25312 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
25313 * verify.c: FIx transparent_proxy_fields layout.
25314 * appdomain.c: Bump corlib version.
25316 2004-03-04 Jackson Harper <jackson@ximian.com>
25318 * icall.c: Add icall to access char conversion tables.
25319 * char-conversions.h: Character conversion tables.
25320 * Makefile.am: Add char-conversions.h private header file.
25322 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
25324 * appdomain.c (unload_thread_main): Increase unloading timeout to
25325 10 sec as a temporary workaround for Nant problems.
25327 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
25329 * gc.c: Add checks for GC_enable and GC_disable.
25331 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
25332 (jaak@zd.com.pl). Fix memory corruption in String.Replace
25335 2004-02-27 Martin Baulig <martin@ximian.com>
25337 * reflection.c (mono_reflection_bind_generic_parameters): Take a
25338 `MonoReflectionType *' instead of a `MonoType *'.
25340 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
25342 * gc.c (run_finalize): Avoid finalizing the object representing the
25344 (finalizer_thread): Fix warning.
25346 2004-02-25 Martin Baulig <martin@ximian.com>
25348 * class.c (_mono_class_get_instantiation_name): Added `int offset'
25349 argument for nested types.
25350 (mono_class_create_generic): Added support for nested generictypes.
25352 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
25355 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
25357 * reflection.c (method_encode_signature): Increase the minimum
25358 value of `size' from 10 to 11.
25359 (mono_reflection_bind_generic_parameters): Take `int type_argc'
25360 and `MonoType **types' arguments instead of the `MonoArray
25361 *types'; added `MonoType *nested_in'. Recursively instantiate
25364 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
25366 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
25367 stack_overflow_ex members which are used by exception handling.
25369 * appdomain.c (mono_runtime_init): Initialize the new members.
25371 * gc.c (mono_gc_enable): New helper function.
25372 * gc.c (mono_gc_disable): New helper function.
25374 2004-02-23 Martin Baulig <martin@ximian.com>
25376 * icall.c: I must have been really stupid - make it actually work
25379 2004-02-23 Martin Baulig <martin@ximian.com>
25381 * loader.c (method_from_memberref): Only inflate the method if
25382 it's in another klass.
25384 2004-02-23 Martin Baulig <martin@ximian.com>
25386 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
25387 (mono_class_init): If we're a generic instance and an interface,
25388 compute `class->interface_id'; also create `class->interfaces'
25389 here and inflate them.
25391 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
25393 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
25395 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
25397 2004-02-15 Miguel de Icaza <miguel@ximian.com>
25399 * reflection.c (method_encode_code): Improved the error message
25400 generated by the exception.
25402 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25404 * icall.c: Martin did not do what he said in the ChangeLog for
25405 2004-02-18, but put back the changes for properties and events.
25406 Commenting those changes out again and adding comment to bug #54518.
25408 * process.c: removed warning.
25410 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
25412 * marshal.c (emit_struct_conv): Print an error message instead of
25413 asserting when a type does not have the StructLayout attribute.
25415 2004-02-20 Martin Baulig <martin@ximian.com>
25417 * reflection.c (mono_type_get_object): Also use the cache for
25419 (mono_reflection_bind_generic_parameters): Always compute
25422 2004-02-20 Martin Baulig <martin@ximian.com>
25424 * class.h (MonoGenericMethod): Removed `klass'.
25426 * class.c (mono_class_inflate_generic_method): Added `MonoClass
25429 2004-02-20 Martin Baulig <martin@ximian.com>
25431 * reflection.c (method_encode_methodspec): Actually use the
25432 uninflated signature for the memberref.
25434 2004-02-20 Martin Baulig <martin@ximian.com>
25436 * class.h (MonoGenericMethod): Removed `declaring'.
25438 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
25439 is NULL, compute it here.
25441 2004-02-20 Martin Baulig <martin@ximian.com>
25443 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
25445 * metadata.c (mono_metadata_generic_inst_hash): New method.
25446 (mono_metadata_generic_inst_equal): New method.
25448 * reflection.c (mono_reflection_bind_generic_parameters): Use the
25449 `klass->image->generic_inst_cache' cache to avoid creating
25450 duplicate MonoGenericInst's.
25452 * class.c (mono_class_inflate_generic_type): Use the cache.
25454 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
25456 * object.c: fixed gc descriptor calculation for embedded valuetypes.
25458 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25460 * icall.c: added Socket.WSAIoctl icall.
25462 * socket-io.[ch]: implemented
25463 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
25465 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
25467 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
25469 2004-02-18 Urs C Muff <umuff@quark.com>
25471 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
25472 this work on PPC and other big-endian architectures.
25474 * debug-mono-symfile.h: Prepended the names of all the `guint32'
25475 fields with an underscore to make sure they're only accessed by
25476 the read32() macro.
25478 2004-02-18 Martin Baulig <martin@ximian.com>
25480 * icall.c: Put the klass->refclass changes back for methods and
25481 fields, but not for properties and events. We're currently not
25482 distinguishing between DeclaringType and ReflectedType for
25483 properties and events, that's what caused the regressions.
25485 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25488 (mono_async_result_new): the handle can be NULL.
25490 * threadpool.c: Use an event instead of a semaphore, don't initialize
25491 it until needed. This saves quite a few semaphores from being created
25492 when using the threadpool.
25494 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
25496 * object.c (mono_string_is_interned_lookup): Fix interning of long
25497 strings. Fixes #54473.
25499 * domain.c (ldstr_equal): Optimize if the two strings are equal.
25501 * icall.c: Revert the klass->refclass changes since they introduce
25502 regressions (bug #54518).
25504 2004-02-18 Martin Baulig <martin@ximian.com>
25506 * class.c (mono_class_init): If we're a generic instance and don't
25507 come from a TypeBuilder, inflate our members here.
25508 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
25509 (mono_class_create_generic): New public method.
25510 (mono_class_initialize_generic): Removed.
25511 (get_instantiation_name): Renamed to
25512 _mono_class_get_instantiation_name() and made it public.
25514 2004-02-18 Martin Baulig <martin@ximian.com>
25516 * class.c (mono_class_inflate_generic_type): Clear the new
25517 instance's `nginst->klass' when inflating a generic instance.
25518 (mono_class_is_subclass_of): Added (basic) support for generic
25521 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
25523 * appdomain.h, domain.c: use a MonoCodeManager instead of a
25524 MonoMempool to hold compiled native code.
25526 2004-02-17 Martin Baulig <martin@ximian.com>
25528 * class.h (MonoDynamicGenericInst): Added `count_properties' and
25531 * reflection.c (mono_reflection_generic_inst_initialize): Added
25532 `MonoArray *properties' argument.
25534 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
25536 2004-02-17 Martin Baulig <martin@ximian.com>
25538 * icall.c (ves_icall_Type_GetFields): Renamed to
25539 ves_icall_Type_GetFields_internal() and added a
25540 `MonoReflectionType *rtype' argument; pass it to
25541 mono_field_get_object() to set the field's "reflected" type.
25542 (ves_icall_Type_GetConstructors): Likewise.
25543 (ves_icall_Type_GetEvents): Likewise.
25544 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
25545 argument; pass it to mono_method_get_object() to set the method's
25548 2004-02-17 Martin Baulig <martin@ximian.com>
25550 * class.h (MonoDynamicGenericInst): New type.
25551 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
25553 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
25554 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
25555 (ves_icall_MonoGenericInst_GetFields): New interncall.
25557 * class.c (mono_class_from_generic): Don't call
25558 mono_class_initialize_generic() if this is a dynamic instance;
25559 ie. it's being created from a TypeBuilder.
25560 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
25561 `class->byval_arg.type'.
25563 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
25564 to `inflate_method' and made static.
25565 (mono_reflection_inflate_field): Removed.
25566 (mono_reflection_generic_inst_initialize): New public method.
25568 * reflection.h (MonoReflectionGenericInst): Removed `methods',
25569 `ctors' and `fields'; added `initialized'.
25571 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
25573 * debug-helpers.c (mono_method_full_name): Fix output for empty
25576 2004-02-12 Martin Baulig <martin@ximian.com>
25578 * class.h (MonoClassField): Added `MonoType *generic_type'.
25580 * reflection.c (mono_image_get_fieldref_token): Added support for
25581 instantiated generic types.
25582 (field_encode_inflated_field): Removed.
25583 (mono_image_get_inflated_field_token): Removed.
25584 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
25586 * reflection.h (MonoReflectionInflatedField): Removed.
25588 2004-02-12 Martin Baulig <martin@ximian.com>
25590 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
25591 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
25593 * reflection.c (mono_image_get_methodspec_token): Take a
25594 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
25595 (mono_image_create_token): Check whether we have a
25596 `method->signature->gen_method' and call
25597 mono_image_get_methodspec_token() if appropriate.
25598 (inflated_method_get_object): Removed.
25599 (mono_reflection_bind_generic_method_parameters): Return a
25600 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
25601 (mono_reflection_inflate_method_or_ctor): Likewise.
25603 * reflection.h (MonoReflectionInflatedMethod): Removed.
25605 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
25607 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
25608 for custom valuetype marshalling.
25610 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
25612 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25614 * icall.c: fixed WSAGetLastError_internal name.
25616 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
25618 * threads.c (mono_thread_attach): Allow this to be called multiple
25619 times for a thread.
25621 * threads.c (build_wait_tids): Do not wait for ourselves.
25623 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
25624 appdomain list is empty.
25626 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
25627 memory returned by mono_string_builder_to_utf16, since it points into
25628 managed memory. Thanks to Bernie Solomon for noticing this.
25630 * icall.c: Add AppDomainSetup icalls.
25632 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
25634 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
25637 * reflection.c (reflection_methodbuilder_to_mono_method): Save
25638 custom attributes to the method_aux struct. Also fix array indexes etc.
25640 * loader.c (mono_method_get_param_names): Make dynamic case work again.
25642 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
25644 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
25645 (both static and runtime) and reduce startup time.
25647 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
25649 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
25650 AsAny marshalling conversion instead of crashing.
25652 * marshal.c: Fix warnings.
25654 2004-02-09 Martin Baulig <martin@ximian.com>
25656 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
25658 * reflection.h (MonoReflectionInflatedMethod): Removed the
25659 `declaring' field, it's now in the unmanaged MonoGenericMethod.
25661 * reflection.c (method_encode_methodspec): Removed the `method'
25662 argument; we get it from `gmethod->declaring'.
25663 (inflated_method_get_object): Removed the `declaring' argument.
25665 2004-02-09 Martin Baulig <martin@ximian.com>
25667 * class.h (MonoGenericMethod): New type.
25668 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
25671 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
25672 a `MonoGenericMethod *gen_method' one.
25674 * class.c (mono_class_inflate_generic_type): Take an additional
25675 `MonoGenericMethod * argument. This is only non-NULL if we're
25676 inflating types for a generic method.
25677 (mono_class_inflate_generic_signature): Renamed to
25678 inflate_generic_signature() and made static; take a
25679 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25680 (inflate_generic_header): Take a `MonoGenericMethod *' argument
25681 instead of a `MonoGenericInst *' one.
25682 (mono_class_inflate_generic_method): Likewise.
25684 * reflection.c (encode_generic_method_sig): Take a
25685 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25686 (method_encode_methodspec): Likewise.
25687 (inflated_method_get_object): Likewise.
25689 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
25690 field with a `MonoGenericMethod *gmethod' one.
25692 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
25694 * class.h (mono_class_has_parent): add parens to expansion
25697 2004-02-08 Martin Baulig <martin@ximian.com>
25699 * image.h (MonoImage): Removed `generics_cache'.
25701 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
25702 instead of a `MonoType *' argument; removed the `inflate_methods'
25703 argument. Don't inflate methods here.
25705 * loader.c (find_method): If it's a generic instance, call
25706 mono_class_init() on the `sclass->generic_inst->generic_type'.
25708 * metadata.c (mono_type_size): Make this work on uninitialized
25709 generic instances; call it on the `ginst->generic_type's class.
25711 * reflection.c (mono_reflection_bind_generic_parameters): Call
25712 mono_class_from_generic() to create the `ginst->klass'.
25714 2004-02-08 Martin Baulig <martin@ximian.com>
25716 * class.h (MonoClass): Changed type of `generic_inst' from
25717 `MonoType *' to `MonoGenericInst *'.
25719 2004-02-08 Martin Baulig <martin@ximian.com>
25721 * icall.c (ves_icall_Type_BindGenericParameters): Just call
25722 mono_type_get_object(), this is now creating a `MonoGenericInst'
25723 for MONO_TYPE_GENERICINST.
25724 (ves_icall_MonoGenericInst_GetParentType): Likewise.
25725 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25727 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
25728 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
25729 (inflated_method_get_object): Added `MonoClass *refclass' argument.
25730 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
25731 and reflected type.
25733 * reflection.h (MonoReflectionInflatedMethod): Removed
25734 `declaring_type' and `reflected_type'.
25736 2004-02-08 Martin Baulig <martin@ximian.com>
25738 * class.h (MonoGenericInst): Added `MonoType *parent' and
25739 `MonoType **ifaces'.
25741 * reflection.h (MonoReflectionGenericInst): Removed `klass',
25742 `parent' and `interfaces'.
25744 * reflection.c (mono_reflection_bind_generic_parameters): Take a
25745 `MonoType *' argument and return a `MonoType *'.
25748 (ves_icall_MonoGenericInst_GetParentType): New interncall.
25749 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25751 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
25753 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
25754 valuetype marshalling.
25756 2004-02-06 Martin Baulig <martin@ximian.com>
25759 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
25760 (my_mono_class_from_generic_parameter): Likewise.
25762 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
25764 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
25765 contents of the symbol files lazily.
25767 * object.h (MonoThread): Add 'name' and 'name_len' fields.
25769 * threads.h threads.c icall.c: New icalls for getting and setting the
25772 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
25774 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
25775 Raise an exception when the domain is not found.
25777 2004-02-03 Martin Baulig <martin@ximian.com>
25779 * reflection.c (mono_image_get_methodspec_token): Use the
25780 uninflated signature; fixes gen-33.
25782 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
25784 * gc.c threads.c: Make the finalizer thread a normal managed thread so
25785 the finalizer code can use thread functionality.
25787 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
25788 the finalizer thread.
25790 * threads.c: Make some functions more robust.
25792 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
25794 * metadata.h: Add new marshalling conventions.
25796 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
25797 stringbuilder marshalling. Fixes #53700.
25799 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
25801 * reflection.c (mono_image_get_type_info): Save declarative security
25804 * reflection.c (mono_image_get_field_info): Handle uninitialized
25805 unmanaged fields as well.
25807 * appdomain.c: Bump corlib version.
25809 2004-02-01 Martin Baulig <martin@ximian.com>
25811 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
25812 method type arguments.
25814 2004-01-30 Duncan Mak <duncan@ximian.com>
25816 * marshal.h: Add prototype for
25817 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
25819 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
25822 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
25824 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
25825 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
25827 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
25829 * marshal.c (mono_marshal_get_native_wrapper): Add support for
25830 custom marshalling of valuetypes.
25832 * marshal.c: Fix some warnings.
25834 2004-01-29 Martin Baulig <martin@ximian.com>
25836 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
25837 for generic method parameters.
25839 * reflection.c (method_encode_methodspec): Write the uninflated
25840 signature into the methodspec table.
25841 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
25842 is always the uninflated method.
25843 (reflection_methodbuilder_to_mono_method): Copy the generic
25844 parameters from the MethodBuilder into `header->gen_params'.
25846 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
25848 * class.c (mono_class_from_generic_parameter): Fix warning.
25850 2004-01-27 Martin Baulig <martin@ximian.com>
25852 * class.c (mono_class_from_generic_parameter): Don't create
25853 `klass->methods' here.
25855 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
25857 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
25858 extension since it does not work with libraries named lib<FOO>.dll.so.
25860 2004-01-25 Martin Baulig <martin@ximian.com>
25862 * class.c (mono_class_inflate_generic_type): Added support for
25863 MONO_TYPE_GENERICINST.
25865 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
25866 inflate methods on open constructed types.
25868 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25870 * object.c: fire ProcessExit event in the root AppDomain after running
25871 Main. Fixes bug #53299.
25873 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
25875 * socket-io.c: include the new socket-wrappers.h header.
25876 Use the wrappers instead of the unix socket functions to make the code
25879 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
25881 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
25883 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25886 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
25888 * reflection.c (mono_image_create_pefile): Handle the case when the
25889 entry point is not a MethodBuilder.
25891 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25892 field to ReflectionMethod since it is not allways a builder.
25894 * reflection.c (type_get_fully_qualified_name): New helper function to
25895 return the fully qualified name of a type.
25897 * reflection.c (encode_marshal_blob): Always emit the fully qualified
25898 type name for custom marshallers.
25900 * reflection.c (mono_marshal_spec_from_builder): Ditto.
25902 * class.c (mono_class_setup_vtable): If a parent class already
25903 implements an interface, use the implementing methods from that class.
25906 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25908 * threadpool.c: just return instead of ExitThread to allow for thread
25911 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
25913 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
25914 when closing resource modules.
25916 * reflection.c (mono_image_create_pefile): Handle the case when the
25917 entry point is not a MethodBuilder.
25919 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25920 field to ReflectionMethod since it is not allways a builder.
25922 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
25924 * marshal.c (mono_marshal_get_managed_wrapper):
25925 mono_marshal_alloc takes native int so CONV_I
25926 the arg for 64bits.
25928 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
25930 * reflection.c (fixup_cattrs): New function to fixup the methoddef
25931 tokens in the cattr table. Fixes #53108.
25933 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25935 * loader.c: don't trim ".dll" before looking up in the config file.
25936 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
25938 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
25940 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
25941 Return the module which contains the resource as well.
25942 (ves_icall_System_Reflection_Module_Close): New icall.
25944 * appdomain.c: Bump corlib version number.
25946 * image.c (mono_image_addref): New public function.
25948 * assembly.c: Call mono_image_addref.
25950 * reflection.c (mono_module_get_object): Increase reference count of
25953 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25956 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
25957 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
25958 proper exceptions on DllImport problems.
25960 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
25962 * class.c, metadata.c: eliminate CSIZE macro.
25964 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
25966 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
25967 * object.h: Added async_callback field in MonoAsyncResult.
25968 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
25969 * verify.c: Added async_callback in MonoAsyncResult layout.
25971 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
25973 * reflection.c (mono_reflection_get_custom_attrs): Add support
25976 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
25978 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
25980 (mono_marshal_method_from_wrapper): Add null pointer check.
25982 2004-01-16 Martin Baulig <martin@ximian.com>
25984 * debug-mono-symfile.h: Set version number to 36 and reflect
25985 latest symbol writer changes.
25987 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
25989 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
25990 multi-dimensional arrays.
25991 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
25992 (mono_class_from_mono_type): Use bounded_array_class_get.
25994 * class.c (mono_bounded_array_class_get): New function which takes
25995 a 'bounded' bool argument to distinguish vectors from one dimensional
25998 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
25999 bounded_array_class_get if the array has bounds.
26001 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26002 Search modules loaded using AssemblyBuilder:AddModule as well.
26004 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26006 * appdomain.c: increased corlib version.
26007 * filewatcher.c: removed g_print.
26009 (get_property_info): only allocate what is actually requested.
26010 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
26012 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26014 * Makefile.am: added filewatcher.[ch]
26015 * filewatcher.[ch]: FileSystemWatcher runtime support.
26016 * icall.c: added new FSW icalls.
26018 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
26020 * string-icalls.c: fix stringbuilder regression as suggested by
26021 Iain McCoy <iain@mccoy.id.au>.
26023 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
26025 * process.c (process_read_stringtable_block): Recognize '007f' as
26026 a language neutral stringtable block.
26028 2004-01-12 Patrik Torstensson
26030 * object.h (MonoStringBuilder) : Changed layout to support our
26031 new stringbuilder class.
26032 * marshal.c: Change marshalling to support the new layout of
26034 * appdomain.c: increased version number because new layout of
26037 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
26039 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
26040 assembly name as an string instead of an AssemblyName, since it is
26041 easier to extract info from it.
26043 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
26044 the culture subdirectories too. Fixes #52231.
26046 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26048 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
26049 It takes 2 new parameters with an optional name for the method to look
26050 for and case ignoring info.
26052 * threadpool.c: removed unused variable.
26054 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26056 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
26057 It takes 2 new parameters with an optional name for the property to look
26058 for and case ignoring info.
26061 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
26063 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
26066 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26069 * assembly.c: escape the uri before passing it to g_filename_from_uri.
26072 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
26074 * reflection.c: Add support for more than one unmanaged resource.
26076 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
26077 in field->def_value, as done in all other cases.
26079 * reflection.c (mono_reflection_get_custom_attrs): Add support for
26082 * reflection.c (mono_reflection_create_runtime_class): Remove
26083 errorneous assignment to klass->element_class, since it is already
26084 done in mono_reflection_setup_internal_class.
26086 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26088 * gc.c: added missing LeaveCriticalSection.
26089 * icall.c: indented a couple of lines.
26090 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
26091 if we call EndInvoke inside a callback. Fixes bug #52601.
26093 2004-01-07 Martin Baulig <martin@ximian.com>
26095 * mono-debug-debugger.h
26096 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
26098 2004-01-06 Miguel de Icaza <miguel@ximian.com>
26100 * appdomain.c: Use messages in NotImplementedException.
26102 * exception.c (mono_get_exception_not_implemented): Now this takes
26103 a message argument.
26105 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
26106 exception instead of g_asserting an aborting when something is not
26109 Add some inline docs.
26111 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
26113 * reflection.h: Update after changes to object layout.
26115 * reflection.c: Implement saving of unmanaged aka win32 resources.
26117 * appdomain.c: Bump version number.
26119 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
26120 Handle missing domains gracefully.
26122 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
26124 * file-io.c : On Windows, there are much more invalid_path_chars.
26126 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
26128 * class.h, object.c: prepare for GetType () speedup.
26130 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
26132 * profiler.c: workaround for --profile null reference exception on
26133 cygwin. Patch by Patrik Torstensson.
26135 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
26137 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
26138 make work for unaligned access.
26140 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
26142 * class.c: small cleanup (class->fields [i] -> field).
26143 * image.c: check address of metadata is valid.
26145 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
26147 * assembly.h assembly.c (mono_assembly_loaded): New public function to
26148 search the list of loaded assemblies.
26150 * reflection.c (mono_reflection_type_from_name): Use
26151 mono_assembly_loaded instead of mono_image_loaded.
26153 * reflection.c: Fix warnings.
26155 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
26157 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
26158 is dynamic. This is needed since an assembly can contain both dynamic and
26159 non-dynamic images.
26161 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
26164 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
26166 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
26167 to store modules loaded using AddModule.
26169 * reflection.c (mono_image_fill_file_table): Generalize this so it works
26172 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
26174 * reflection.c (mono_image_fill_export_table_from_module): New function to
26175 fill out the EXPORTEDTYPES table from a module.
26177 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
26178 into a separate function. Also handle loaded non-dynamic modules.
26180 * reflection.c (mono_image_basic_init): Fix memory allocation.
26182 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26184 * assembly.c (mono_assembly_load_references): Make this public.
26186 2003-12-19 Martin Baulig <martin@ximian.com>
26188 * class.c (mono_class_initialize_generic): Made this static, take
26189 a `MonoGenericInst *' instead of a `MonoClass *'.
26190 (mono_class_from_generic): Call mono_class_initialize_generic()
26191 unless we're already initialized or being called from
26192 do_mono_metadata_parse_generic_inst().
26194 * class.h (MonoGenericInst): Added `initialized' and
26195 `init_pending' flags.
26197 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
26198 `mono_class_init (gklass)' or mono_class_initialize_generic()
26199 here; set `generic_inst->init_pending' while parsing the
26202 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
26204 * locales.c: include string.h for memxxx prototypes
26206 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
26208 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
26209 constructor when accessing literal fields.
26211 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
26213 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26215 * reflection.c (assembly_add_resource_manifest): New function to fill
26216 the MANIFESTRESOURCE table.
26218 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
26220 * reflection.h: Update to changes in class layout.
26222 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
26223 Reenable call to mono_runtime_is_shutting_down ().
26225 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
26226 determine if the runtime is shutting down.
26228 2003-12-16 Jackson Harper <jackson@ximian.com>
26230 * icall.c: comment out call to mono_runtime_is_shutting_down to
26233 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
26235 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
26236 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
26238 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
26240 * reflection.c: move definition of swap_with_size
26241 to before its first call
26243 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
26245 * appdomain.c (mono_runtime_is_shutting_down): New public function.
26247 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
26250 * object.c: Fix warnings.
26252 * icall.c (ves_icall_Type_Get...): Only consider inherited static
26253 members if FlattenHierarchy is set.
26255 * reflection.c (mono_image_add_decl_security): New function to emit
26256 declarative security.
26258 * reflection.h reflection.c: Add support for declarative security.
26260 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
26262 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
26264 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
26266 * appdomain.c verify.c: Moved corlib version checking into its own
26267 function in appdomain.c since it needs to create vtables etc.
26269 2003-12-13 Patrik Torstensson <p@rxc.se>
26271 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
26272 instead of unwrapped server.
26274 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
26276 * verify.c (check_corlib): Fix field index.
26278 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
26280 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
26283 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
26285 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
26286 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
26287 cope with sizeof(size_t) != sizeof(guint32).
26289 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26291 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
26292 in case of failure.
26294 2003-12-10 Mark Crichton <crichton@gimp.org>
26296 * icall.c: removed the GetNonZeroBytes. We now handle this case
26299 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
26301 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
26303 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
26306 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
26308 * verify.c (check_corlib): Handle the case when the version field is
26309 initialized by a static constructor.
26311 2003-12-08 Patrik Torstensson <p@rxc.se>
26313 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
26315 2003-12-08 Martin Baulig <martin@ximian.com>
26317 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
26318 a MonoReflectionGenericParameter, also take the parameter index
26319 and name as arguments.
26320 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
26321 (ves_icall_MonoGenericParam_initialize): New interncall.
26322 (ves_icall_Type_make_byref_type): New interncall.
26324 * reflection.h (MonoReflectionGenericParam): Derive from
26325 MonoReflectionType, not just from MonoObject. Added `refobj' and
26328 * reflection.c (mono_reflection_define_generic_parameter): Create
26329 and return a new MonoReflectionGenericParam; don't initialize the
26331 (mono_reflection_initialize_generic_parameter): New public method;
26332 initializes the constraints and creates the `param->pklass'.
26334 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
26336 * reflection.h reflection.c: Use the new fields 'num_types',
26337 'num_fields' and 'num_methods' to track the number of types etc.
26339 * verify.c (check_corlib): Check corlib version number.
26341 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
26343 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
26344 function works on all methods.
26346 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
26348 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
26349 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
26350 the custom_type_info flag of the transparent proxy.
26351 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
26352 objects that supports IRemotingTypeInfo.
26353 * object.h: Added custom_type_info field in transparent proxy.
26355 2003-12-06 Martin Baulig <martin@ximian.com>
26357 * class.c (mono_class_create_from_generic): Removed.
26358 (mono_class_from_generic): Check `ginst->klass' before doing
26359 anything else. This is important to fully support "recursive"
26362 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
26363 empty `generic_inst->klass' before doing anything else.
26365 2003-12-06 Dick Porter <dick@ximian.com>
26370 * locales.c: Use C structs to access class fields. Don't do a
26371 conversion between MonoString and UChar because both are
26372 platform-endian UTF-16. Compare now takes startindex and count
26373 parameters. Add a char overload for IndexOf. Speed up the
26374 invariant string IndexOf.
26376 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
26378 * Makefile.am (monosn_LDADD): Fix parallel build.
26380 2003-12-04 Martin Baulig <martin@ximian.com>
26383 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26384 (ves_icall_Type_make_array_type): New interncall.
26386 2003-12-04 Martin Baulig <martin@ximian.com>
26388 * locales.c: also change it in the !HAVE_ICU case.
26390 2003-12-04 Dick Porter <dick@ximian.com>
26393 * locales.c: construct_compareinfo is now in CompareInfo, not
26396 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
26398 * image.c (mono_image_load_file_for_image): Cache loaded images in the
26399 image->files array.
26401 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
26404 * assembly.c (mono_assembly_load_references): Only load references
26407 * class.c (mono_class_from_name): Avoid linear search of the
26408 EXPORTEDTYPE table.
26410 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
26412 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
26414 * image.h (MonoImage): Add 'field_cache' field.
26416 * loader.c (mono_field_from_token): Cache field lookups.
26418 * reflection.c (mono_module_get_object): Fix name property.
26420 * icall.c (ves_icall_get_enum_info): Update after changes to
26421 mono_metadata_get_constant_index ().
26423 * icall.c: Get rid of get_type_info icall, use a separate icall for
26424 each type property to avoid needless memory allocations. Fixes #51514.
26426 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
26427 to avoid needless binary searches.
26429 * class.c (class_compute_field_layout): Move the initialization of
26430 field->def_value to mono_class_vtable ().
26432 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
26435 * object.c (mono_object_allocate): Make it inline.
26437 * object.c (mono_object_allocate_spec): Make it inline.
26439 2003-12-02 Dick Porter <dick@ximian.com>
26441 * locales.c (create_NumberFormat): NumberFormatInfo construction.
26442 Patch by Mohammad DAMT (mdamt@cdl2000.com).
26444 2003-12-01 Dick Porter <dick@ximian.com>
26446 * threads.c: Fix signature and call in CreateMutex and
26449 2003-12-01 Dick Porter <dick@ximian.com>
26452 * locales.c: Implement string compares and searching
26454 * object.h: Add extra Thread field
26456 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
26458 * reflection.c (fixup_method): Add support for MonoCMethod.
26460 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
26462 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
26464 * reflection.c (assembly_name_to_aname): Allow extra characters in
26465 assembly names. Fixes #51468.
26467 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
26469 * exception.c (mono_exception_from_name_domain): New helper function.
26471 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
26472 exception object in the correct domain.
26474 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
26475 formatting + make a copy a the input data.
26477 * loader.c (mono_get_method_from_token): Methods which contain
26478 native code do not have entries in the ImplMap.
26480 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
26481 Thanks to Gonzalo for spotting this.
26483 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
26484 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
26486 * assembly.h (mono_assembly_load_from): Split the second part of
26487 assembly loading into a new public function.
26489 * exception.h (mono_get_exception_bad_image_format): New function.
26491 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
26493 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26494 Enumerate all modules inside a dynamic assembly. Fixes #51293.
26496 * icall.c: Add new icall for creating dynamic methods.
26498 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
26500 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
26502 * reflection.c (mono_reflection_create_dynamic_method): New icall to
26503 create a dynamic method.
26505 * reflection.c (resolve_object): New helper function.
26507 * reflection.c: Generalize ReflectionMethodBuilder and the functions
26508 which manipulate it so they can also work on dynamic methods.
26510 * reflection.c (reflection_method_builder_to_mono_method): Avoid
26511 creating the MonoReflectionMethodAux structure if it is not needed.
26513 * reflection.h verify.c: Update after changes to object layout.
26515 * reflection.c (method_builder_encode_signature): Fix compilation on
26518 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
26520 * appdomain.h: Added support for context static fields. Added static_data
26521 field to MonoAppContext and renamed thread_static_fields to a more
26522 generic special_static_fields in MonoAppDomain, since it can now contain
26523 context static fields.
26524 * domain.c: Updated hashtable name.
26525 * object.c: Replaced field_is_thread_static() for a more generic
26526 field_is_special_static() which also checks for context static attribute.
26527 In mono_class_vtable(), added support for static context fields.
26528 * threads.c: Changed methods that manage thread static fields to more
26529 generic methods so they can be reused both for thread and context static
26531 * threads.h: Declared some new methods.
26533 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
26535 * reflection.h: Update after changes to the managed types.
26537 * reflection.c (encode_custom_modifiers): New helper function.
26539 * reflection.c (method_encode_signature): Emit custom modifiers.
26541 * reflection.c (field_encode_signature): Emit custom modifiers.
26543 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
26545 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
26547 * icall.c (ves_icall_System_ValueType_Equals): New optimized
26550 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
26553 * object.c (mono_field_get_value_object): New function.
26555 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
26558 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
26560 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
26561 return a preallocated out-of-memory exception instance.
26563 * object.c (out_of_memory): Use the new function.
26565 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
26566 flag is before the custom modifiers. Fixes #49802.
26568 2003-11-16 Martin Baulig <martin@ximian.com>
26570 * class.c (mono_class_is_open_constructed_type): Implemented the
26571 MONO_TYPE_GENERICINST case.
26573 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
26575 * assembly.c (mono_assembly_fill_assembly_name): New function to
26576 fill out the MonoAssemblyName structure.
26577 (mono_assembly_open): Use the new function.
26579 * icall.c (fill_reflection_assembly_name): New helper function.
26581 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
26584 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
26586 2003-11-15 Martin Baulig <martin@ximian.com>
26588 * class.c (mono_class_is_open_constructed_type): New public
26589 function; checks whether a type is an open constructed type,
26590 ie. whether it still contains type parameters.
26591 (mono_class_inflate_generic_type): If we're a type parameter and
26592 the inflated type is also a MONO_TYPE_(M)VAR, return the original
26595 * class.h (MonoGenericInst): Added `guint32 is_open'.
26597 * loader.c (method_from_methodspec): Check whether we're an open
26598 or closed constructed type and set `ginst->is_open'.
26600 * reflection.c (mono_reflection_bind_generic_parameters): Check
26601 whether we're an open or closed constructed type and set
26603 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
26604 from open constructed types.
26606 2003-11-15 Martin Baulig <martin@ximian.com>
26608 * reflection.c (mono_reflection_bind_generic_parameters): If we're
26609 a generic instance (instead of a generic type declaration) with
26610 unbound generic parameters, bind them to our actual types.
26612 2003-11-14 Martin Baulig <martin@ximian.com>
26614 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
26616 * reflection.c (mono_reflection_bind_generic_parameters): If we're
26617 an interface type, populate `res->interfaces' with instantiated
26618 versions of all the interfaces we inherit.
26620 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
26622 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
26623 when MONO_PATH is set but doesn't contain the install dir.
26625 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26628 (ves_icall_Type_GetInterfaces): don't return an interface twice when
26629 it's also implemented in base classes. Fixes bug #50927.
26631 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
26633 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
26634 if this method is called from a finalizer. Fixes #50913.
26636 2003-11-12 Miguel de Icaza <miguel@ximian.com>
26638 * threads.c: Implement VolatileRead/VolatileWrite
26640 * icall.c: Add new icalls for VolatileRead/VolatileWrite
26642 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26644 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
26645 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
26648 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
26649 from Peter Ross (pro@missioncriticalit.com).
26651 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
26653 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
26655 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26657 * assembly.c (mono_assembly_load_references): Disable check because it
26658 triggers on older corlibs which lots of people have.
26660 2003-11-12 Jackson Harper <jackson@ximian.com>
26662 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
26663 load corlib.dll if mscorlib.dll is not found.
26664 * assembly.h: Remove corlib name define.
26667 * image.c: Change corlib name to mscorlib.
26669 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
26671 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
26673 2003-11-11 Miguel de Icaza <miguel@ximian.com>
26675 * appdomain.h: Added loader_optimization here to sync with the C#
26676 code, and add disallow_binding_redirects field.
26678 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26680 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
26682 * reflection.c (mono_image_build_metadata): Fix crash on modules
26685 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
26687 * icall.c (ves_icall_get_method_info): Return callingConvention as
26690 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
26691 namespaces from the EXPORTEDTYPE table as well.
26693 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
26694 from all modules inside the assembly.
26696 2003-11-11 Martin Baulig <martin@ximian.com>
26698 * reflection.c (mono_reflection_bind_generic_parameters): Make
26699 this work for interfaces.
26701 2003-11-11 Martin Baulig <martin@ximian.com>
26703 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
26705 2003-11-11 Martin Baulig <martin@ximian.com>
26707 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
26708 "MonoInflatedMethod" and "MonoInflatedCtor".
26710 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
26712 * reflection.c (resolution_scope_from_image): Use the assembly table
26713 from the manifest module, since other modules don't have it.
26715 * debug-helpers.c (mono_type_full_name): New helper function.
26717 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
26719 * image.c (mono_image_load_file_for_image): New public function which
26720 is a replacement for the load_file_for_image in class.c.
26722 * assembly.c (mono_assembly_load_module): A wrapper for the function
26723 above which does assembly association and reference loading too.
26725 * class.c (mono_class_from_name): Call mono_assembly_load_module.
26727 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26729 * appdomain.c: not all of the attributes for the full assembly name
26730 are required and the order doesn't matter. Fixes bug #50787.
26732 2003-11-10 Dick Porter <dick@ximian.com>
26734 * locales.c: Use platform-endian UTF16
26736 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
26738 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26740 2003-11-10 Martin Baulig <martin@ximian.com>
26743 (mono_metadata_load_generic_params): Make this actually work.
26745 * reflection.c (mono_reflection_bind_generic_parameters): If our
26746 parent is a generic instance, pass all the `types' to it, no
26747 matter whether it has the same number of type parameters or not.
26749 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
26751 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26753 * assembly.c (mono_assembly_load_references): Move the image<->assembly
26754 assignment code to this function so it gets called recursively for all
26757 * image.c (load_modules): Remove the assembly assignment since it is
26758 now done by mono_assembly_load_references.
26760 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
26761 Add 'module' argument.
26762 (mono_module_get_types): New helper function.
26763 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
26765 2003-11-08 Martin Baulig <martin@ximian.com>
26767 * class.c (mono_class_inflate_generic_method): Interface method
26768 don't have a header.
26770 * reflection.c (mono_image_get_methodspec_token): Take an
26771 additional `MonoGenericInst *' argument instead of reading it from
26772 the header; this is necessary to support interfaces.
26773 (mono_image_create_token): Pass the `MonoGenericInst *' from the
26774 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
26775 (inflated_method_get_object): Take an additional `MonoGenericInst *'
26778 * reflection.h (MonoReflectionInflatedMethod): Added
26779 `MonoGenericInst *ginst'.
26781 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
26783 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
26785 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
26787 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
26789 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
26792 (reflection_methodbuilder_from_method_builder):
26793 (reflection_methodbuilder_from_ctor_builder): New helper functions to
26794 initialize a ReflectionMethodBuilder structure.
26795 (mono_image_get_methodbuilder_token):
26796 (mono_image_get_ctorbuilder_token): New functions to emit memberref
26797 tokens which point to types in another module inside the same assembly.
26799 * reflection.c: Use the new helper functions.
26801 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
26803 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
26804 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
26806 * reflection.c (resolution_scope_from_image): Emit a moduleref if
26809 * reflection.c (mono_image_build_metadata): Emit metadata only for the
26810 current module. Emit the manifest only for the main module.
26812 * reflection.c (mono_image_create_token): Add assertion when a
26813 memberref needs to be created.
26815 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
26817 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
26818 larger buffer for the custom attribute blob. Fixes #50637.
26820 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26822 * threadpool.c: notify listener on async processing handles after
26823 invoking the async callback. Thanks to Zoltan.
26825 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26827 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
26828 avoid code duplication.
26830 * reflection.h (MonoDynamicImage): New type which is currently unused,
26831 but will be used through the ref.emit code in place of
26832 MonoDynamicAssembly.
26834 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26837 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
26838 a MonoDynamicImage instead of just a MonoImage.
26840 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
26841 icalls to ModuleBuilder but keep their semantics, so they will work
26842 with moduleb->assemblyb. This will change later.
26844 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26846 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26849 * reflection.c (mono_image_build_metadata): Avoid creation of a default
26850 main module, since it is now done by the managed code.
26852 2003-11-03 Martin Baulig <martin@ximian.com>
26854 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
26855 `ginst->klass' here.
26856 (method_encode_methodspec): Don't use the `ginst->generic_method's
26857 klass if it's a generic instance, use `ginst->klass' in this case.
26859 2003-11-03 Martin Baulig <martin@ximian.com>
26861 * reflection.c (mono_image_get_generic_method_param_info):
26862 Removed, use mono_image_get_generic_param_info() instead.
26863 (mono_image_get_type_info): Write the GenericParam table before
26864 the Method table. This is neccessary because in the GenericParam
26865 table, type parameters of the class (ie. '!0' etc.) must come
26866 before the ones from its generic methods (ie. '!!0' etc).
26868 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
26870 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
26872 2003-11-02 Martin Baulig <martin@ximian.com>
26874 * reflection.c (create_generic_typespec): Take a
26875 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
26876 the generic parameters from it.
26878 2003-11-02 Martin Baulig <martin@ximian.com>
26880 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
26881 instead of a `MonoClassField *' since we just need the type.
26882 (create_generic_typespec): New static function. Creates a
26883 TypeSpec token for a generic type declaration.
26884 (mono_image_get_generic_field_token): New static function.
26885 (mono_image_create_token): If we're a FieldBuilder in a generic
26886 type declaration, call mono_image_get_generic_field_token() to get
26889 2003-11-02 Martin Baulig <martin@ximian.com>
26892 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
26893 `MonoReflectionGenericInst *declaring_type' and
26894 `MonoReflectionGenericInst *reflected_type' fields.
26896 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
26897 `MonoReflectionGenericInst *declaring_type' and a
26898 `MonoReflectionGenericInst *reflected_type' argument instead of a
26899 single `MonoReflectionGenericInst *type' one. Set
26900 `res->declaring_type' and `res->reflected_type' from them.
26901 (mono_reflection_inflate_field): Likewise.
26903 2003-11-02 Martin Baulig <martin@ximian.com>
26905 * class.c (mono_class_setup_vtable): Don't store generic methods
26908 2003-11-02 Martin Baulig <martin@ximian.com>
26910 * reflection.h (MonoReflectionGenericInst): Added
26911 `MonoReflectionType *declaring_type'.
26913 * reflection.c (mono_reflection_bind_generic_parameters): Use
26914 `if (tb->parent)' instead of `klass->parent'.
26916 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
26918 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
26919 with an empty ASSEMBLY table.
26921 * reflection.c (mono_image_build_metadata): Avoid using the same loop
26922 variable in the inner and outer loops.
26924 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
26926 * metadata.h (mono_metadata_make_token): Put parentheses around macro
26929 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
26931 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
26932 icalls. Instead, do everything in managed code. This is needed since
26933 it is hard to restore the original domain etc. in unmanaged code in the
26934 presence of undeniable exceptions.
26936 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
26937 New icalls to push and pop appdomain refs.
26939 2003-10-31 Martin Baulig <martin@ximian.com>
26941 * class.c (inflate_generic_type): Renamed to
26942 mono_class_inflate_generic_type() and made it public.
26944 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
26947 * loader.c (mono_field_from_memberref): Also set the retklass for
26950 * fielder.c (mono_image_get_inflated_field_token): New static
26951 method; creates a metadata token for an inflated field.
26952 (mono_image_create_token, fixup_method): Added support for
26953 "MonoInflatedField".
26954 (fieldbuilder_to_mono_class_field): New static function.
26955 (mono_reflection_inflate_field): New public function.
26958 (MonoReflectionGenericInst): Added `MonoArray *fields'.
26959 (MonoReflectionInflatedField): New typedef.
26961 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
26963 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
26964 for Solaris and other platforms without s6_addr16
26966 2003-10-30 Martin Baulig <martin@ximian.com>
26968 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
26969 argument instead of two.
26970 (mono_class_inflate_generic_signature): Likewise.
26971 (inflate_generic_header): Likewise.
26972 (mono_class_inflate_generic_method): Likewise. In addition, if
26973 `ginst->klass' is set, it becomes the new `method->klass'.
26975 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
26978 * reflection.c (encode_generic_method_sig): Write a 0xa as the
26979 first byte. [FIXME]
26980 (method_encode_methodspec): If we have generic parameters, create
26981 a MethodSpec instead of a MethodRef.
26982 (fixup_method): Added support for "MonoInflatedMethod" and
26983 "MonoInflatedCtor".
26984 (mono_image_create_token): Added support for "MonoInflatedMethod"
26985 and "MonoInflatedCtor".
26986 (inflated_method_get_object): New static function; returns a
26987 managed "System.Reflection.MonoInflatedMethod" object.
26988 (mono_reflection_bind_generic_method_parameters): Return a
26989 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
26990 (mono_reflection_inflate_method_or_ctor): Likewise.
26991 (mono_image_get_generic_method_param_info): Initialize unused
26993 (mono_image_get_generic_param_info): Likewise.
26995 * reflection.h (MonoReflectionInflatedMethod): New public
26996 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
26997 "S.R.MonoInflatedCtor" classes.
26999 * loader.c (method_from_memberref): If we're a TypeSpec and it
27000 resolves to a generic instance, inflate the method.
27002 2003-10-28 Dick Porter <dick@ximian.com>
27004 * object.c (mono_runtime_run_main): Convert command-line arguments
27005 into utf8, falling back to the user's locale encoding to do so.
27007 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
27009 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
27012 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
27014 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
27015 up icalls at method definition time. Partially fixes #33569.
27017 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
27019 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
27020 marshalling of arrays. Fixes #50116.
27022 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
27024 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
27025 points to a vtable in the dying appdomain.
27027 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
27028 listeners into unmanaged code inside the lock.
27030 * object.c (mono_class_vtable): Turn off typed allocation in non-root
27031 domains and add some comments.
27033 2003-10-25 Martin Baulig <martin@ximian.com>
27035 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
27037 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
27039 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
27040 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
27041 currently parsing. Create the generic class and store it in
27042 `generic_inst->klass' before parsing the type arguments. This is
27043 required to support "recursive" definitions; see mcs/tests/gen-23.cs
27045 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
27046 to support recursive typespec entries.
27048 * class.c (mono_class_setup_parent): If our parent is a generic
27049 instance, we may get called before it has its name set.
27050 (mono_class_from_generic): Splitted into
27051 mono_class_create_from_generic() and mono_class_initialize_generic().
27053 2003-10-25 Martin Baulig <martin@ximian.com>
27055 * icall.c (ves_icall_Type_BindGenericParameters): Return a
27056 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
27057 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
27058 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
27060 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
27061 (create_typespec): Likewise.
27062 (mono_reflection_bind_generic_parameters): Return a
27063 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
27064 (mono_reflection_inflate_method_or_ctor): New public function.
27066 * reflection.h (MonoReflectionGenericInst): New typedef.
27068 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
27070 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
27071 inside the domain lock. Fixes #49993.
27073 * object.c (mono_class_vtable): When typed allocation is used,
27074 allocate vtables in the GC heap instead of in the mempool, since the
27075 vtables contain GC descriptors which are used by the collector even
27076 after the domain owning the mempool is unloaded.
27078 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
27080 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
27081 reflect what it does. Also invalidate mempools instead of freeing
27082 them if a define is set.
27084 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
27087 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
27088 hold the finalizable objects in this domain.
27090 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
27093 * appdomain.c (mono_domain_set): New function to set the current
27094 appdomain, but only if it is not being unloaded.
27096 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
27097 appdomain which is being unloaded.
27099 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
27100 unloading of the root appdomain.
27102 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
27103 icall to execute a method in another appdomain. Intended as a
27104 replacement for InternalSetDomain, which can confuse the code
27105 generation in the JIT.
27107 * appdomain.c (mono_domain_is_unloading): New function to determine
27108 whenever an appdomain is unloading.
27110 * appdomain.c (mono_domain_unload): New function to correctly unload
27113 * assembly.c (mono_assembly_load_references): Check that an assembly
27114 does not references itself.
27116 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
27117 domain manually, it asks the finalizer thread to do it, then waits for
27118 the result. Also added a timeout.
27120 * icall.c: Register the new icalls.
27122 * threads.h threads.c: Export the mono_gc_stop_world and
27123 mono_gc_start_world functions.
27125 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
27126 function to fill out the mempool with 0x2a.
27128 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
27130 * reflection.h (MonoReflectionMethodAux): New structure to store
27131 information which is rarely used, thus is not in the MonoMethod
27134 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
27135 store the aux info.
27137 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
27138 and marshalling info into the aux structure.
27140 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
27141 from the aux structure.
27143 * loader.c (mono_method_get_param_names): Retrieve the param names from
27146 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
27148 * exception.h exception.c: Add AppDomainUnloadedException && fix
27151 2003-10-21 Dick Porter <dick@ximian.com>
27154 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
27155 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
27157 2003-10-21 Martin Baulig <martin@ximian.com>
27159 * reflection.c (mono_reflection_bind_generic_parameters):
27160 `klass->parent' is NULL for interfaces.
27162 2003-10-21 Martin Baulig <martin@ximian.com>
27164 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27166 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
27168 * exception.c (mono_exception_from_name_msg): New helper function for
27169 creating exceptions and initializing their message field.
27171 * exception.c: Simplify functions using the new helper.
27173 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
27176 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
27177 mono_raise_exception, since otherwise gcc doesn't generate the function
27178 epilog for raise_exception, confusing the stack unwinding in the JIT.
27181 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
27182 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
27185 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27187 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
27190 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
27192 * icall.c: Removed GetUninitializedObject method because
27193 AllocateUninitializedClassInstance does the same.
27195 2003-10-18 Martin Baulig <martin@ximian.com>
27197 * class.c (inflate_generic_signature): Renamed to
27198 mono_class_inflate_generic_signature() and made it public.
27199 (my_mono_class_from_generic_parameter): New static function; if we
27200 don't already have the generic parameter's MonoClass, create a
27201 very simple one which is just used internally in the runtime and
27202 not passed back to managed code.
27204 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
27206 * metadata.h (MonoMethodSignature): Moved the
27207 `MonoGenericParam *gen_params' to the MonoMethodHeader.
27208 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
27210 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
27211 ves_icall_MonoMethod_GetGenericArguments(); this is now an
27212 interncall on the MonoMethod class, not on MethodInfo.
27213 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
27214 calling mono_reflection_bind_generic_method_parameters() directly.
27216 * loader.c (mono_method_get_signature): If this is a MethodSpec;
27217 return the already computed `method->signature'.
27218 (method_from_methodspec): New static function to load a method
27219 from a MethodSpec entry.
27220 (mono_get_method_from_token): Call the new method_from_methodspec()
27221 for MethodSpec tokens.
27222 (mono_get_method_from_token): If we're a generic method, load the
27225 * reflection.c (mono_image_get_memberref_token): Allow
27226 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
27228 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
27229 (mono_image_create_token): First check whether it's a generic
27230 method (so we'd need to create a MethodSpec), then do the other
27232 (mono_reflection_bind_generic_method_parameters): Return a
27233 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
27234 called directly from the interncall.
27236 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
27238 * reflection.c (load_public_key): Move loading of the public key
27241 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
27243 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
27246 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
27247 culture, hash_alg and public_key. Fixes #49555.
27249 2003-10-17 Martin Baulig <martin@ximian.com>
27251 * class.h (MonoGenericInst): Moved this declaration here and added
27252 `MonoMethod *generic_method'.
27255 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
27256 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
27258 * metadata.c (mono_metadata_type_equal): Two types of
27259 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
27260 index; ie. don't compare the address of the `MonoGenericParam'
27262 (mono_metadata_load_generic_params): Removed the `MonoMethod
27265 * metadata.h (MonoGenericInst): Moved declaration to class.h.
27266 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
27268 * reflection.c (method_encode_signature): Encode the number of
27269 generic parameters.
27270 (encode_generic_method_sig): New static function.
27271 (method_encode_methodspec): New static function; creates an entry
27272 in the MethodSpec table for a generic method.
27273 (mono_image_get_methodspec_token): New static function.
27274 (mono_image_create_token): Call mono_image_get_methodspec_token()
27275 for generic methods.
27276 (mono_reflection_bind_generic_method_parameters): New public
27277 function. Instantiates a generic method.
27279 2003-10-16 Martin Baulig <martin@ximian.com>
27281 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
27282 *gen_params' here from MonoMethodHeader.
27284 * metadata.c (mono_metadata_parse_method_signature): If we have
27285 generic parameters, initialize `method->gen_params' and then set
27286 the correct `type->data.generic_param' in all the parameters.
27288 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
27290 * threads.c (mono_threads_get_default_stacksize): New function to
27291 return the default stacksize.
27293 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
27294 termination of the finalizer thread, since the previous method had
27295 race conditions. Fixes #49628.
27297 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
27298 as for the other managed threads.
27300 2003-10-16 Martin Baulig <martin@ximian.com>
27302 * class.c (inflate_generic_signature): Copy `generic_param_count'
27305 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
27308 * metadata.c (mono_metadata_parse_method_signature): Actually set
27309 the `method->generic_param_count' here.
27310 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
27312 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
27314 * object.h: Add a new field to TypedRef to simplify the implementation
27315 of the REFANY opcodes in the JIT.
27317 * icall.c: Make use of the new field.
27319 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
27322 2003-10-15 Martin Baulig <martin@ximian.com>
27324 * class.c (mono_class_from_gen_param): Renamed to
27325 mono_class_from_generic_parameter() and moved most of the
27326 functionality from mono_reflection_define_generic_parameter()
27327 here; ie. we create a "real" class here.
27328 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
27329 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
27330 previously been called.
27332 * class.h (MonoGenericParam): Moved the declaration of this struct
27333 here from metadata.h and added `MonoMethod *method'.
27335 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
27338 * loader.c (mono_get_method_from_token): If we have any generic
27339 parameters, call mono_metadata_load_generic_params() to read them
27340 from the MONO_TABLE_GENERICPAR.
27342 * metadata.c (mono_metadata_load_generic_params): Added
27343 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
27345 * metadata.h (MonoMethodSignature): Replaced
27346 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
27347 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
27349 * reflection.c (mono_reflection_define_generic_parameter): Moved
27350 most of the functionality into the new
27351 mono_class_from_generic_parameter(); set the `method' field if
27352 we're a method parameter.
27354 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
27356 * marshal.c (emit_struct_conv): if native size is 0
27359 2003-10-14 Martin Baulig <martin@ximian.com>
27361 * icall.c: The generics API has changed in the spec since it was
27362 added to System.Type; these modifications make it match the spec
27364 (ves_icall_Type_GetGenericParameters): Renamed to
27365 `ves_icall_Type_GetGenericArguments'.
27366 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
27367 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
27368 `ves_icall_MonoType_get_HasGenericArguments'.
27369 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
27370 `ves_icall_MonoType_get_IsGenericParameter'.
27371 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
27372 this is no interncall anymore.
27373 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
27374 `ves_icall_TypeBuilder_get_IsGenericParameter'.
27376 2003-10-14 Martin Baulig <martin@ximian.com>
27378 * reflection.c (mono_reflection_bind_generic_parameters): Also
27379 inflate generic methods if we're reading the class from IL.
27381 2003-10-13 Martin Baulig <martin@ximian.com>
27383 * reflection.c (mono_reflection_define_generic_parameter): This
27384 method isn't called directly from the icall anymore; take a
27385 `MonoReflectionAssemblyBuilder *' so we can use this for type and
27386 method generic parameters.
27387 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
27388 (method_builder_encode_signature): Encode generic parameters.
27389 (mono_image_get_method_info): Write generic params to the
27390 MONO_TABLE_GENERICPARAM table.
27392 * reflection.h (MonoReflectionMethodBuilder): Added
27393 `MonoArray *generic_params'.
27395 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
27397 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
27398 wrapper for mono_reflection_define_generic_parameter().
27399 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
27401 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
27403 * marshal.h: Add missing function to fix build.
27405 * marshal.c (mono_marshal_get_native_wrapper): Add support for
27406 the SetLastError pinvoke attribute.
27408 * marshal.c (mono_marshal_set_last_error): New helper function called
27409 by the generated code.
27411 * marshal.c (mono_mb_emit_branch): New helper function.
27413 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
27415 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
27416 classes as parameters and return values of delegates. Fixes #29256.
27418 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
27420 * locales.c: use gint32 in non HAVE_ICU case
27422 2003-10-11 Martin Baulig <martin@ximian.com>
27424 * mono-debug.c (mono_debug_add_method): Added a workaround for
27427 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
27429 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
27430 delegates passed to native code must use the STDCALL calling
27431 convention. Fixes #35987.
27433 2003-10-10 Martin Baulig <martin@ximian.com>
27435 * class.c (inflate_generic_type): If we're inflating for a generic
27436 type instance (and not for a generic method), return
27437 MONO_TYPE_MVAR unchanged.
27439 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27441 * string-icalls.c: Join ignores null strings in the source array.
27442 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
27443 * threads.c: GetAvailableTheads is slightly more accurate.
27445 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
27447 * threads.h threads.c : add mono_threads_set_default_stacksize
27448 and pass default to CreateThread calls.
27450 2003-10-09 Dick Porter <dick@ximian.com>
27454 * locales.c: Internal calls for constructing CultureInfo and
27455 related objects from libicu (if its available.)
27457 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
27459 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
27461 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27463 * threadpool.c: added an argument to async_invoke_thread that is the
27464 item to process, pass the MonoAsyncResult to the thread start function
27465 when creating a new thread. This way we don't need to acquire any lock
27466 when we're creating a new thread. Readded a semaphore for faster
27467 response times (instead of that Sleep i added).
27469 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
27471 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
27472 get daylight change dates better on Windows, fix handling
27473 of platforms without tm_gmtoff.
27475 2003-10-06 Martin Baulig <martin@ximian.com>
27477 * class.c (inflate_generic_method): Renamed to
27478 mono_class_inflate_generic_method() and made public.
27479 (mono_class_init): Don't inflate the generic methods here.
27480 (mono_class_from_generic): Added `gboolean inflate_methods'
27481 argument. Inflate the methods here.
27483 * loader.c (mono_method_get_param_names): Ignore instances of
27484 generic types for the moment.
27486 * reflection.c (fixup_method): Added support for inflated methods.
27487 (mono_image_create_token): Use mono_image_get_methodref_token()
27488 for inflated methods.
27489 (mono_custom_attrs_from_param): Ignore instances of generic types
27491 (mono_reflection_bind_generic_parameters): New public function.
27492 Moved all the functionality from
27493 ves_icall_Type_BindGenericParameters() here and added support for
27495 (mono_reflection_define_generic_parameter): Initialize
27496 `klass->methods' here.
27498 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
27499 functionality into mono_reflection_define_generic_parameter().
27500 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
27501 TypeBuilder, return that TypeBuilder.
27503 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27505 * appdomain.c: removed mono_delegate_semaphore.
27508 (mono_thread_pool_add): moved hash table creation inside and the thread
27509 creation outside of the critical region.
27510 (mono_thread_pool_finish): removed obsolete code.
27511 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
27512 continue or exit the thread depending on the queue.
27514 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
27516 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
27517 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
27518 handle more bool marshalling options
27520 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
27522 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
27523 arrays of structs. Also add a more descriptive error message when
27524 a structure member is marshalled as LPArray.
27526 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
27528 * marshal.c (mono_marshal_get_native_wrapper): Add support for
27529 marshalling arrays of complex types. Fixes #29098. Also remove an
27530 usused and incomplete function.
27532 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27534 * gc.c: report heap_size - free_bytes as total memory allocated
27537 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
27539 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
27540 fix timezone handling problems on Windows.
27542 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
27543 asserts when the year is outside the range handled by ms the functions.
27545 * class.c (setup_interface_offsets): If the class is an interface,
27546 fill out its interface_offsets slot.
27548 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27550 * threadpool.c: mark threadpool threads as background.
27552 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
27554 * decimal.c - define DECINLINE to nothing if not using GCC
27556 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
27558 * assembly.c: More refcount fixes.
27560 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27562 * string-icalls.c: if we're not trimming, return the same string.
27563 When not splitting, don't create a new string.
27565 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27568 (mono_image_open): increment the ref_count inside the critical section.
27570 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
27572 * image.c (mono_image_open): Fix reference counting bug.
27574 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
27576 * marshal.c (mono_marshal_type_size) struct alignment changed for
27577 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
27578 64bits. Avoid leak in mono_marshal_get_native_wrapper when
27579 mono_lookup_pinvoke_call throws.
27581 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
27583 * reflection.c (mono_reflection_parse_type): Fix #49114.
27585 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
27586 temporary workaround for cygwin header problem.
27588 * object.c (mono_object_isinst): Synchronize this with the code
27589 generated by the JIT for casts.
27591 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
27593 * reflection.c (encode_type): Fix #38332.
27595 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
27597 * marshal.c (mono_marshal_method_from_wrapper): New function to return
27598 the original method from the wrapper method.
27600 2003-09-25 Martin Baulig <martin@ximian.com>
27602 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
27603 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
27604 (ves_icall_Type_get_IsGenericInstance): New interncall.
27606 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
27608 * object.c: fix cast warning in big endian code.
27610 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
27612 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
27614 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27616 * assembly.c: don't call check_env from mono_assembly_load. It's
27617 already done once in mono_assemblies_init and may cause headaches when
27618 multiple threads are loading assemblies.
27620 2003-09-19 Martin Baulig <martin@ximian.com>
27622 * reflection.c (mono_reflection_define_generic_parameter): Don't
27623 allocate `klass->methods', set `klass->flags' to
27624 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
27626 2003-09-18 Martin Baulig <martin@ximian.com>
27628 * class.c (mono_class_init): Don't create `class->methods' if it's
27629 already initialized.
27631 * metadata.c (mono_metadata_load_generic_params): Make this
27634 * reflection.c (mono_reflection_define_generic_parameter): Set
27635 parent class and interfaces from the constraints.
27637 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
27638 to keep this struct in sync with the declaration in TypeBuilder.cs.
27640 2003-09-17 Martin Baulig <martin@ximian.com>
27642 * metadata.h (MonoType): Replaced the data's `int type_param'
27643 field with `MonoGenericParam *generic_param'.
27644 (MonoGenericParam): Added `MonoClass *klass'.
27646 * class.c (mono_class_from_gen_param): Removed the
27647 `MonoImage *image' and `int type_num' arguments.
27649 * metadata.c (mono_metadata_parse_generic_param): New static
27650 method; creates a MonoGenericParam which just contains the index.
27651 (do_mono_metadata_parse_type): Call
27652 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
27655 * reflection.c (mono_image_typedef_or_ref): Generic type
27656 parameters may be in the same assembly, but never use a typedef
27658 (mono_reflection_define_generic_parameter): We're now creating a
27659 "real" class for the type parameter; it's now safe to call
27660 mono_class_from_mono_type() on the class'es type, it'll do the
27663 2003-09-16 Martin Baulig <martin@ximian.com>
27665 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
27666 `symfile->range_entry_size' and `symfile->class_entry_size' here;
27667 the `symfile' data structure must be fully initialized before it
27668 gets added to the table.
27670 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
27672 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
27674 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
27675 class init trampolines.
27677 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
27679 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
27680 to the built-in profiler to turn off time and allocation profiling
27683 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
27685 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
27688 * debug-helpers.c (mono_method_full_name): Print the wrapper type
27689 in human readable form.
27691 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
27693 * reflection.c icall.c: Fixed warnings.
27695 * image.c (load_class_names): Use a temporary hash table to hold the
27696 namespaces in order to avoid doing many string comparisons.
27698 * image.h: Fix typo.
27700 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
27701 Pass NULL instead of g_direct_equal to the GHashTable constructor
27702 since the NULL case is short-circuited inside g_hash_table_lookup,
27703 leading to better performance.
27705 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
27706 obtain the first custom attribute for a given index. Depends on the
27707 CustomAttribute table being sorted by the parent field.
27709 * reflection.c (mono_custom_attrs_from_index): Use the new function
27710 for better performance.
27712 2003-09-07 Martin Baulig <martin@ximian.com>
27714 * class.c (mono_class_init): If we're a generic instance, inflate
27715 all our methods instead of loading them from the image.
27716 (mono_class_from_generic): Set `class->methods = gklass->methods'.
27718 2003-09-07 Martin Baulig <martin@ximian.com>
27720 * mono-debug-debugger.c: Added support for constructors.
27722 2003-09-06 Martin Baulig <martin@ximian.com>
27724 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
27727 * reflection.c (mono_reflection_setup_generic_class): Call
27728 ensure_runtime_vtable() to create the vtable.
27730 2003-09-05 Martin Baulig <martin@ximian.com>
27732 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
27735 2003-09-04 Martin Baulig <martin@ximian.com>
27737 * reflection.c (mono_reflection_define_generic_parameter): Generic
27738 parameters start with zero.
27740 2003-09-04 Martin Baulig <martin@ximian.com>
27742 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27744 * reflection.h (MonoReflectionGenericParam): New typedef.
27745 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
27746 the generic parameters from the managed TypeBuilder.
27748 * reflection.c (mono_reflection_define_generic_parameter): New function.
27749 (mono_reflection_create_runtime_class): Encode generic parameters.
27750 (mono_reflection_setup_generic_class): New function; this is
27751 called after adding adding all generic params to the TypeBuilder.
27752 (encode_type): Added MONO_TYPE_VAR.
27754 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
27756 * class.h class.c (mono_class_needs_cctor_run): Moved this method
27759 * assembly.h assembly.c: Moved the AOT loading code into an assembly
27762 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
27764 * reflection.h reflection.c class.h class.c: Delete duplicate
27765 definition of mono_type_get_name () from reflection.c and export the
27768 * class.c: Class loading fixes from Bernie Solomon
27769 (bernard@ugsolutions.com).
27771 * reflection.c: Endianness fixes from Bernie Solomon
27772 (bernard@ugsolutions.com).
27774 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
27776 * assembly.h assembly.c: Define a file format version for AOT
27779 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
27781 * appdomain.h (MonoJitInfo): New field to determine whenever the
27782 code is domain neutral.
27784 2003-08-31 Miguel de Icaza <miguel@ximian.com>
27786 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
27788 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
27790 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
27791 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
27792 Avoid caching the result since strings must be domain specific. Fixes
27795 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
27797 * marshal.c (mono_marshal_init): Make this callable multiple times
27798 since it is hard to find a correct place to call it.
27800 * object.c (mono_runtime_class_init): Execute static constructors in
27801 the correct appdomain.
27803 * image.c (build_guid_table): Handle the case when multiple images have
27806 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27808 * icall.c: added a couple of icalls for System.Web.
27810 2003-08-28 Martin Baulig <martin@ximian.com>
27812 * icall.c (ves_icall_Type_BindGenericParameters): Use
27813 `klass->generic_inst' instead of `&klass->byval_arg' in the
27814 mono_type_get_object() call. The returned type must be
27815 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
27817 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
27821 * object.c (mono_class_proxy_vtable): Make it thread safe.
27823 * pedump.c: Fix warning.
27825 * object.c appdomain.h: Get rid of metadata_section.
27826 It is no longer needed and it was causing deadlocks with domain->lock.
27828 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
27830 2003-08-26 Martin Baulig <martin@ximian.com>
27832 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
27834 2003-08-26 Martin Baulig <martin@ximian.com>
27836 * pedump.c (main): Call mono_metadata_init(),
27837 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
27838 and mono_loader_init().
27840 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
27842 * loader.h: Add missing include to fix build.
27844 * image.h: mono_image_load_references is no more.
27846 * assembly.c: Reworked assembly loading to make it really thread safe.
27847 After these changes, the assembly returned by mono_assembly_open is
27848 fully initialized, i.e. all its references assemblies are loaded.
27850 * assembly.c (mono_image_load_references): Renamed to
27851 mono_assembly_load_references, and made private, since clients no
27852 longer need to call it.
27854 * class.c: Removed calls to mono_assembly_load_references, since it was
27855 a source of deadlocks.
27857 * loader.h loader.c class.h class.c: Protect data structures using a
27858 new lock, the loader lock.
27860 * class.c (mono_class_setup_vtable): Create temporary hash tables and
27861 GPtrArrays only when needed.
27863 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
27864 into empty structures by mcs. Fixes pinvoke7.cs.
27866 * domain.c (mono_init): Call a new initialization function.
27868 * appdomain.c (mono_runtime_init): Call the new initializer function
27869 of the marshal module.
27871 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
27872 inserted into empty structures by mcs. Fixes pinvoke7.cs.
27874 * marshal.h marshal.c: Added locks around the wrapper caches to make
27875 this module thread safe.
27877 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
27878 this argument. Fixes pinvoke1.exe.
27880 2003-08-25 Lluis Sanchez <lluis@ximian.com>
27882 * object.h: Added call_type field to MonoMethodMessage and the corresponding
27883 enumeration of values. Removed fields to store remote call output values in
27884 MonoAsyncResult. Not needed any more.
27885 * object.c: Initialize call_type and async_result fields in mono_message_init.
27886 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
27887 dispatching the message.
27888 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
27889 async call to finish. To do it use a message with EndInvoke call type.
27891 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
27893 * loader.h loader.c (mono_method_hash_marhal_info): New function which
27894 determines whenever a method has marshalling info.
27896 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27898 * assembly.c: fix the build on windows.
27900 2003-08-22 Lluis Sanchez <lluis@ximian.com>
27902 * object.cs: Fixed bug #47785.
27904 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
27906 * string-icalls.c (StringReplace): If their are no occurances of
27907 the old string found return a reference to the supplied
27908 string. This saves some memory and matches MS behavoir.
27910 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27912 * socket-io.c: fixed compilation for systems that define AF_INET6
27913 and don't define SOL_IP/SOL_IPV6.
27915 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
27917 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
27918 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
27920 * rawbuffer.c rawbuffer.h: Make this module thread safe.
27922 * domain.c: Make this module thread safe.
27924 * domain.c (mono_init): Call new initialization function.
27926 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
27927 reference types too. Fixes #38812.
27929 * image.c (mono_image_init): Fixed warnings.
27931 * class.c (mono_class_from_typeref): Handle assembly load failure
27934 * appdomain.c (add_assemblies_to_domain): Handle the case when
27935 the references of an assembly are not yet loaded.
27937 * metadata.c image.c assembly.c: Moved initialization of global
27938 variables to a separate function called at startup since lazy
27939 initialization of these variables is not thread safe.
27941 * image.c assembly.c: Made this module thread safe by adding locks in
27942 the appropriate places.
27944 * domain.c (mono_init): Call the new initialization functions of the
27947 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
27949 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
27950 make a direct call. It is proxy's work to make the call asynchronous.
27951 mono_delegate_end_invoke(): If the targe is a proxy, just collect
27953 * object.cs: mono_method_call_message_new(): read AsyncResult and
27954 state object from parameters list, if this info is requested.
27955 * object.h: Added fields to store remote call output values in
27956 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
27958 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27960 * object.h: add needed fields to MonoThread.
27961 * threads.c, threads.h: allow registering a function to cleanup data
27962 allocated per thread by the JIT.
27964 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27966 * loader.h: portability fix by Bernie Solomon
27967 * <bernard@ugsolutions.com>.
27969 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
27971 * reflection.h reflection.c (mono_param_get_objects): Changed this to
27972 return a MonoArray. This simplifies the code and also ensures that
27973 the cache allways contains an object reference as a value.
27975 * icall.c (ves_icall_get_parameter_info): Simplified using the new
27978 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27980 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
27981 fixes a problem with byte ordering when getting the address family for
27984 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
27986 * .cvsignore: Added monosn.
27988 * reflection.h reflection.c loader.c: Added support for parameter
27989 marshalling to dynamically created types. Fixes #47295.
27991 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
27993 * rand.c: remove useless warnings.
27995 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27997 * class.c: implemented ldtoken for methods and fieldrefs.
27999 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28001 * threadpool.c: when mono_async_invoke was called, no one took care of
28002 monitoring the queue. So if the method invoked took some time and we
28003 got new async invoke requests after 500 ms (the thread created waited
28004 that long in WaitForSingleObject), the new async invoke was not called
28005 until the previous one finished.
28007 This is fixed now. Thanks to Totte for helping with it.
28009 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28011 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
28013 2003-08-11 Martin Baulig <martin@ximian.com>
28015 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
28017 2003-08-06 Martin Baulig <martin@ximian.com>
28019 * mono-debug-debugger.c: Added support for static fields,
28020 properties and methods.
28022 2003-08-06 Martin Baulig <martin@ximian.com>
28024 * mono-debug-debugger.c: Don't store the MonoString's vtable to
28025 make this work for applications with multiple application domains.
28027 2003-08-04 Martin Baulig <martin@ximian.com>
28029 * mono-debug-debugger.c: Completely reworked the type support; the
28030 most important thing is that we're now just using one single
28031 `MonoType' instance per type.
28033 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
28035 * mono-endian.h, mono-endian.c, icall.c: Added icall
28036 ves_icall_System_Double_AssertEndianity to assert double word endianity
28037 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
28039 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28041 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
28042 support, icalls and fixes.
28044 2003-07-31 Miguel de Icaza <miguel@ximian.com>
28046 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
28047 classes that are a punctuation character in .NET is not the same a
28050 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28052 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
28054 2003-07-29 Miguel de Icaza <miguel@ximian.com>
28056 * icall.c: Add new MemCopy internalcall.
28057 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
28058 Simplified code; It is not necessary to handle all the cases here,
28059 as the C# code takes care of it. Only handle the case of the name
28060 resource embedded into the assembly.
28062 Changed signature to return the data pointer and the size of the
28065 2003-07-26 Miguel de Icaza <miguel@ximian.com>
28067 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
28068 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
28070 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
28072 * socket-io.c: ignore EINTR error in select.
28074 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28076 * class.h, class.c: removed unused subclasses field in MonoClass.
28078 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
28080 * icall.c: improve fix of get_base_definition(). If the parent class
28081 doesn't have the mehod, look at the parent of the parent.
28082 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
28083 to check if a parameter is an in or out parameter
28084 (PARAM_ATTRIBUTE_IN is not set by default).
28085 mono_method_return_message_restore(): Use mono_class_value_size to
28086 get the size of a value type. mono_type_stack_size (parameterType)
28087 does not return the correct value if parameterType is byRef.
28088 mono_load_remote_field(), mono_load_remote_field_new(),
28089 mono_store_remote_field(), mono_store_remote_field_new():
28090 raise exception if the remote call returns an exception.
28092 2003-07-28 Martin Baulig <martin@ximian.com>
28094 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
28095 method. This is a wrapper around mono_runtime_invoke() which
28096 boxes the instance object if neccessary.
28098 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28100 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
28101 metadata.h, row-indexes.h, verify.c: first cut of generics support.
28103 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28105 * icall.c: disable mcs bug workaround.
28107 2003-07-21 Miguel de Icaza <miguel@ximian.com>
28109 * object.c (mono_runtime_class_init): Take the metadata_section
28110 mutex before obtaining the domain mutex.
28112 * appdomain.h: Added definition of metadata_section mutex here.
28114 * object.c: define metadata_mutex here.
28116 2003-07-24 Ravi Pratap <ravi@ximian.com>
28118 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
28121 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
28123 * reflection.c: Fix bug #46669
28125 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28130 * object.h: fill in the type name for TypeLoadException.
28132 2003-07-23 Ravi Pratap <ravi@ximian.com>
28134 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
28135 relationship between TypeBuilders while compiling corlib) and bug
28136 45993 (Array types returned from the runtime while compiling
28137 corlib were from the loaded corlib).
28139 2003-07-22 Martin Baulig <martin@ximian.com>
28141 * mono-debug-debugger.c: Reworked the type support a bit more;
28142 distinguish between types and classes.
28144 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
28146 * icall.c: add IsArrayImpl icall.
28148 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
28150 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
28151 initializing real_size only once. Also fix bug #46602.
28153 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
28155 * object.c: Renamed mono_metadata_section to metadata_section.
28157 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
28159 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
28160 empty array if the type is an array. Fixed.
28161 ves_icall_MonoMethod_get_base_definition: if the base method
28162 is abstract, get the MethodInfo from the list of methods of
28164 * reflection.c: ParameterInfo.PositionImpl should be zero-based
28165 and it was 1-based. Fixed in mono_param_get_objects.
28167 2003-07-20 Martin Baulig <martin@ximian.com>
28169 * mono-debug.h: Set version number to 31.
28170 (mono_debug_init): Added `MonoDomain *' argument.
28172 * mono-debug-debugger.c: Reworked the type support; explicitly
28173 tell the debugger about builtin types; pass the `klass' address to
28176 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
28178 * image.c: Allow new metadata tables to be loaded without a
28179 warning. Also update the warning message to give the new constant value.
28181 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
28183 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
28184 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
28185 array type representation changes.
28187 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28189 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
28190 on Environment.Exit () call.
28192 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
28194 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
28195 requires a matching corlib.
28197 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
28199 * Changelog: My editor decided to add a CR to each line. Sorry about that.
28200 Committed again without the CRs.
28202 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
28204 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
28205 getting it from the "this" socket instance. Did not work
28206 if the socket is a subclass of Socket.
28207 Also fixed bug #35371.
28209 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28211 * metadata.c: fixed size for TypedByRef.
28212 * loader.c: when searching for a method, consider the vararg amrker.
28213 * unicode.c, decimal.c: constify some arrays.
28215 2003-07-15 Dick Porter <dick@ximian.com>
28217 * socket-io.c: Fixed compilation for gcc < 3.2.
28219 Fixed compilation for machines that don't have AF_INET6 (thanks to
28220 Bernie Solomon <bernard@ugsolutions.com> for that part.)
28222 Fixed compile warnings.
28224 Fixed formatting and line endings.
28226 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
28229 * socket-io.c: Added IPv6 support.
28231 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
28233 * class.c (mono_class_is_assignable_from): New function to implement
28234 the is_assignable_from logic. Used by mono_object_isinst,
28235 Type::IsAssignableFrom () and the interpreter.
28237 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
28238 Object, even interfaces.
28240 * object.c (mono_object_isinst): Implement in terms of
28241 is_assignable_from.
28243 * icall.c (ves_icall_type_is_assignable_from): New icall.
28245 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
28247 * domain.c (foreach_domain): fix compiler warning.
28249 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
28251 * image.c (load_metadata_ptrs): use g_strndup because strndup is
28252 not available on all plattforms
28254 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
28256 * image.h image.c: Store the metadata version string in MonoImage.
28257 * icall.c: New icall to retrieve the image version.
28258 * reflection.c (create_dynamic_image): Fill in the image version field
28259 * reflection.c (build_compressed_metadata): Use the image version
28260 from the image structure.
28262 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28264 * appdomain.c: modified comment.
28265 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
28266 That will be its last iteration when mono_gc_cleanup is called from
28267 mono_runtime_cleanup and before the domain is unloaded.
28271 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
28273 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
28276 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28278 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
28279 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
28280 Bernie Solomon <bernard@ugsolutions.com>.
28282 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28284 * object.c, object.h: provide mono_object_new_fast() for faster
28285 allocation in some special cases.
28287 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
28289 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
28290 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
28292 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
28294 * threadpool.c: fix leaks.
28296 2003-07-01 Dick Porter <dick@ximian.com>
28298 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
28299 using MonoGHashTables. Fixes threadpool bug posted to list.
28301 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
28303 * image.h, image.c: added support to load an assembly from a byte array.
28304 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
28305 assembly bundle support.
28307 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
28309 * threadpool.c (mono_thread_pool_add): keep a reference to the
28310 AsyncResult to prevent GC
28312 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28314 * class.c: leak fix.
28316 2003-06-25 Dick Porter <dick@ximian.com>
28318 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
28319 for the async object, the WaitHandle object will close the handle.
28322 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28324 * class.c: in mono_array_class_get (), lookup from the hash with the
28325 same type we insert: this works around a bug in
28326 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
28327 lluis. The real fix will have to wait for after the release.
28329 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28331 * icall.c: fix memory leak when getting type members.
28333 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28335 * reflection.c: added more pubtoken special cases.
28337 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
28339 * class.c: handle field offset correctly when class size
28340 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
28342 2003-06-20 Martin Baulig <martin@ximian.com>
28344 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
28347 2003-06-20 Martin Baulig <martin@ximian.com>
28349 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
28351 2003-06-20 Martin Baulig <martin@ximian.com>
28353 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
28354 just distinguish between variables in registers and variables at
28355 an offset relative to a register.
28357 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28359 * icall.c: #ifdef out latest changes until mcs is fixed.
28361 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28363 * icall.c: return members in metadata order.
28365 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28367 * icall.c: avoid infinite loop in GetTimeZoneData.
28369 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
28371 * icall.c: added Marshal.Prelink/All icalls.
28373 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28375 * object.c, object.h: fix warnings and do some overflow checking
28376 when creating arrays.
28378 2003-06-17 Dick Porter <dick@ximian.com>
28381 * file-io.c: File attributes need to be tweaked slightly when
28382 passed from the managed to the w32 world.
28384 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
28385 * profiler.h profiler-private.h profiler.c: Rework last patch
28386 based on suggestion by Paolo.
28388 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
28390 * profiler.h profiler-private.h profiler.c: Added infrastructure for
28391 instruction level coverage data collection.
28392 * profiler.h profiler.c (: Added new callback function which can be
28393 used by the profiler to limit which functions should have coverage
28395 * profiler.c (mono_profiler_load): Call g_module_build_path to
28396 generate the file name of the profiler library.
28398 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28400 * profiler.c, profiler.h, profiler-private.h: added basic block
28401 coverage profiling API.
28403 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
28405 * reflection.c (mono_reflection_create_runtime_class): Add support
28406 for events in dynamically generated code.
28408 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
28411 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28413 * icall.c: when getting timezone info, return reasonable values if we
28414 can't get the actual data.
28416 2003-06-14 Dick Porter <dick@ximian.com>
28418 * threads.c (start_wrapper): Remove the reference to the thread
28419 object in the TLS data, so the thread object can be finalized.
28420 This won't be reached if the thread threw an uncaught exception,
28421 so those thread handles will stay referenced :-( (This is due to
28422 missing support for scanning thread-specific data in the Boehm GC
28423 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
28425 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
28427 * reflection.c: ensure streams and tables are first allocated with
28428 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
28430 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28432 * icall.c: fixed GetElementType for byrefs (bug# 44792).
28434 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
28436 * reflection.c (mono_reflection_create_runtime_class): Add support for
28437 properties to dynamically created classes.
28438 * reflection.c: Fix a few places where non-MonoObjects were inserted
28439 into the tokens hashtable.
28441 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28443 * object.c: some support to handle out of memory exceptions.
28445 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
28447 * marshal.c (mono_marshal_get_native_wrapper): support reference
28450 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28452 * object.h, object.c: more portability stuff from Bernie Solomon.
28453 Unexport mono_object_allocate(). Added mono_object_unbox ().
28454 Set exitcode when an unhandled exception is thrown.
28456 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
28458 * marshal.c (mono_marshal_get_native_wrapper): use custom
28459 marshaler for return types.
28461 2003-06-10 Dick Porter <dick@ximian.com>
28463 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
28464 ip_mreq is available
28466 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
28468 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
28469 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
28470 by Bernie Solomon <bernard@ugsolutions.com>.
28472 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
28474 * gc.c (mono_gc_init): Avoid error message on shutdown when
28475 GC_DONT_GC=1 is used.
28477 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
28478 New icall to return the GUID of a module.
28480 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28482 * class.c: ensure instance size always includes the parent's size
28483 even whem class size is set explicitly (fixes bug#44294).
28485 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28487 * profiler.h, profiler.c: made the simple profiler thread-safe,
28488 get more accurate timing info. Allow the loading of an
28489 externally-developed profiler module.
28491 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
28493 * marshal.c (mono_marshal_get_native_wrapper): improved
28494 class/byref arguments.
28495 (mono_marshal_get_native_wrapper): better string marshaling support.
28497 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
28499 * class.c: ensure .pack and .size are handled correctly and
28500 simplified layout of static fields.
28502 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
28505 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
28507 * loader.c (mono_lookup_pinvoke_call): look for modules in the
28508 current directory (fix bug 44008)
28510 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
28512 * marshal.c (mono_marshal_get_native_wrapper): started support for
28514 (mono_delegate_to_ftnptr): consider marshalling specifications
28516 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
28518 * reflection.c, reflection.h: emit custom marshal info.
28520 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28522 * object.c: free the GError.
28523 * icall.c: added CloseEvent_internal.
28525 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
28528 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
28530 * loader.c (mono_method_get_signature): Add support for dynamic
28533 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
28535 * reflection.c: fixed bug #43905.
28537 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28539 * class.c, domain.c, icall.c, metadata.h, object.h: support for
28540 handling TypedReference and ArgIterator.
28541 * loader.c, loader.h: added function to get signature at call site.
28543 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28545 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
28546 data readonly. Buglets and warning fixes. Some MethodSpec support.
28548 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28550 * class.h, class.c, object.c: remove relative numbering support.
28552 2003-05-26 Miguel de Icaza <miguel@ximian.com>
28554 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
28555 free the string, until we get a chance to fix Gtk#
28557 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28559 * marshal.c: revert last patch.
28561 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
28563 * icall.c: updates for new mono_class_vtable() not calling
28564 the type constructor anymore.
28566 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28568 * object.h, object.c: separate vtable creation from type
28569 initialization. Make running the .cctor thread safe.
28571 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
28573 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
28575 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
28577 * loader.c (mono_get_method): consider calling convention
28579 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
28581 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
28582 to return the invisible global type for a module.
28584 * reflection.c (mono_image_build_metadata): Emit global fields too.
28586 2003-05-20 Peter Williams <peterw@ximian.com>
28588 * loader.c (mono_lookup_internal_call): Add a few newlines.
28590 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
28592 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
28595 * appdomain.c (set_domain_search_path): Recalculate search path when
28596 AppDomainSetup.PrivateBinPath changes.
28598 * object.c (mono_class_compute_gc_descriptor): It turns out some
28599 parts of the class libs (like System.Thread) holds pointers to
28600 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
28601 to treat native int a pointer type here.
28603 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
28605 * appdomain.h, domain.c: add hashtable for jump target resolution.
28607 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
28609 * reflection.h reflection.c icall.c: Added new icalls
28610 GetManifestResourceInfoInternal, GetModulesInternal and support
28613 2003-05-16 Dick Porter <dick@ximian.com>
28617 * file-io.c: Implement System.IO.MonoIO::GetTempPath
28619 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
28621 * object.c: mono_store_remote_field: little fix to previous patch.
28623 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28625 * class.c: add constructors to array classes.
28626 * icall.c: special case array construction for InternalInvoke (),
28628 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
28630 * class.h class.c reflection.c object.c: Added support for field
28631 defaults in dynamically generated classes.
28633 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
28635 * reflection.c: properly encode charset for ddlimport.
28637 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
28639 * threads.c: allow compiling without GC.
28641 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28643 * appdomain.h, object.c, object.h, threads.c, threads.h: added
28644 handling of thread static data.
28646 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28648 * reflection.h, reflection.c: added mono_custom_attrs_free ().
28650 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
28652 * class.c (mono_array_class_get): always set the serializable flags
28653 (mono_array_class_get): always set the SEALED attribute for array types
28655 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
28657 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
28658 attributes (fix for bug 42021).
28660 2003-05-12 Dick Porter <dick@ximian.com>
28662 * gc.c: Don't run finalizers when the finalizer thread is
28663 finishing up, because the default domain has already been
28666 2003-05-11 Miguel de Icaza <miguel@ximian.com>
28668 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
28669 value is null, we should throw an exception. This is slightly
28670 different than the other conventions used for the constructor.
28672 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28674 * socket-io.c: fixed windows build.
28676 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28678 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
28680 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
28682 * object.c (mono_string_new_wrapper): Compatibility fix for MS
28685 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
28687 * class.c (mono_class_layout_fields): Add experimental GC aware
28688 auto layout facility. Requires class library changes to work correctly.
28690 (mono_class_setup_vtable): Avoid overriding explicit interface
28691 method implementations. Fixes iface3.exe test.
28693 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
28695 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
28696 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
28698 * metadata.h: Add new type classification macro which determines
28699 whenever the type holds an object reference.
28701 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
28703 * marshal.c (mono_marshal_get_native_wrapper): cleanups
28705 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
28707 * gc.c (finalizer_thread): Work around a GC bug.
28709 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
28711 * marshal.c (emit_struct_conv): allow unions
28713 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
28715 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
28717 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
28719 2003-05-06 Martin Baulig <martin@ximian.com>
28721 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
28723 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28726 (Select_internal): allow NULLs, don't create arrays if not needed.
28727 Coupled with Socket.cs changes.
28730 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
28731 register a finalizer for it that will close the semaphore handle. This
28732 fixes the leak and make Lupus' test run with > 4080 loops.
28734 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
28736 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
28737 Jerome Laban (bug #42287)
28739 2003-05-02 Martin Baulig <martin@ximian.com>
28741 * debug-mono-symfile.h
28742 (MonoSymbolFile): Moved declaration into mono-debug.h.
28743 (MonoDebugMethodJitInfo): Likewise.
28744 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
28746 (_mono_debug_address_from_il_offset): Take a
28747 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
28750 (MonoDebugDomainData): New struct.
28751 (mono_debug_get_domain_data): New function.
28752 (mono_debug_add_method): Take an additional `MonoDomain *'
28754 (mono_debug_source_location_from_address): Likewise.
28755 (mono_debug_il_offset_from_address): Likewise.
28756 (mono_debug_address_from_il_offset): Likewise.
28758 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
28760 * reflection.c: one more check for null type in custom attrs.
28762 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28764 * reflection.c: avoid warning (comparison is always false due to limited
28765 range of data type).
28767 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28769 * icall.c: throw an exception in Type.GetField if the argument 'name'
28772 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
28774 * reflection.c: fixed handling of enums in named arguments to custom
28775 attributes (bug #42123).
28777 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
28779 * reflection.c: use the right array element type and handle
28780 a null for a Type argument, too.
28782 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
28784 * reflection.c: handle arrays as arguments to custom attributes.
28786 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28788 * reflection.c: handle a string value in a custom attr
28789 ctor that takes an object.
28791 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
28793 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
28796 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
28798 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
28800 2003-04-27 Martin Baulig <martin@ximian.com>
28802 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
28803 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
28804 MONO_DEBUGGER_EVENT_BREAKPOINT.
28805 (mono_breakpoint_trampoline_code): Removed.
28806 (mono_debugger_event_handler): The last argument is now a
28808 (mono_debugger_insert_breakpoint_full): Removed the
28809 `use_trampoline' argument.
28810 (mono_debugger_method_has_breakpoint): Likewise.
28811 (mono_debugger_trampoline_breakpoint_callback): Renamed to
28812 mono_debugger_breakpoint_callback(); take the method and
28813 breakpoint number as arguments.
28815 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
28817 * metadata.c: fix off by one when loading parameters attributes.
28819 2003-04-24 Martin Baulig <martin@ximian.com>
28821 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
28823 2003-04-24 Martin Baulig <martin@ximian.com>
28825 * mono-debug-debugger.c: Moved all code which interacts with the
28826 Mono Debugger here.
28828 * debug-mono-symfile.c: This code now just deals with the symbol
28829 file itself, the debugger code is now in mono-debug-debugger.c.
28831 2003-04-23 Martin Baulig <martin@ximian.com>
28833 * mono-debug.c (mono_debug_source_location_from_il_offset):
28834 New method; like mono_debug_source_location_from_address(), but
28835 takes an IL offset instead of a machine address.
28837 2003-04-23 Martin Baulig <martin@ximian.com>
28839 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
28840 `line' field; this is now computed by the debugger.
28842 2003-04-23 Martin Baulig <martin@ximian.com>
28844 * mono-debug.[ch]: New files. This is the new debugging interface.
28846 * mono-debug-debugger.[ch]: New files. Moved all code which
28847 interacts with the Mono Debugger here.
28849 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
28851 * domain.c (mono_init): initialize mono_defaults.monitor_class
28853 2003-04-21 Miguel de Icaza <miguel@ximian.com>
28855 * reflection.c (method_encode_code): Add a spicy exception to help
28856 future compiler authors.
28858 2003-04-21 Martin Baulig <martin@ximian.com>
28861 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
28862 Make this work with relative pathnames; g_filename_to_uri() needs
28863 an absolute filename.
28865 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
28867 * icall.c: Track name changes in Object and ValueType.
28869 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
28871 * metadata.c (mono_type_stack_size): size should be a multiple of
28874 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28877 (internal_domain_finalize): moved into mono_domain_finalize. No need
28878 to create another thread because the finalizers will be run in the
28881 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
28882 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
28883 to be run (MS does this too).
28885 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
28887 * object.c (mono_class_compute_gc_descriptor): Update comment.
28889 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
28891 * image.h: Add synchronized wrapper cache.
28893 * image.c (do_mono_image_open): Initialize cache.
28895 * reflection.c (create_dynamic_mono_image): Initialize cache.
28897 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28899 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
28900 ves_icall_System_Buffer_ByteLengthInternal.
28902 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28904 * reflection.c: setup klass->nested_in earlier. Allow
28905 a dash in the assembly name.
28907 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
28909 * metadata.c (mono_type_to_unmanaged): dont access
28910 type->data.klass for MONO_TYPE_OBJECT
28911 (mono_type_to_unmanaged): consider System.Delegate class
28913 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
28915 * class.c: just setup supertypes in the proper place instead of
28916 initializing the full element class for arrays.
28918 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28920 * class.c: ensure the element class of arrays is initialized.
28921 Setup the supertype info for array classes, too.
28923 2003-04-14 Miguel de Icaza <miguel@ximian.com>
28925 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
28927 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28929 * Makefile.am: re-added -m option when running cygpath. This way,
28930 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
28932 * mono-config.c: same codepath for locating mono config file for WIN32
28934 * assembly.c: if mono_assembly_setrootdir is called, don't override
28937 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28939 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
28940 MONO_ASSEMBLIES variable.
28942 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
28944 * icall.c: added Assembly::GetNamespaces() icall.
28946 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28948 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
28950 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
28952 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
28953 * object.c: fixed bug in the construction of vtable for proxies
28955 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
28957 * object.c (mono_array_new): Mark mono_array_new as an icall.
28959 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28961 * class.c: fixed test for public method when overriding interfaces.
28964 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28966 * appdomain.h, domain.c: added mono_domain_foreach() to
28967 be able to access the currently loaded appdomains.
28968 * object.c: make string interning work across sppdomains.
28969 Mark some functions for use as icalls.
28971 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
28973 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
28975 * reflection.h reflection.c: Allocate long living data using
28976 GC_MALLOC_ATOMIC so the collector does not need to scan it.
28978 * reflection.c: Double the allocation size in streams instead of
28979 increasing it, to prevent unneccesary copying on large assemblies.
28981 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
28982 creation if the assembly does not have the Run flag set.
28984 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
28986 * class.h: avoid the C++ keywords in header files (Jerome Laban
28987 spotted and fixed this).
28989 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28992 (mono_unhandled_exception): fill in the arguments for the
28993 UnhandledException event. Only trigger that event for the default
28994 domain (as MS does).
28996 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
28998 * object.c: Improve typed allocation stuff based on suggestions from
28999 Paolo. Also turn it on if the GC library supports it.
29001 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
29003 * object.c object.h class.h: Added experimental typed allocation
29004 facility using the interfaces in gc_gcj.h.
29006 * os/gc_wrapper.h: Added new include files.
29008 2003-04-03 Martin Baulig <martin@ximian.com>
29010 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
29011 which is not yet enabled by default.
29013 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
29015 (mono_gc_lock, mono_gc_unlock): New static functions.
29017 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
29018 functions; stop/start the world for the garbage collector. This
29019 is using the windows API; we need to complete the SuspendThread()/
29020 ResumeThread() implementation in the io-layer to make this work on Unix.
29021 (mono_gc_push_all_stacks): New public function; tells the garbage
29022 collector about the stack pointers from all managed threads.
29024 2003-04-03 Martin Baulig <martin@ximian.com>
29026 * object.h (MonoThread): Added `gpointer stack_ptr'.
29028 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
29030 2003-04-03 Martin Baulig <martin@ximian.com>
29032 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
29034 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
29036 * reflection.c (typebuilder_setup_fields): Initialize field.first and
29039 2003-04-02 Miguel de Icaza <miguel@ximian.com>
29041 * loader.c (mono_lookup_internal_call): Report the corlib that is
29044 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
29046 * icall.c (ves_icall_type_GetTypeCode): fixed check for
29047 System.DBNull (it's class not valuetype).
29049 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
29051 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
29052 if the array method was already assigned a token (fixes bug#40646).
29054 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
29056 * reflection.c (mono_reflection_get_type): Attempt type resolve even
29057 if no assembly is given.
29059 2003-04-01 Miguel de Icaza <miguel@ximian.com>
29061 * metadata.h: Added the new tables.
29063 * row-indexes.h: Added definitions for new tables.
29065 * metadata.c: Add schemas for new tables, and add support for
29066 computing the sizes of them.
29068 * class.c: Update for handling the new type cases.
29070 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
29072 * metadata.h (MONO_TYPE_IS_VOID): new macro
29074 2003-03-31 Martin Baulig <martin@ximian.com>
29076 * threads.h (MonoThreadCallbacks): Added `thread_created'.
29078 * threads.c (mono_thread_new_init): Call `thread_created' in the
29079 mono_thread_callbacks.
29081 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
29083 * loader.h: added marshalbyrefobject_class to mono_defaults
29084 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
29085 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
29086 generation of output parameters.
29087 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
29088 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
29089 contextbound and the target object belongs to the context of the caller.
29090 * object.h: added context and unwrapped_server variables in MonoRealProxy.
29091 * object.c: Implemented support for interfaces and abstract classes
29092 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
29093 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
29095 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
29097 * class.h class.c (mono_class_is_subclass_of): New function.
29099 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
29100 routines for most common case (calls from ArrayList::ToArray).
29102 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
29103 routine so programs which call Environment::Exit() can be profiled.
29105 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
29106 Added MONO_ARCH_SAVE_REGS.
29108 * icall.c (ves_icall_type_is_subtype_of): Use new function.
29110 2003-03-29 Miguel de Icaza <miguel@ximian.com>
29112 * blob.h: Add a couple of new MonoType types definitions.
29114 * tabledefs.h: Add a couple of new call convs.
29116 2003-03-27 Zoltan Varga <vargaz@freemail.h>
29118 * reflection.h (MonoReflectionDynamicAssembly): track changes in
29119 the layout of the class.
29121 * reflection.c (alloc_table): double the size on overflow to avoid
29122 unnecessary copying.
29124 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
29125 avoid filling out metadata tables and blobs. Also set mb->ilgen to
29126 null so it can be garbage collected.
29128 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
29130 * reflection.c (mono_reflection_get_type): Return the resolved type
29131 only if it is in the assembly we searched.
29133 * reflection.c (ensure_runtime_vtable): Initialize method slots.
29135 * class.c (mono_class_setup_vtable): Set the slot of the overriding
29138 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29141 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
29142 the right one is 'file:///blah', but MS allows it.
29144 (mono_assembly_open): allow 'file://blah'
29146 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
29148 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
29150 * socket-io.c: fixes bug #40310.
29152 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
29154 * reflection.c (mono_reflection_parse_type): handle deeply nested
29157 * reflection.c (mono_image_create_token): Use unique token values
29158 since they will be put into a hash table.
29160 * class.c (mono_class_setup_vtable): If a method occurs in more than
29161 one place in the vtable, and it gets overriden, then change the
29162 other occurances too.
29164 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
29165 object as return type.
29167 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29169 * icall.c: Deleted "ToString" implementation for double and float
29170 because they are full implemented in managed code.
29172 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29174 * reflection.c, reflection.h: implemented and exported functions
29175 to retrieve info about custom attributes.
29177 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29179 * appdomain.c: moved Uri handling to assembly.c
29180 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
29181 work when using a file Uri in *nix and windows.
29183 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
29184 GetReferencedAssemblies.
29186 2003-03-18 Dick Porter <dick@ximian.com>
29188 * icall.c: Rename a couple of internal calls
29190 * threads.c: Set the thread state to Stopped when a thread exits.
29193 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
29195 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
29198 * object.c (mono_class_vtable): fix warning.
29200 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
29202 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
29204 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
29206 (method_encode_clauses): Create exception info structures in the right
29208 (mono_reflection_setup_internal_class): Initialize supertypes field.
29210 * class.c object.c: Handle interfaces which implement other interfaces
29213 * class.h class.c: Move the supertypes array initialization code into
29214 a separate function so it can be used for dynamic types too. Also call
29215 it earlier, in mono_class_init(), since it can be used before the
29216 type is initialized.
29218 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29222 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
29227 * object.c: remove warnings.
29229 2003-03-13 Martin Baulig <martin@ximian.com>
29231 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
29232 (MonoDebugLexicalBlockEntry): New types.
29234 * debug-mono-symfile.c
29235 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
29237 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29239 * process.c: ret can be any non-zero value accroding to MS doc.
29241 2003-03-07 Miguel de Icaza <miguel@ximian.com>
29243 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
29244 fixing a warning for a miss-used prototype, would have cause
29245 random memory corruption.
29247 2003-03-07 Martin Baulig <martin@ximian.com>
29249 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
29250 getting really annoying ....
29252 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
29254 * reflection.c (fixup_method): added support for array methods.
29256 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
29258 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
29259 (pointed out by Michael Adams).
29261 2003-03-04 Dick Porter <dick@ximian.com>
29263 * icall.c: Temporarily reverted the Double and Single ToString()
29264 change, because it broke nunit.
29266 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
29268 * object.h, threads.h: make include files compatible with C++
29269 (patch by Jerome Laban <jlaban@wanadoo.fr>).
29271 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29273 * icall.c: Erased ToString helper functions for Double and Single.
29274 Now, that implementations ar all in managed code (Double and Single
29277 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
29279 * appdomain.c: Added method for initializing the default context of
29280 a domain. Added internal call for getting the default context.
29281 * appdomain.h: Added context variable in MonoDomain struct.
29282 * domain.c: mono_domain_set also sets the default context of the domain
29283 * icall.c: Mapped internal method InternalGetDefaultContext.
29284 * object.c: mono_object_get_virtual_method returns always a remoting
29285 wrapper if the object is a transparent proxy.
29286 mono_runtime_invoke_array: when creating an object by calling the
29287 constructor, if the created object is a proxy, then the constructor should
29288 be called using the a remoting wrapper.
29290 2003-03-03 Dick Porter <dick@ximian.com>
29292 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
29293 variable so it compiles on solaris. Problem spotted by
29294 Christopher Taylor <ct@cs.clemson.edu>
29296 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29299 (get_info_from_assembly_name): don't leak value.
29302 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
29305 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
29307 * assembly.c: export mono_image_load_references ().
29308 * class.c: handle function pointers. mono_class_from_name() now
29309 supports nested type names directly.
29311 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
29313 * reflection.h reflection.c: Encode already created dynamic methods
29314 and fields correctly as a DEF instead of a REF.
29316 * reflection.c: Get rid of the force_ref argument to
29317 mono_image_typedef_or_ref since it was wrong in the first place.
29319 * string-icalls.c: add error checking to string constructors according
29322 * reflection.c: Emit types in the order their TypeBuilders were
29323 created. Previously, a new table index was assigned to each type before
29324 the tables were emitted. This was wrong because the signature blob
29325 might already refer to a type by its original table index.
29327 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
29329 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
29332 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29334 * Makefile.am: make assemblies dir have \ instead of / on windows.
29336 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
29338 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
29339 iterate over the NESTEDCLASS table using a linear search since the
29340 table is not guaranteed to be sorted by the secondary key.
29342 * class.c (mono_class_create_from_typedef): fixed up call to
29343 mono_metadata_nesting_typedef.
29345 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
29347 * marshal.c (mono_string_to_byvalstr): clear the memory as
29348 suggested by Jerome Laban <jlaban@wanadoo.fr>
29350 2003-02-26 Dick Porter <dick@ximian.com>
29352 * process.c: Cope with padding in .rsrc blocks
29354 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
29356 * metadata.h: reverted the filter_len change, it breaks reflection
29358 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
29360 * metadata.h: added a new field to store the filter_len
29363 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
29365 * reflection.c: handle custom attributes for types and members
29366 created with Reflection.Emit (bug#38422).
29368 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
29370 * reflection.c: define RTSpecialName automatically for constructors for
29371 compatibility with MS.NET.
29373 * reflection.c (mono_reflection_create_runtime_class): initialize
29374 nested_in field of dynamically created classes.
29376 2003-02-22 Martin Baulig <martin@ximian.com>
29378 * debug-mono-symfile.h: Incremented version number.
29380 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
29382 * object.h icall.c process.c: fix warnings.
29384 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
29386 * appdomain.h appdomain.c:
29387 (mono_domain_try_type_resolve): split the
29388 name_or_tb argument into a name and a tb argument.
29389 (mono_domain_has_type_resolve): new function to check whenever the
29390 application has registered a TypeResolve event handler.
29392 * icall.c reflection.h reflection.c: move the type resolve logic into
29393 mono_reflection_get_type () so it will be invoked when
29394 Assembly::GetType () is called.
29397 (mono_reflection_get_type): renamed to get_type_internal.
29398 (mono_reflection_get_type): fixed type name generation so it works
29399 for nested types too.
29400 (mono_reflection_get_type): call has_type_resolve () to avoid the
29401 costly type name generation if there is no resolve event handler.
29403 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29405 * class.c, image.c: load exported types from file references.
29407 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
29409 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
29410 used to cache the managed methods used to create proxies and make
29411 remote invocation of methods.
29412 * class.h: Added in MonoVTable a flag to indicate that a class needs
29413 to be remotely created.
29414 * object.c: Modified the method mono_class_vtable(). It now initializes
29415 the remote flag of the vtable. Modified mono_object_new_specific(),
29416 so now it checks the remote flag.
29417 * icall.c: Added a couple of internal methods, one for enabling instance
29418 creation interception for a type, and one for creating objects bypassing
29421 2003-02-18 Martin Baulig <martin@ximian.com>
29423 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
29424 New interncall to get a method's metadata token.
29426 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
29427 New interncall for the debugger.
29429 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
29431 * class.c (mono_class_setup_vtable): allocate supertype array
29433 2003-02-18 Martin Baulig <martin@ximian.com>
29435 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
29437 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29440 (assembly_name_to_aname): jump over unknown properties (i've found
29441 something like: 'type, assembly, version=xxx, custom=null, public...',
29442 so now will ignore custom=null and still get the rest of the values).
29444 2003-02-17 Dick Porter <dick@ximian.com>
29446 * threads.c: Have Thread.Start() wait for a semaphore to signal
29447 that the thread has set up all its local data. This fixes bug
29448 34323, where Abort() raced the new thread's TLS data.
29450 Also removes the handle_store() call from start_wrapper, because
29451 threads are now always created suspended and there is no longer a
29452 race between the parent and child threads to store the info.
29454 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
29456 * image.c: explain the #- heap issue in a message, hopefully
29457 avoiding FAQs on mono-list.
29459 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29462 (GetEntryAssembly): if the domain has not invoked
29463 AppDomain.ExecuteAssembly yet, return the assembly of the default
29466 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
29468 * class.c (mono_ldtoken): make it work in dynamic assemblies.
29470 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
29472 * metadata.c, reflection.c: simple speedup to type hash
29475 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
29477 * image.c, image.h, class.c, assembly.c: move module loading
29478 to MonoImage. When loading metadata, consider alignemnet from
29479 the start of metadata, not from the metadata address in memory.
29481 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
29483 * reflection.c (mono_reflection_get_custom_attrs): Added support for
29484 AssemblyBuilder objects. Factored out custom attribute creation into
29485 a separate function.
29486 (create_custom_attr): new function to create custom attributes.
29488 2003-02-12 Miguel de Icaza <miguel@ximian.com>
29490 * Makefile.am: Got tired of typing the full pathname to pedump.
29491 Until there is another option, am installing this.
29493 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
29495 * class.c (class_compute_field_layout): always set field->parent
29496 (mono_ldtoken): use mono_defaults.fieldhandle_class;
29498 2003-02-11 Dick Porter <dick@ximian.com>
29501 * monitor.c: Rewrote Monitor, making lock much faster and
29502 Pulse/Wait work as specified. Also uses much fewer handles, and only
29503 creates them as needed.
29505 * exception.c: Added SynchronizationLockException
29507 * threads.c: Deleted old Monitor implementation. The new one is
29510 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
29512 * class.c: handled TypedReference type code. Set the correct size for
29513 class data. Setup interface_offsets for interface classes, too.
29515 2003-02-09 Martin Baulig <martin@ximian.com>
29517 * debug-mono-symfile.h: Reflect latest symbol writer changes.
29519 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
29521 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
29522 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
29523 * object.c: fixed mono_object_get_virtual_method () for interfaces.
29524 * verify.c: check for code that runs after the end of the method.
29526 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
29528 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
29529 "System.Math::Round2".
29530 * sysmath.h: Added Floor, Round and Round2 definitions.
29531 * sysmath.c: Modified certain functions that were not 100% compliant
29532 with MS.NET (math precision) and added the implementation of Floor,
29535 2003-02-07 Martin Baulig <martin@ximian.com>
29537 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
29539 2003-02-07 Martin Baulig <martin@ximian.com>
29541 * debug-mono-symfile.c: Reflected latest symwriter changes.
29542 (mono_debug_create_mono_symbol_file): Removed.
29543 (mono_debug_open_mono_symbol_file): Take an argument which
29544 specifies whether to create a dynamic symbol file.
29546 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
29548 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
29550 2003-02-05 Martin Baulig <martin@ximian.com>
29552 * reflection.c (mono_image_build_metadata): Make this public,
29553 protect it against being called multiple times, don't create
29554 resources and don't build the compressed metadata here.
29555 (mono_image_create_pefile): Do this here.
29558 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
29560 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29562 * socket-io.c: fixed bug #36322.
29564 2003-02-06 Piers Haken <piersh@friskit.com>
29568 * debug-mono-symfile.c:
29574 * socket-io.c: warning cleanups
29576 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
29578 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
29579 function. works like remoting invoke, but does a check for the Proxy first.
29581 2003-02-05 Miguel de Icaza <miguel@ximian.com>
29583 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
29585 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
29587 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
29589 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
29590 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
29592 * object.c (mono_store_remote_field_new): used by the new jit
29593 instead of mono_store_remote_field
29594 (mono_load_remote_field_new): used by the new jit
29595 instead of mono_load_remote_field
29597 2003-02-05 Patrik Torstensson
29599 * appdomain.c: changed unload to take the domain id instead
29602 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
29605 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29607 * appdomain.c: don't look for assemblies in ApplicationBase if
29608 PrivateBinPathProbe is set.
29610 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29612 * object.c: make the first argument in main_args contain the absolute
29613 path to the assembly. Fixes bug #37511.
29615 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29617 * icall.c: get correct UTC offset for countries not using daylight
29618 time saving. Fixes bug #30030.
29620 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29622 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
29623 and 1 are the family).
29625 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
29627 * icall.c (ves_icall_InternalExecute): removed wrong assertion
29629 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
29631 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
29633 * reflection.c: added support for SignatureHelper tokens, which is
29634 needed by the Calli opcode.
29636 * reflection.h: track changes to SignatureHelper class.
29638 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
29640 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29642 * appdomain.c: fixed loading assemblies from PrivateBinPath.
29644 2003-02-03 Patrik Torstensson
29645 * appdomain.[c|h], domain.c :
29646 - Added support for getting a domain via domain id
29647 - Support for setting and getting domain from System.AppDomain
29648 (used in cross appdomain channel)
29649 - Added support for get/set for a MonoAppContext on a thread
29650 (Context class in System.Runtime.Remoting.Contexts),
29651 - Removed hack in Get/SetData and ExecuteAssembly.
29653 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
29654 the managed world to get control when a proxy is created.
29656 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
29658 2003-02-03 Miguel de Icaza <miguel@ximian.com>
29661 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29662 Populate the codebase field as well.
29664 2003-02-02 Martin Baulig <martin@ximian.com>
29666 * debug-mono-symfile.c
29667 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
29668 (mono_debug_symfile_add_method): Allow interncalls.
29670 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29672 * icall.c: throw parse exception if strtod fails or the string is empty.
29674 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
29676 * marshal.c: handle object type separately from defined
29679 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
29681 * marshal.c: handle NATIVE_LPSTR for strings when it's
29682 explicitly specified.
29684 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
29686 * reflection.c, reflection.h, icall.c: setup the reflection
29687 handle cache for ModuleBuilders and AssemblyBuilders.
29689 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
29691 * reflection.c (reflection_methodbuilder_to_mono_method): set
29694 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29696 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
29698 2003-01-29 Dick Porter <dick@ximian.com>
29700 * threads.c: No need for the fake_thread kludge now that Thread
29701 doesn't run a class constructor
29703 2003-01-29 Dick Porter <dick@ximian.com>
29705 * threads.c: Use g_direct_hash instead of the rather bogus
29708 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
29710 * marshal.c (mono_marshal_get_native_wrapper): add check for null
29711 (fix pinvoke12.exe)
29712 (mono_marshal_get_struct_to_ptr): generate valid IL code
29713 (mono_marshal_get_ptr_to_struct): generate valid IL code
29714 (*): correctly set sig->pinvoke, we need to memdup the signature
29717 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29719 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
29720 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
29722 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29724 * profiler.c: provide more callers information.
29726 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
29728 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
29730 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
29732 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
29734 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29736 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
29737 exception instead of going into an infinite loop on dates which it
29740 * string-icalls.c (ves_icall_System_String_get_Chars): raise
29741 out-of-range exception if needed.
29743 * class.c (mono_class_setup_vtable): allow a virtual method to provide
29744 an implementation for an interface method and to override an inherited
29745 method at the same time.
29746 Imagine a scenario when a virtual method is used to override a
29747 virtual abstract method in a parent class, and this same method
29748 provides an implementation for an method inherited from an interface.
29749 In this case, the interface resolution code will set im->slot, which
29750 means that the virtual method override pass will skip this method
29751 which means a pointer to the abstract method inherited from the parent
29752 will remain in the vtable of this non-abstract class.
29754 * class.c: (mono_class_setup_vtable): continue search for a real
29755 method if only an abstract method is found.
29757 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29759 * reflection.c: add size to encoding for ByValStr and ByValArray
29760 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
29762 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29764 * class.c (mono_class_setup_vtable): pass the override info as an
29767 * class.c (mono_class_setup_vtable): set the slot of overriding methods
29770 * reflection.c (ensure_runtime_vtable); add support for method
29773 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29775 * reflection.c (resolution_scope_from_image): Hack to work to work with
29776 dynamic assemblies.
29778 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
29779 added a 'force_ref' argument to force this function to allways return
29780 a TypeRef. This is needed by mono_image_get_memberref_token ().
29782 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29784 * reflection.c (mono_image_get_type_info): interfaces really don't have
29787 * reflection.c (mono_image_basic_init): fill out missing fields of
29790 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
29791 dynamic assemblies. This is required so dynamic assemblies show up in
29792 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
29793 Type::GetType() etc. This is consistent with MS behaviour.
29795 * image.c image.h reflection.c: add newly created classes to the name
29796 cache so mono_class_get () will find them.
29798 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
29800 First part of changes to get IKVM.NET running under mono.
29802 * appdomain.h, appdomain.c: added new function
29803 mono_domain_try_type_resolve() which will emit TypeResolve events.
29804 This function will call AppDomain::DoTypeResolve to do the actual work.
29806 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
29807 moved existing code dealing with dynamic tokens to a new function
29808 called mono_reflection_lookup_dynamic_token (). This function will
29809 raise TypeResolve events when appropriate. Since reflection.c is not
29810 part of libmetadata, a new hook function called
29811 mono_lookup_dynamic_token() is added to class.c which will call this.
29813 * assembly.h assembly.c: make the invoke_load_hook function public,
29814 so it can be called for dynamic assemblies.
29816 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
29818 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
29821 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
29822 MonoGHashTable, since it contains pointers to objects which the GC
29825 * assembly.c (search_loaded): remove unused variable.
29827 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
29829 * object.c: fixed issue exposed by gcc-generated IL programs
29830 that use RVA data for pointers.
29832 2003-01-25 Martin Baulig <martin@ximian.com>
29834 * threads.c (start_wrapper): Moved the initialization of
29835 `start_func' above the mono_new_thread_init() call to which we
29836 pass it as argument.
29838 2003-01-24 Martin Baulig <martin@ximian.com>
29840 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
29841 the MonoThread pointer.
29843 2003-01-21 Miguel de Icaza <miguel@ximian.com>
29845 * icall.c: Rename `PowImpl' to Pow.
29847 2003-01-23 Dick Porter <dick@ximian.com>
29849 * threads.c (start_wrapper): Create a Thread object if needed, so
29850 the Main() thread can do the class initialisation in a subthread
29851 that has been set up to allow managed code execution.
29853 Pass the thread ID instead of the MonoThread pointer to the thread
29854 start and attach callbacks. This change is required, because the
29855 jit thread start callback must be called _before_ the Thread
29856 object can be created.
29858 (mono_thread_init): Removed much object creation code that is no
29859 longer needed. No managed code is called from here now.
29861 * object.c (mono_runtime_exec_managed_code): Create a subthread
29862 for Main, and call back to the runtime to use it.
29863 Set the exit code when Main exits.
29865 * gc.c: Make sure domain finalisation happens in a subthread.
29866 Re-enable threaded GC, fixing bug 31333 (again).
29868 * environment.c: System.Environment internall calls (so far just
29869 ExitCode is here, the others are still in icall.c)
29871 * appdomain.c (mono_runtime_cleanup): All threads running managed
29872 code should have finished before mono_runtime_cleanup() is
29873 reached, so no need to clean up threads.
29875 2003-01-22 Martin Baulig <martin@ximian.com>
29877 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
29878 `gpointer func' arguments.
29879 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
29880 but added `MonoThread *thread' argument.
29881 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
29883 * threads.c (mono_new_thread_init): Added `gpointer func' argument
29884 and pass it to the mono_thread_start_cb callback.
29885 (mono_install_thread_callbacks): New public function to install a
29886 set of callbacks which are set by the debugger.
29887 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
29889 2003-01-22 Martin Baulig <martin@ximian.com>
29891 * Makefile.am: Install debug-mono-symfile.h.
29893 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
29895 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
29897 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
29899 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
29900 * class.c (mono_ptr_class_get): correctly set access levels of pointers
29901 (mono_array_class_get): correctly set access levels of arrays
29903 2003-01-20 Patrik Torstensson
29904 * image.h (MonoAssemblyName): changed major, minor, build, revision
29905 from signed to unsigned.
29907 2003-01-20 sean kasun <skasun@azstarnet.com>
29909 * reflection.c (load_cattr_value): Now this handles
29910 MONO_TYPE_SZARRAY. Fixes bug #35629
29912 2003-01-20 Miguel de Icaza <miguel@ximian.com>
29914 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
29917 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29919 * decimal.c: fixed bug #26056.
29921 2003-01-17 Martin Baulig <martin@ximian.com>
29923 * gc.c: Raise an ExecutionEngineException instead of using g_error().
29925 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29928 (mono_get_exception_type_initialization): new function.
29930 * object.c: throw a TypeInitializationException when an exception is
29931 thrown invoking the class constructor.
29933 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29935 * reflection.c: fixed attribute reading.
29937 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29940 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
29941 provided, look for the type in the calling assembly and then in
29942 mscorlib; if the assembly name is provided, only try that one.
29944 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
29946 * object.c: register the vtable before there is a chance it's
29947 queried again recursively.
29949 2003-01-13 Duncan Mak <duncan@ximian.com>
29951 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
29954 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
29956 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
29958 2003-01-11 Martin Baulig <martin@ximian.com>
29960 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
29961 this to 20 for the release.
29963 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
29965 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
29967 * loader.c (mono_method_get_marshal_info): bug fix
29969 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
29970 structures with explicit layout
29972 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29974 * profiler.c: made the output more readable (and sorted).
29975 Added caller information for the allocation profiler.
29977 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
29979 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
29981 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29983 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
29984 to get value types.
29986 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
29988 * object.c, profiler.h, profiler.c, profiler-private.h:
29989 Added object allocation profiler.
29991 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
29993 * reflection.h, reflection.c: handle global methods.
29994 Compress blob entries.
29996 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
29998 * marshal.c: fix compilation.
30000 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
30002 * loader.c (mono_method_get_marshal_info): impl.
30004 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
30006 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30008 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
30009 for reference types.
30011 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
30013 * loader.c: fixed off by one error in loaded parameter names.
30015 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
30017 * marshal.c (mono_marshal_get_icall_wrapper): like
30018 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
30019 instead of a MonoMethod.
30021 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30023 * decimal.c: fixed bug #36537.
30025 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
30027 * marshal.c: throw a missing method exception if a
30028 P/Invoke method is not found.
30030 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
30032 * icall.c: allow a null this for constructors.
30034 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
30036 * icall.c: raise the proper exceptions if the arguments to the
30037 internal Invoke are incorrect.
30039 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
30041 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
30043 2003-01-03 Martin Baulig <martin@ximian.com>
30045 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
30047 2002-12-31 Martin Baulig <martin@ximian.com>
30049 * debug-mono-symfile.c: Completely rewrote the type section.
30050 Instead of using individual malloc()ed fields, we use one big
30051 continuous memory area and offsets into this area.
30052 See the comments in the source code for details.
30054 2002-12-30 Martin Baulig <martin@ximian.com>
30056 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
30058 2002-12-30 Martin Baulig <martin@ximian.com>
30060 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
30061 line number table in this data blob instead of using an external
30064 2002-12-28 Martin Baulig <martin@ximian.com>
30066 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
30068 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
30070 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
30071 as a boxed return type.
30073 2002-12-21 Miguel de Icaza <miguel@ximian.com>
30076 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
30077 g_build_filename to properly get separators on the filename created.
30079 * object.h: Small change, introduce MonoMarshalByRefObject to
30080 track the layout of that structure in the C# universe as we make
30083 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
30085 * object.c: removed assert to allow static fields on interfaces.
30086 * loader.c: a TypeSpec may be used for any type, not just arrays.
30088 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
30090 * class.c, class.h: added mono_class_array_element_size ().
30091 Ignore static methods in interfaces.
30093 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30095 * threads.c: fixed the build under cygwin.
30097 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
30099 * reflection.c: handle nullref constants. Allocate keys for
30100 reflection handles with the GC.
30102 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
30104 * threads.c, threads.h: added mono_thread_get_abort_signal()
30105 to get a suitable signal for thread abort.
30107 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
30109 * metadata.c: fix handling of ExportedType table.
30111 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30113 * icall.c: added WriteWindowsDebugString internal call.
30115 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30117 * reflection.h: added fields to match C# implementation.
30119 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30121 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
30123 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
30125 * gc.h, gc-internal.h: Rename header for GC internal calls to
30126 gc-internal.h from gc.h as to not clash with Boehm GC having its
30127 header installed as <gc.h> in outside include paths.
30128 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
30129 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
30131 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30133 * icall.c: assign minor, build and revision in FillName.
30135 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
30137 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
30138 Added support for running code generated by Reflection.Emit.
30140 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30142 * appdomain.c: check for NULL argument in LoadFrom.
30144 2002-12-10 Dick Porter <dick@ximian.com>
30146 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
30148 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30150 * appdomain.c: fix buglet when building exe file name. Handle full
30151 assembly name (needed after latest changes to AssemblyName).
30153 (mono_image_close): free some hashtables.
30155 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
30157 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
30158 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
30159 on some systems (redhat 7.3)
30161 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
30163 * threads.c: delete the critical section of a sync block,
30164 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
30166 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
30168 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
30170 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30172 * appdomain.[ch]: handle the assembly preload event to try loading the
30173 assemblies using the paths we have in the current domain.
30175 * assembly.[ch]: created an assembly preload hook that is called to try
30176 loading the assembly by other means that the ones provided here.
30178 * domain.c: initialize the domain search path.
30180 From now on, assemblies (TODO: except corlib and System) are loaded
30181 according to these rules when using mono_assembly_load ():
30183 1. It tries to load the assembly from the ApplicationBase
30184 of the current domain appending .dll and .exe (TODO: have to
30185 try loading from name/name.dll and name/name.exe).
30187 2. It tries the search path specified in PrivateBinPath for the
30188 current domain (if any).
30190 3. Previous behavior.
30192 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
30194 * icall.c: implemented GetInterfaceMap() related icall.
30195 * domain.c, loader.h: load MethodInfo in mono_defaults.
30197 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
30199 * gc.c: disable the finalizer thread for now, untill all the issues
30200 with it are resolved.
30202 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
30204 * string-icalls.c: handle embedded nulls in string ctor when the
30205 length is specified.
30207 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
30209 * class.c: look for explicit interface implementation in parent
30212 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
30214 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
30216 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
30218 * gc.c: protect handles with a critical section.
30220 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30223 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
30224 parameters. If no assembly specified, try getting the type from all
30225 the assemblies in the current domain, else, load the assembly and get
30228 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30230 * marshal.c: applied patch from Aleksey Demakov that fixes
30231 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
30233 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30235 * icall.c: fixed get_location.
30237 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
30239 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
30240 declarations to make it work with older gcc.
30242 * loader.c (mono_get_method): set signature->pinvoke for native calls
30244 2002-11-20 Dick Porter <dick@ximian.com>
30246 * threads.c (mono_thread_init): Set the main thread's handle
30248 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
30250 * gc.c: allow compilation without GC support. Changed to match the
30253 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
30255 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
30257 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
30259 * reflection.c: set a public key token on the core assemblies.
30261 2002-11-18 Dick Porter <dick@ximian.com>
30263 * threads.c: Split out some thread initialisation so that other
30264 files can set the start callback function.
30266 * gc.c: Run finalisers in a separate thread, to avoid stack
30267 overflow. Fixes bug 31333.
30269 * appdomain.c: Set up GC finalisation thread.
30273 * domain.c: Use gc.h macros for GC_malloc
30275 2002-11-15 Dick Porter <dick@ximian.com>
30279 * appdomain.c: Removed mono_runtime_init_with_attach(),
30280 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
30281 merging the extra parameter with the existing function. Removed
30282 unneeded code in mono_thread_attach().
30284 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
30286 * image.c (mono_image_loaded_by_guid): a method to get loaded
30288 (load_metadata_ptrs): we store the guid as string.
30290 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
30292 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
30294 * metadata.c (mono_guid_to_string): imported method form Zoltan
30295 Varga (slightly modified)
30297 * assembly.c (mono_assembly_open): load precompiled code
30299 * loader.h (MonoMethod): we store the method token for use in the
30302 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30304 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
30305 the hook function called when an assembly is loaded.
30307 * domain.c: Modified file.
30308 (mono_domain_assembly_load): removed hash table insertion of assemblies.
30312 2002-11-07 Miguel de Icaza <miguel@ximian.com>
30314 * reflection.c: Map PEFileKind to the value expected by the WinNT
30317 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30319 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
30320 Read until the buffer is filled completely.
30322 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30324 * icall.c: implemented MonoType.InternalGetEvent ().
30326 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30328 * appdomain.c: implemented InitAppDomainSetup. Delayed
30329 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
30330 the entry_assembly.
30332 * assembly.c: base_dir is now an absolute path ending with
30335 * icall.c: modified get_location according to the above changes.
30337 * object.c: init AppDomain.SetupInformation for the default domain after
30338 we have the entry assembly.
30340 * domain.c: when unloading a domain, setup = NULL.
30342 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
30344 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
30346 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
30348 * object.h, object.c: introduced mono_object_get_virtual_method ()
30349 to lookup the method invoked on an object when a callvirt is done on
30351 * icall.c: make MethodInfo::Invoke() always do a virtual call.
30353 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30355 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
30356 current domain when loaded an assembly and failed to load it.
30358 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
30360 2002-10-31 Dick Porter <dick@ximian.com>
30364 * file-io.c: Return the error status in a parameter, as the
30365 GetLastError() value has long since been blown away if we try and
30366 look it up in a subsequent internal call invocation. Delete the
30367 GetLastError() internal call, because it's useless.
30369 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
30371 * class.[ch]: added cast_class to fix bug 29517
30373 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
30375 * marshal.c: create valid IL code in the filter clause:
30376 the new JIT is less forgiving:-)
30378 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30380 * icall.c: removed get_property internal call.
30382 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
30384 * appdomain.h domain.c: Added an ID to appdomains.
30386 * threads.c threads.h icall.c: Implement icall
30387 Thread:GetDomainID(), and remove unused icall
30388 CurrentThreadDomain_internal.
30390 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30392 * icall.c: Don't recurse through the base types in GetConstructor.
30395 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
30397 * mempool.h, mempool.c: added mono_mempool_empty() and
30398 mono_mempool_stats().
30400 2002-10-23 Dick Porter <dick@ximian.com>
30404 * icall.c: Added MonoIO.GetFileType internal call
30406 2002-10-17 Dick Porter <dick@ximian.com>
30408 * appdomain.c (mono_runtime_cleanup): Don't signal the async
30409 delegate semaphore before waiting for all threads to finish,
30410 because new threads can also call async delegates. Fixes bug
30413 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
30414 of 3 seconds, in case another async job is queued. (This part is
30415 needed because the bug fix reintroduced the 3s exit lag.) This
30416 makes the mono_runtime_shutdown flag superfluous.
30418 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
30420 * reflection.c: include ehader size in method section headers.
30421 Really check for suplicated modules entries.
30423 2002-10-17 Martin Baulig <martin@gnome.org>
30425 * debug-mono-symfile.c: Added back support for locals.
30427 2002-10-14 Martin Baulig <martin@gnome.org>
30429 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
30432 2002-10-14 Martin Baulig <martin@gnome.org>
30434 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
30435 mono_class_get() instead of looking in the class cache.
30437 2002-10-13 Martin Baulig <martin@gnome.org>
30439 * debug-mono-symfile.c: Set version number to 28, include the
30440 signature in method names.
30442 2002-10-13 Martin Baulig <martin@gnome.org>
30444 * debug-mono-symfile.h: Set version number to 27.
30446 2002-10-11 Martin Baulig <martin@gnome.org>
30448 * gc.c: Don't register/unregister NULL pointers as disappearing links.
30450 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30452 * metadata.c, metadata.h: added helper function to allocate signatures.
30454 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30456 * icall.c: added internal call to get the location of machine.config.
30458 2002-10-08 Martin Baulig <martin@gnome.org>
30460 * debug-mono-symfile.c: Ignore classes with a pending init for the
30463 2002-10-03 Dick Porter <dick@ximian.com>
30465 * threads.c: Freebsd pthread_t is a pointer
30467 2002-10-03 Dick Porter <dick@ximian.com>
30469 * socket-io.c: Implemented GetHostName_internal
30471 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30474 (mono_config_parse_file): don't leak the text.
30476 2002-10-02 Martin Baulig <martin@gnome.org>
30478 * debug-mono-symfile.c: Added support for methods.
30480 2002-10-01 Martin Baulig <martin@gnome.org>
30482 * debug-mono-symfile.c: Don't emit methods and line numbers for
30483 the dynamic symbol file, just write the type table. We can easily
30484 have an external helper program which creates a symbol file for an
30487 2002-10-01 Dick Porter <dick@ximian.com>
30489 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
30490 Only add the handle to the cleanup array when we're about to
30491 launch the thread. Bug 31425 deadlocked when the test was run on
30494 2002-10-01 Martin Baulig <martin@gnome.org>
30496 * debug-mono-symfile.c: Added support for properties.
30498 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30500 * reflection.c: unaligned store fix from Mark Crichton
30501 <crichton@gimp.org>.
30503 2002-09-27 Martin Baulig <martin@gnome.org>
30505 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
30508 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
30510 * assembly.h, assembly.c: use a sane API to hook into the assembly
30511 loading process instead of a useless special-purpouse hack
30512 (ngen needs a hook, too, for example).
30514 2002-09-27 Dick Porter <dick@ximian.com>
30516 * threads.c (mono_thread_init): Call GetCurrentProcess() so
30517 io-layer can set up some process handle info. Not needed on w32,
30518 but doesn't hurt either.
30520 * process.c: Pass the program name in the second parameter to
30521 CreateProcess, so the path is searched. Include the working
30522 directory. Implemented process name, process enumeration, and some
30523 process detail internal calls.
30525 * icall.c: Added internal calls for process lookup, and some
30528 2002-09-26 Martin Baulig <martin@gnome.org>
30530 * assembly.c (mono_install_open_assembly_hook): New global
30531 function to install a function to be invoked each time a new
30532 assembly is loaded.
30533 (mono_assembly_open): Run this callback function if set.
30535 * debug-mono-symfile.c: Put back line numbers for the dynamic
30536 symbol file and also record the .il file as source file. This
30537 allows us to install the temporary symbol file as `file.dbg' just
30538 like a compiler-generated one.
30540 2002-09-26 Nick Zigarovich <nick@chemlab.org>
30542 * Corrected typo in gc.c (BOHEM vs BOEHM).
30544 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30546 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
30547 GetProperties. Also avoid calling g_slist_length in GetProperties and
30550 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30552 * reflection.c: avoid unaligned stores (bug spotted by
30553 Mark Crichton <crichton@gimp.org>).
30555 2002-09-25 Martin Baulig <martin@gnome.org>
30557 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
30558 instead of guint64 for addresses and added prologue/epilogue info.
30560 2002-09-25 Martin Baulig <martin@gnome.org>
30562 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
30563 store line number info. For the dynamic symbol file, we only need
30564 to provide the JIT generated dynamic line number info for the dynamic
30567 2002-09-25 Martin Baulig <martin@gnome.org>
30569 * debug-mono-symfile.h: Incremented version number.
30571 2002-09-24 Martin Baulig <martin@gnome.org>
30573 * class.c (mono_debugger_class_init_func): New global function
30575 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
30578 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
30579 function. This is called via the mono_debugger_class_init_func
30580 hook to add all types to the dynamic type table.
30581 (ves_icall_MonoDebugger_GetType): New interncall to get a class
30582 from its metadata token.
30584 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
30585 New interncall for the debugger.
30587 2002-09-24 Nick Drochak <ndrochak@gol.com>
30589 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
30590 before using it in case it is null.
30592 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30594 * metadata.c: allow custom modifiers in local var signatures
30595 (bug spotted by Zoltan Varga).
30597 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
30599 * class.c: deal with the <Module> class that may have a NULL vtable.
30600 Eliminate warnings.
30602 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30604 * image.c, image.h: more strong name helpers.
30605 * monosn.c: more work: convert pem keys to cryptoapi format.
30607 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30609 * string-icalls.c: speedup IndexOf.
30611 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30613 * icall.c: updates from Zoltan.2.Varga@nokia.com.
30615 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30617 * icall.c: cleanup: use mono_object_domain ().
30619 2002-09-23 Martin Baulig <martin@gnome.org>
30621 * debug-mono-symfile.c: Improved type support.
30623 2002-09-22 Martin Baulig <martin@gnome.org>
30625 * debug-mono-symfile.c: Added support for reference types and strings.
30627 2002-09-22 Martin Baulig <martin@gnome.org>
30629 * debug-mono-symfile.c: Started to work on the type table.
30631 2002-09-21 Martin Baulig <martin@gnome.org>
30633 * debug-mono-symfile.c: Largely reworked the symbol table format.
30634 The symbol table is now incrementally updated each time a new
30635 method is added. We're now also using our own magic and version
30636 so that you don't need to recompile all your classes if the
30637 dynamic table changes.
30638 (mono_debug_update_mono_symbol_file): Removed.
30639 (mono_debug_symfile_add_method): New function to add a method.
30641 2002-09-21 Martin Baulig <martin@gnome.org>
30644 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
30647 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
30648 New interncall to get a method from its metadata token.
30650 2002-09-21 Martin Baulig <martin@gnome.org>
30652 * debug-mono-symfile.c: Create type table.
30654 2002-09-20 Martin Baulig <martin@gnome.org>
30656 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
30658 2002-09-20 Martin Baulig <martin@gnome.org>
30660 * debug-mono-symfile.c: Provide information about params and locals.
30662 2002-09-20 Martin Baulig <martin@gnome.org>
30664 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
30667 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
30668 interncall to get a method from its metadata token.
30670 2002-09-20 Martin Baulig <martin@gnome.org>
30672 * debug-mono-symfile.c: Added a few checks for method->header
30673 being non-NULL. This should never happen, but for the moment
30674 let's use a g_warning() rather than a g_assert().
30676 2002-09-19 Mark Crichton <crichton@gimp.org>
30678 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
30679 even if support for it isn't present. Added an #ifdef to fix this.
30681 * socket-io.c: Added checks back for Solaris support.
30683 2002-09-19 Martin Baulig <martin@gnome.org>
30685 * debug-mono-symfile.c (read_string, write_string): Reflect latest
30686 changes in the symbol file format.
30688 2002-09-18 Martin Baulig <martin@gnome.org>
30690 * debug-mono-symfile.c: Set version number to 21.
30692 2002-09-18 Dick Porter <dick@ximian.com>
30694 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
30695 on netbsd. Fixes bug 30051.
30697 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30700 (set_version_from_string): little fix.
30702 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30704 * monosn.c, Makefile.am: added strong name utility.
30705 * reflection.h, reflection.c: implemented delayed signing,
30706 locale, version and hash id assembly attributes.
30708 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30710 * loader.c, metadata.c: load param attributes in signatures.
30712 2002-09-16 Martin Baulig <martin@gnome.org>
30714 * debug-mono-symfile.c: Added string table with all method names.
30716 2002-09-14 Martin Baulig <martin@gnome.org>
30718 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
30719 fast method lookup.
30721 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30723 * reflection.c: record the public key token of referenced assemblies.
30725 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30727 * image.c, image.h: added functions to get the strong name and the
30728 public key of an assembly.
30729 * pedump.c: use them.
30731 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
30733 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
30735 2002-09-12 Miguel de Icaza <miguel@ximian.com>
30737 * marshal.c (mono_marshal_get_managed_wrapper): Added
30740 2002-09-11 Martin Baulig <martin@gnome.org>
30742 * gc.c: Call GC_unregister_disappearing_link() on all links when
30743 finalizing them, this is necessary to aviod a crash in boehm's
30746 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30748 * gc.c: handle GetTarget for finalized objects spotted and fixed by
30751 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
30753 * icall.c: implemented MonoType::Module.
30754 * reflection.c, reflection.h: mono_module_get_object () from
30755 Tomi Pakarinen <tomi.pakarinen@welho.com>.
30757 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
30759 * icall.c: ignore overridden methods in GetMethods ().
30760 Fix for FieldInfo::SetValue().
30761 * object.c: handle float/double in runtime invoke.
30763 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
30765 * object.c: allow a constructor to be called again on an object.
30767 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30769 * class.h, class.c: move field layout code to it's own function and
30770 export it. Get an interface id earlier. Move fields in MonoClass
30771 so they are more cache friendly and align the bitfields.
30772 * loader.c: temporary handle get_param_names() for a runtime method.
30773 * reflection.c, reflection.h: more code to handle runtime creation of
30776 2002-09-09 Martin Baulig <martin@gnome.org>
30778 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
30779 signature with the pinvoke field being set for the actual call.
30781 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
30783 * icall.c: removed some unused icalls. Start of map of glib charsets
30784 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
30786 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30788 * debug-helpers.c: break infinite loop (found and fixed by
30789 Holger Arnold <harnold@gmx.de>).
30791 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30793 * icall.c: target may be null in create_delegate.
30795 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30797 * marshal.c: handle a boolean return type.
30799 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30801 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
30803 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30805 * gc.c: fix weakreferences.
30807 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
30809 * icall.c: added icall to get default codepage.
30811 2002-09-03 Dick Porter <dick@ximian.com>
30814 * threads.c: Use MonoThread instead of MonoObject where
30817 Store running thread objects in a hash table, so that we have all
30818 the info to hand when waiting for them to finish
30819 (means we don't need OpenThread() any more, so mingw builds should
30820 be fully functional again.)
30823 * object.h: Added thread ID to MonoThread
30825 2002-09-03 Martin Baulig <martin@gnome.org>
30827 * icall.c (System.Reflection.Assembly::get_location): New interncall.
30829 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30831 * icall.c: fixed leak in get_temp_path. Thanks lupus.
30833 2002-09-03 Martin Baulig <martin@gnome.org>
30835 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
30836 argument to store the end address of the disassembled instruction.
30838 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
30839 here from debug-symfile.h.
30840 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
30841 JIT into this struct.
30842 (MonoSymbolFile): Added `char *image_file' field.
30843 (MonoDebugGetMethodFunc): Removed.
30844 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
30845 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
30846 (mono_debug_find_method): New method.
30848 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
30849 create a full symbol file.
30850 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
30851 and static symbol files.
30852 (mono_debug_find_method): The symbol file keeps an internal method hash,
30853 call this to get a MonoDebugMethodInfo from a MonoMethod.
30855 * debug-symfile.[ch]: Removed.
30857 2002-08-29 Miguel de Icaza <miguel@ximian.com>
30859 * image.c (do_mono_image_open): Remove linker version check.
30861 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
30863 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
30864 wrappers for instance methods.
30866 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30868 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
30870 2002-08-28 Dick Porter <dick@ximian.com>
30872 * Makefile.am: Export HOST_CC for w32 builds
30874 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30876 * file-io.c process.c: MonoString are null terminated, no
30877 need for mono_string_to_utf16() anymore.
30879 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30881 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
30883 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
30885 * icall.c, reflection.h: speedup System.MonoType.
30887 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30889 * reflection.c: allow null as the value of a string argument in
30890 custom attributes constructors.
30892 2002-08-27 Martin Baulig <martin@gnome.org>
30894 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
30895 `trampoline_address' field.
30897 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
30899 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
30900 check (fixes bug #29486)
30902 2002-08-27 Martin Baulig <martin@gnome.org>
30904 * debug-mono-symfile.c: Changed the file format in a way that allows us
30905 open it read-only and to use a specially malloced area for all the
30906 dynamic data. We can now also generate a symbol file on-the-fly if we're
30907 debugging IL code and there is no MCS generated symbol file for it.
30909 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
30911 * object.c: added a define for a good string and array
30912 creation speedup (not enabled by default because we need to deal with
30915 2002-08-26 Martin Baulig <martin@gnome.org>
30917 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
30918 function to create a dynamic symbol file. This is used by the
30919 debugger to create a symbol file for IL code on-the-fly.
30921 2002-08-26 Martin Baulig <martin@gnome.org>
30923 * loader.c (mono_lookup_pinvoke_call): Include the error message
30924 from g_module_error() in the error message.
30926 2002-08-24 Martin Baulig <martin@gnome.org>
30928 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
30929 function to update the symbol file. The symbol file is mmap()ed
30930 writable, but private. This allows us to install the symbol file
30931 together with the assembly.
30933 2002-08-24 Martin Baulig <martin@gnome.org>
30935 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
30936 but they can read the new symbol file format which mcs is now creating.
30938 * debug-symfile.c (mono_debug_find_source_location): Moved to
30939 debug-mono-symfile.c; this is now operating on the new symbol file.
30941 2002-08-23 Martin Baulig <martin@gnome.org>
30943 * debug-helpers.c (mono_method_desc_from_method): New function to get
30944 a MonoMethodDesc from a MonoMethod.
30946 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30948 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
30949 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
30951 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
30953 * string-icalls.[ch]: make helper methods static.
30955 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30957 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
30958 types to it and to SetValueInternal.
30960 * object.c: Moved handle_enum label to its proper place. This was the
30963 This time i compiled mcs and gtk-sharp and they both work.
30965 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30967 * icall.c: reverted partially my previous patch until
30968 object.c:set_value handles enums correcly.
30970 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30973 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
30974 (ves_icall_System_Environment_get_MachineName): removed warning when
30975 compiling under cygwin.
30977 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
30979 * object.c: fixed field_get_value() for reference types.
30981 2002-08-22 Dick Porter <dick@ximian.com>
30983 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
30984 Don't free a buffer while it's still needed. Patch from Jonathan
30985 Liger <Jonathan.liger@wanadoo.fr>
30987 2002-08-21 Miguel de Icaza <miguel@ximian.com>
30989 * icall.c (ves_icall_System_Environment_get_Platform): Add new
30992 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
30994 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
30995 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
30997 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
30998 we call unmanaged code which throws exceptions.
31000 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31002 * appdomain.h: added per-domain entry_assembly.
31003 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
31005 * icall.c: Assembly::GetEntryAssembly icall.
31006 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
31007 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
31009 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31011 * appdomain.h, gc.c: added mono_domain_finalize ().
31013 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31016 (mono_print_unhandled_exception): changed g_warning by g_printerr
31017 because g_log has a 1024 characters limit (yeah, i got a big stack
31018 trace). Don't print exception name, that should be in ToString
31021 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31023 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
31024 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
31026 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31029 (mono_print_unhandled_exception): after previous commit, i realized
31030 that MS calls ToString on the exception. I changed this function to
31031 do that. This way we get stack_trace for free.
31033 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31036 (mono_print_unhandled_exception): invoke Message property instead of
31037 getting 'message' field from Exception. Don't allocate memory for
31038 'trace' and 'message' if not needed.
31040 2002-08-18 Dick Porter <dick@ximian.com>
31042 * unicode.c: Fix asserts to match Encoder.cs checks
31044 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31046 * marshal.c: fix unaligned store issue and a few wrong
31047 opcode argument types.
31049 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31051 * icall.c: added GetUninitializedObjectInternal internal call.
31053 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
31055 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
31056 to the right domain.
31058 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
31060 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
31062 * class.c (class_compute_field_layout): set blittable to false for Strings
31064 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
31066 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31068 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
31069 first chunk of code to create types at runtime. Code to
31070 handle ReflectedType/DeclaringType. Make reflection handles
31073 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31075 * class.c: set correct name in arrays.
31077 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
31079 * appdomain.c (mono_domain_transfer_object): make it work with
31080 valuetypes. bug fixes.
31082 2002-08-12 Dick Porter <dick@ximian.com>
31084 * object.h: Rename some parameters to avoid c++ keywords (Patch
31085 from Joseph Wenninger <kde@jowenn.at>)
31087 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
31089 * icall.c: added icall to implement Assembly.GetFile*.
31091 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
31093 * reflection.h, reflection.c: code to embed managed resources.
31095 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31097 * class.c: move all the type size stuff into
31098 class_compute_field_layout().
31100 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31102 * class.c: ensure enums have always the correct instance size.
31103 * unicode.c: remove wrong assert.
31105 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31107 * assembly.c: fix mem corruption issue.
31108 * image.h, image.c: added mono_image_get_resource () to access
31110 * icall.c: implemented Assembly.EntryPoint property and some
31111 Managed Resources related internalcalls.
31114 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31116 * image.c, image.h: impemented mono_image_get_entry_point ().
31117 * appdomain.c: use mono_image_get_entry_point.
31119 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31121 * reflection.c: support the object type argument when loading
31124 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
31126 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
31127 String as return type.
31129 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
31131 * reflection.c: fix encoding of named args for custom attrs to match
31132 the ms implementation. Read them back when instantiating custom
31135 2002-08-02 Radek Doulik <rodo@ximian.com>
31137 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
31138 by Dietmar as quick fix
31139 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
31140 16 as stack size, used on more places as quick fix before Dietmar
31141 will fix it properly
31143 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
31145 * object.h, object.c: added accessors for fields and properties.
31147 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
31149 * class.c, class.h: made mono_class_get_field_from_name ()
31150 loop on parent types.
31151 Added mono_class_get_property_from_name ().
31153 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31155 * class.c, class.h: move the code to setup the type vtable in its own
31156 function so that it can be reused also for types created at runtime.
31157 Eliminate the "class" identifier from the header file.
31158 * reflection.c: setup the vtable for enums so that we can create
31159 objects for use in SetConstant ().
31161 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
31163 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
31164 instead of the delegate itself as this pointer (bug #28383)
31166 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
31168 * marshal.c (mono_marshal_get_managed_wrapper): added return type
31171 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31173 * loader.c: don't set the pinvoke bit on icalls.
31175 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
31177 * debug-helpers.c (mono_method_full_name): only print a number to
31178 indicate wrapper type (so that the output is more readable in traces).
31180 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
31182 * class.c (mono_class_init): include method override patch from Paolo
31184 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
31186 * icall.c: fixed GetTypeCode().
31188 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
31190 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
31191 use real delegate invoke function to make it work with multicast
31192 delegates (fix bug# 28291).
31194 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31196 * object.c: load constant strings.
31198 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31200 * reflection.c: no magic numbers.
31201 * tabledefs.h: security action enum.
31203 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31205 * assembly.c: fix possible memory corruption.
31207 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31209 * reflection.h, reflection.c: added support for linking resources.
31210 * verify.c: check we have an updated corlib.
31212 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
31214 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
31216 (mono_marshal_string_array): null terminate unmanaged string arrays.
31217 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
31219 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31221 * icall.c: Type.GetType () can now return also types from the
31224 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
31226 * loader.h, loader.c: stack walking support.
31227 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
31228 GetCallingAssembly.
31230 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
31232 * marshal.c: added optimisations for blittable types
31234 * class.c (mono_array_class_get): do not set blittable attribute on arrays
31235 (mono_class_setup_mono_type): set blittable attribute for single
31238 * marshal.c (mono_string_utf8_to_builder): impl.
31239 (mono_string_builder_to_utf8): impl.
31240 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
31242 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
31244 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
31245 (mono_marshal_get_managed_wrapper): impl. byref types
31247 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31250 (search_method): don't display debug message.
31252 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
31254 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
31256 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
31258 * appdomain.c: set the missing filename when throwing exception.
31260 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
31262 * metadata.c (mono_type_size): code cleanup
31263 (mono_type_stack_size): removed some test code
31265 2002-07-21 Miguel de Icaza <miguel@ximian.com>
31267 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
31268 mono_get_exception_file_not_found now.
31270 * exception.c (mono_exception_from_name_two_strings): New version
31271 that will call a constructor with two string arguments.
31272 (mono_get_exception_file_not_found): New helper routine, used to
31273 report file-not-found errors.
31275 2002-07-20 Dick Porter <dick@ximian.com>
31278 * process.c: Pass file handles to CreateProcess
31282 * file-io.c: Implemented CreatePipe
31284 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
31286 * metadata.c (mono_get_param_info): set alignment for value types
31288 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31290 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
31291 Constify mono_domain_assembly_open().
31292 * loader.c: handle null namespace in icalls.
31294 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
31296 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
31297 (emit_str_to_ptr_conv): marshal object as structs
31299 * metadata.c (mono_type_to_unmanaged): marshal object as structs
31301 * marshal.c (mono_marshal_get_runtime_invoke): support value types
31303 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
31305 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
31306 (mono_marshal_get_native_wrapper): we an now return value types
31308 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31310 * verify.c: more checks implemented.
31312 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
31314 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
31316 (mono_marshal_get_native_wrapper): allow byref arguments
31317 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
31318 impl. PtrToStringXXX methods
31319 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
31320 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
31321 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
31322 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
31323 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
31325 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31327 * reflection.c: fix buglet in parsing an assembly name.
31329 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
31331 * marshal.c (emit_ptr_to_str_conv): first impl.
31333 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31335 * object.c, class.h: cache the vtable in the class as suggested by
31336 vargaz@freemail.hu (Zoltan Varga).
31338 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31340 * class.h, loader.c: added mono_field_from_token().
31341 * verify.c: first cut of type checking code.
31343 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
31345 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
31347 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
31349 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
31351 (mono_marshal_get_remoting_invoke): impl.
31352 (mono_delegate_begin_invoke): impl.
31353 (mono_mb_emit_save_args): impl.
31354 (mono_delegate_end_invoke): impl.
31355 (mono_marshal_get_delegate_begin_invoke):
31356 (mono_marshal_get_delegate_end_invoke):
31357 (mono_marshal_get_delegate_invoke): generate a special name for
31358 those methods (including the signature) and associate them whith
31359 the delegate class.
31361 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
31364 (mono_reflection_type_from_name): now it has a MonoImage parameter
31365 which is used as the default image to search the type in. If the image
31366 is NULL or getting the type from it fails, it defaults to corlib.
31368 * icall.c: changed 1 call to mono_reflection_type_from_name to match
31371 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31373 * reflection.c: update the parameter table index.
31375 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31377 * domain.c: don't include the mark byte in the string hash.
31379 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31381 * icall.cs: icall for Type.GetTypeCode ().
31382 * verify: a couple of fixes and disabled local initialization checks.
31384 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
31386 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
31388 * debug-helpers.c (mono_method_full_name): print the type of the
31391 * metadata.c (mono_signature_hash): a hash function for signatures
31392 (mono_signature_hash): better hash algorithm
31394 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
31396 * debug-helpers.c (mono_method_full_name): this can now generate
31397 method names with signatures
31399 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
31400 method dont have this pointers.
31402 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31404 * reflection.c: fixup typebuilder tokens.
31405 * image.c: fix buglet.
31406 * marshal.h: remove whitespace.
31407 * metadata.h, metadata.c: reinstate code that was removed.
31408 * verify.c: handle catch directives and fix another couple of bugs.
31410 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
31412 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
31413 (mono_marshal_get_native_wrapper): make it comp. with the old code
31414 (mono_marshal_get_native_wrapper): support boolean
31415 (mono_marshal_get_managed_wrapper): support more types
31417 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
31419 * class.c (class_compute_field_layout): compute class->blittable attribute.
31421 2002-07-09 Dick Porter <dick@ximian.com>
31423 * threads.c: Make the thread cleaning up cope with threads that
31426 2002-07-08 Radek Doulik <rodo@ximian.com>
31428 * reflection.c (method_encode_code): use non-translated values to
31429 compute finally_start, this fixes exception handling on ppc, yay!
31431 * decimal.h (struct signscale): fix endianess
31433 2002-07-07 Radek Doulik <rodo@ximian.com>
31435 * reflection.c: swap box_val and not val
31437 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31439 * reflection.c, reflection.h: handle full assembly info in type name.
31440 Handle Type arguments when loading custom attributes.
31441 * icall.c: updated to use new mono_reflection_type_from_name () method.
31443 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31446 (method_from_memberref): also print assembly name when method not found.
31448 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31451 (ves_icall_TypeGetProperties): fixed bug #27473.
31453 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31455 * reflection.c: display image name and token when cannot find the
31456 .ctor for an attribute.
31458 2002-07-05 Martin Baulig <martin@gnome.org>
31460 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31462 2002-07-04 Dick Porter <dick@ximian.com>
31464 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
31465 compile on mingw. This will cause mingw builds to not wait for
31466 subthreads to terminate after the main thread does. I've lodged a
31467 bug with the mingw developers for them to wrap OpenThread().
31469 2002-07-03 Dick Porter <dick@ximian.com>
31471 * threads.c: Store thread IDs instead of handles, because
31472 GetCurrentThread() returns a pseudohandle and therefore stores
31473 useless values. mono_thread_cleanup() continues checking the
31474 array of threads until it is empty, to cope with subthreads
31475 spawning new threads after the main thread has finished.
31479 * profiler-private.h: Pass the thread ID to thread profiler
31480 functions, instead of a handle
31482 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31484 * verify.c: fixes to make it more usable.
31485 * pedump.c: added --verify code to verify IL code in an assembly.
31487 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31489 * reflection.c: turn errors into warnings to allow compiling corlib.
31491 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31493 * reflection.c: add special cases to compile corlib.
31495 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31497 * reflection.c: handle properties with only a set method.
31499 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31501 * opcodes.h: add enum with opcodes in opval order.
31503 2002-07-01 Dick Porter <dick@ximian.com>
31506 * object.c (mono_runtime_run_main): Removed unneeded argument
31508 2002-06-28 Martin Baulig <martin@gnome.org>
31510 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31512 2002-06-27 Dick Porter <dick@ximian.com>
31514 * threads.c: Store the handle in both the parent thread and in the
31515 subthread, to minimise the time between starting a new thread and
31518 2002-06-26 Dick Porter <dick@ximian.com>
31520 * appdomain.c (mono_runtime_cleanup): Close the socket library
31521 after all the threads have finished, not before
31523 2002-06-26 Martin Baulig <martin@gnome.org>
31525 * debug-symfile.c (mono_debug_find_source_location): Added
31526 `guint32 *line_number' argument. If it's not NULL, store the line number
31527 there and return the file name without the line number.
31529 2002-06-25 Dick Porter <dick@ximian.com>
31533 * process.c: Process forking and other support functions
31535 2002-06-25 Dick Porter <dick@ximian.com>
31537 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
31538 things dont happen when the image is closed.
31539 (mono_image_lookup_resource): Walk the resource section looking
31540 for a particular entry
31542 * cil-coff.h: PE resource section decoding
31544 2002-06-25 Dick Porter <dick@ximian.com>
31548 (mono_assembly_foreach): Accessor functions to walk the list of
31550 (mono_assembly_set_main):
31551 (mono_assembly_get_main): Process methods need to know which
31552 assembly is the "main" one
31554 * object.c (mono_runtime_run_main): Record the main assembly
31556 * debug-helpers.c: Fix typo
31558 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
31560 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
31561 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
31563 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31565 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
31567 2002-06-21 Miguel de Icaza <miguel@ximian.com>
31569 * image.c (do_mono_image_open): Initialize reference count,
31570 otherwise we leak the MonoImage.
31572 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31574 * reflection.c: small tweak to handle self-hosting.
31576 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31578 * reflection.c: fix type name parse code.
31580 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31582 * reflection.c: break out of the loop.
31583 * image.c: special case corlib.
31585 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31587 * reflection.c: add all the custom attrs at the end to ensure the
31588 ctors have been properly initialized when the attributes are defined
31589 in the current assembly.
31591 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31593 * reflection.c: handle correctly multiple-nested types.
31595 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
31597 * row-indexes.h: fix typos.
31598 * reflection.c: adjust for typos and fix method_def_or_ref
31599 encoding in MethodImpl table.
31601 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31603 * reflection.c: fix entry point patching (thanks Serge!).
31605 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
31607 * verify.c: add check for System.Exception
31609 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31611 * image.c, class.c: minifix for code just c&p'ed.
31612 * reflection.c: warning fix.
31613 * object.h, loader.h, domain.c: load also StringBuilder.
31615 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31617 * marshal.h, marshal.c: some support code to handle complex marshaling.
31619 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31621 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
31622 Better signatures with vtable error dump.
31624 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
31626 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
31628 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
31630 * icall.c (ves_icall_Type_GetField): impl.
31632 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31634 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
31635 to retrieve a marshal description blob for a field or param.
31637 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31639 * reflection.h, reflection.c: change order of nested type emission
31640 to avoid table corruption. The NestedTypes table is sorted.
31641 * icall.c: change order of GetConstructor results to workaround mcs bug.
31643 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31645 * reflection.h, reflection.c: handle field and param marshal
31648 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31650 * icall.c, marshal.c marshal.h: more Marshal class implementation.
31652 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31654 * reflection.c: fix call convention.
31656 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31658 * reflection.h, reflection.c: mono_image_get_memberref_token()
31659 takes a type instead of a class, now. Added
31660 mono_image_get_array_token() to create tokens for the special
31661 multi-dim array methods.
31663 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31665 * assembly.c: handle modules (no assembly table). Split
31666 loading references in its own function.
31667 * class.c: handle moduleref resolution scope.
31668 * image.c, image.h: cache module name in image.
31670 2002-06-07 Martin Baulig <martin@gnome.org>
31672 * reflection.c (mono_image_get_type_info): Only add a class layout entry
31673 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
31675 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31677 * icall.c: more signature fixes that used uint instead of int.
31679 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31681 * reflection.c: fixed signature of field refs.
31683 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31685 * class.c, reflection.c: handle typerefs of nested types
31686 (both on read and when writing files).
31688 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31690 * icall.c: fix method signatures that tried to workaround the previous
31693 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31695 * debug-helpers.c: fix typo.
31697 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31699 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
31700 rewrote the PE/COFF writing code (our programs are understood by the
31703 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31705 * gc.c, gc.h, icall.c: weakreference support.
31707 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31709 * Makefile.am, mono-config.c: use $(sysconfdir).
31711 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31713 * icall.c: changed default precision of Double.ToString() to 15.
31714 Fixed memory leak. Unified with Single.ToString.
31716 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31718 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
31720 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31722 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
31723 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
31724 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
31727 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31729 * debug-symfile.c, sysmath.c: yet more compilation fixes.
31731 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31733 * reflection.c, socket-io.c: more compilation fixes.
31735 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31737 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
31738 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
31739 unicode.c: warning and compiler compatibility fixes.
31741 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31743 * class.h, metadata.c: fixed warnings/compilation errors.
31745 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31747 * Makefile.am, mono-config.c, mono-config.h: configuration file
31749 * loader.c, loader.h: make Dll mapping configurable at runtime in the
31750 config file. Export methods to insert and lookup mappings.
31752 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31754 * reflection.c: handle types and boxed objects in custom attr
31757 2002-05-30 Martin Baulig <martin@gnome.org>
31760 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
31762 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
31764 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
31765 to lookup the implmap row for a P/Invoke method.
31766 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
31767 P/Invoke method from the runtime on an as needed basis.
31769 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
31771 * metadata.c (mono_metadata_parse_signature): impl.
31773 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31775 * class.c: handle .pack directive.
31777 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31779 * object.c: initialize static fields with RVA data.
31781 2002-05-25 Martin Baulig <martin@gnome.org>
31784 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
31786 2002-05-24 Martin Baulig <martin@gnome.org>
31789 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
31790 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
31791 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
31793 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31795 * object.c: special case string ctros in invoke.
31796 * gc.c: silly whitespace changes.
31798 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
31800 * threadpool.[ch]: impl. a threadpool that can
31801 be used by mint and mono.
31803 2002-05-22 Martin Baulig <martin@gnome.org>
31805 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
31806 The first argument is now a `MonoReflectionModuleBuilder *', the return
31807 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
31808 `methods' field to get the method builder. The `token' argument is the
31811 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
31812 invalid characters instead of g_assert_not_reached()ing. This seems
31813 to be the behaviour of mscorlib.
31815 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
31817 * object.c (mono_runtime_invoke_array): applied patch from Rachel
31818 Hestilow to fix bug #25104
31820 2002-05-21 Martin Baulig <martin@gnome.org>
31822 * debug-symfile.c (mono_debug_find_source_location): New function.
31823 Looks up an IL offset in the line number table and returns the source
31824 location as a string.
31826 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31829 (mono_double_ToStringImpl): changed %f by %g until we have something
31832 2002-05-21 Nick Drochak <ndrochak@gol.com>
31834 * icall.c : Use different name for Math.Pow's icall. Needed to check
31835 parameters first in C#.
31837 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31839 * icall.c, reflection.h: added icall to get info about an event.
31841 2002-05-20 Radek Doulik <rodo@ximian.com>
31843 * object.c (mono_value_box): don't use memcpy for boxing on BIG
31845 (mono_value_box): don't use memcpy for small sizes on
31846 architectures with unaligned access
31848 2002-05-20 Martin Baulig <martin@gnome.org>
31850 * reflection.c (mono_reflection_setup_internal_class): Don't crash
31851 if `tb->parent == NULL'.
31852 (mono_reflection_create_internal_class): New function. This is
31853 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
31856 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
31859 2002-05-19 Martin Baulig <martin@gnome.org>
31861 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
31862 argument to get the length, don't default to the array length.
31864 2002-05-18 Miguel de Icaza <miguel@ximian.com>
31866 * assembly.c (mono_assembly_setrootdir): New function used to
31867 override the MONO_ASSEMBLIES directory.
31869 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31871 * icall.c: ValueType_GetHashCode() initialize local var.
31873 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31875 * reflection.c: sort custom attributes table.
31877 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31879 * reflection.c: support named args in custom attributes (write support).
31881 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31883 * reflection.c: fix finally position calculation.
31885 2002-05-15 Radek Doulik <rodo@ximian.com>
31887 * reflection.c: fixed endianess at many places
31889 * icall.c (ves_icall_InitializeArray): comment out debug msg
31891 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
31893 * object.c (mono_unhandled_exception): new function to handle
31894 unhandled exceptions.
31895 (mono_unhandled_exception): call the UnhandledException event.
31896 (mono_runtime_delegate_invoke): impl.
31898 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
31900 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
31901 returns the RVA, not the direct pointer to the data. Handle the case
31902 when the class size is fixed.
31904 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31906 * reflection.c: fix some endianess issues.
31908 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
31910 * object.c (mono_runtime_invoke): is now able to catch exceptions.
31912 * threads.c (mono_thread_init): added a callback which is invoked
31915 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
31917 * icall.c: make GetHashCode return non-negative values.
31919 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
31921 * object.c, icall.c, gc.c: revert to address-based hashcode.
31923 2002-05-13 Miguel de Icaza <miguel@ximian.com>
31925 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
31927 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31929 * icall.c, class.c: special case <Module>.
31931 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
31933 * icall.c: fix bug in GetNow().
31935 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
31937 * object.c (mono_runtime_class_init): make sure that we call all
31938 static class constructors.
31940 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31942 * reflection.c: sort methodsemantics table.
31944 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31946 * reflection.h, reflection.c: honour init locals setting.
31948 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
31950 * icall.c: copied Double ToStringImpl for Single ToStringImpl
31952 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31954 * reflection.c: support ContructorBuilders in attribute blob creation.
31956 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31958 * reflection.c: some changes to build a binary that can be run
31959 directly in windows.
31961 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31963 * loader.c: print a big message when an icall can't be found.
31965 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31967 * string-icalls.c: fix bug 24248.
31969 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31971 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
31972 icall.c, reflection.h: separate assembly loading by pathname and by
31973 assembly name. Use the MONO_PATH env var to search for assemblies.
31975 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31977 * assembly.c, image.h: add some support for assemblies
31978 with multiple modules.
31979 * class.c, class.h: export mono_class_from_typeref().
31980 * loader.c: remove duplicated code and use mono_class_from_typeref(),
31983 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31985 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
31986 documentation says (the ECMA one is correct).
31988 2002-05-02 Dick Porter <dick@ximian.com>
31990 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
31991 Don't name the synchronisation mutex.
31993 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
31996 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
31997 Make the prototypes match.
31998 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
32002 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
32003 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
32004 all systems have tm.tm_zone, so use strftime() with %Z to print
32005 the timezone abreviation into a temp string.
32007 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
32008 rather than mono_array_addr() on a MonoString on Big Endian
32011 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
32013 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
32016 2002-04-30 Dick Porter <dick@ximian.com>
32018 * socket-io.c: Cope with SOCKET being an integer rather than a
32021 * threads.c: Added Thread_free_internal, to deal with thread
32022 handle cleanup. Moved calls to handle_store() and handle_remove()
32023 to start_wrapper(), so each can only be called once. Allocate
32024 synchronisation blocks with GC_malloc(), and use GC finalisation
32025 to close the handles.
32027 * icall.c: added System.Threading.Thread::Thread_free_internal
32029 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
32031 * icall.c: support Environment.Exit, CommandLineArgs().
32033 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
32035 * object.c, object.h: added mono_runtime_run_main () and
32036 mono_runtime_get_main_args () for use in System.Environment.
32038 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
32040 * gc.c: fix thinko, enable actual finalization since the jit is now
32043 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32045 * gc.c, object.c: take into account that an object may be offset wrt the address
32046 returned by GC_malloc().
32048 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
32050 * image.c: handle files without entries in the assembly table (modules).
32052 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
32054 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
32055 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
32056 allowed to be null when it's System.Object class setup.
32058 2002-04-27 Martin Baulig <martin@gnome.org>
32060 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
32061 if `tb->parent == NULL' rather than crashing.
32063 2002-04-28 Nick Drochak <ndrochak@gol.com>
32065 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
32066 calling acos() where asin() should have been called.
32068 2002-04-26 Martin Baulig <martin@gnome.org>
32070 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
32071 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
32072 there's a subdirectory called `System', but we don't want to read that
32073 subdirectory as an assembly.
32075 2002-04-25 Martin Baulig <martin@gnome.org>
32077 * debug-symfile.c: Reflect latest MonoString changes.
32079 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
32081 * rand.c, rand.h: instance method icalls need to have an explicit
32082 this pointer as first argument in the C implementation.
32084 2002-04-25 Nick Drochak <ndrochak@gol.com>
32086 * icall.c: Fix typo in map for GetNonZeroBytes
32088 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32090 * string-icalls.c : String does now passes unit tests without any
32091 errors, the following changes has been made:
32093 Implemented replace methods.
32094 Renaming of methods to (try) follow the standard.
32095 Fixed compare ordinal
32096 Made all memory allocated directly to function instead of via icall function.
32097 Small performance fix in is_in_array function
32099 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
32101 c (mono_string_Internal_ctor_charp_int_int):
32102 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
32103 sindex < 0, throw ArgumentOutOfRangeException instead of
32104 ArgumentNullException.
32106 Added new check for length == 0, however
32107 I need to make it return String.Empty from the C code.
32109 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
32110 that calculate the length for us here.
32112 (mono_string_Internal_ctor_sbytep_int_int): Replaced
32113 mono_string_new_utf16 with mono_string_new, since value is utf8.
32115 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32117 * object.c: register the object for finalization if needed.
32118 Allocate one more char in the string for the terminating 0 char.
32120 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
32122 * class.c, class.h, image.c: check if a type implemenst a destructor.
32123 Use the proper key for array class lookups.
32124 * icall.c: register the icalls in the System.GC class.
32125 * gc.c, gc.h: GC-related functions and icalls.
32127 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32131 * unicode.c: free some strings gotten from mono_string_to_utf8 and
32132 changed a couple of free () by g_free ().
32134 * decimal.c: one-liner in the comments for decimal2string ().
32136 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32138 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
32140 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
32142 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
32143 * object.c (mono_runtime_invoke_array) : handle null in params
32145 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32147 * string-icalls.c: fixed bug in split (one off bug)
32149 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32151 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
32152 * icalls.c: added String::Equals as internal method
32154 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
32156 * threads.c: fixed bug in the double interlocked functions
32158 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
32160 * threads.c: implemented all of the new interlocked icalls.
32161 * string-icalls.c: fix a bug in insert.
32162 * icalls.c: added the icalls for interlocked, removed old string functions.
32164 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32166 * loader.c: fix off-by-one error when reading argument names.
32168 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32170 * profiler.c: win32 counter implementation (untested).
32171 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
32172 (the latter needs testing and more complete impl. from win32 folks).
32174 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
32176 * object.c: mono_array_new_full workaround mono_array_class_get
32179 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32181 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
32182 * object.h (mono_string_chars): Changed casting type.
32184 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32186 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
32187 method signatures to use gunichar2 instead of gint16.
32189 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
32191 * object.h, object.c: domain-specific versions of mono_object_new and
32194 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
32196 * object.c: changed String layout
32198 * string-icalls.c (mono_string_Internal_ctor_chara): added
32199 internal string constructors.
32201 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
32203 * threads.c: pass 'this' to the thread start routine.
32205 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32207 * string-icalls.c: fix IndexOf and LastIndexOf. Now
32208 InternalCompareStr don't call twice mono_string_cmp_char for the last
32209 character. Improved performance in mono_string_cmp_char.
32211 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
32213 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
32214 code into its own library: libmonoruntime.
32216 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
32218 * object.h, object.c: changed array format so that szarrays do not
32219 require a bounds structure.
32220 * icall.c, appdomain.c: support for new szarray format.
32222 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
32224 * metadata.c: compare also the retuns type when comparing signatures:
32225 we didn't do this as an optimization since really overloaded methods
32226 must differ also in the arguments, but this doesn't work with
32227 low-level IL code (or when using explicit conversion operators: see
32228 bug#23498 for an example).
32230 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
32232 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
32234 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
32236 * icall.c: make MonoType::GetElementType its own icall.
32238 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
32240 * icall.c: remove MonoMethod_get_Name().
32241 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
32244 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32246 * string-icalls.c: optimized a few methods.
32248 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
32250 * icall.c: added all new string internal calls
32251 * string-icalls.c: added, new string internal call implementation.
32252 * object.c: added mono_string_new_size for allocating a string a size
32254 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
32256 * object.c (mono_object_isinst): use the same code as in the
32257 optimized x86 version.
32259 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
32261 * profiler.c: TSC-based timer code (faster and more accurate).
32262 Not hooked up in configure, yet (set USE_X86TSC to 1).
32264 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
32266 * profiler.c, profiler.h: track time spent compiling methods.
32267 * threads.c: track thread creation/destruction.
32269 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
32271 * profiler.c, profiler.h, profiler-private.h: profiling interface
32272 and sample implementation. Moved here so that it can be used also by
32275 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
32277 * reflection.c, reflection.h: keep types and other handles separate in
32278 the hash tables for referred tokens. Add guid for modules.
32280 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
32282 * assembly.c: fix bugs found with valgrind.
32283 * metadata.h, metadata.c: added mono_metadata_guid_heap().
32285 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
32287 * threads: added icall support for getting current domain for
32290 2002-04-13 Martin Baulig <martin@gnome.org>
32292 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
32293 (MonoDebugVarInfo): Added `index' field for register based addresses.
32294 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
32295 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
32296 `MonoDebugVarInfo *params' and `guint32 this_offset' with
32297 `MonoDebugVarInfo *this_var'.
32299 * debug-symfile.c (relocate_variable): New static function to write
32300 a location description for a local variable or method parameter.
32302 2002-04-12 Martin Baulig <martin@gnome.org>
32304 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
32305 stack offset and begin/end scope address of a local variable.
32306 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
32307 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
32308 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
32310 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
32311 Added new relocation types for start/end scope of a local variable.
32313 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
32315 * object.h: add mono_object_domain() macro.
32316 * reflection.c: handle typespecs.
32317 * icall.c: MonoMethod::get_Name() implementation.
32319 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32321 * icall.c: String::GetHashCode() icall implementation.
32323 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32325 * icall.c: String::IndexOfAny icall.
32326 * object.c, object.h: make array->max_length more useful.
32327 Intrduced mono_object_class() and mono_string_length() macros.
32329 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32331 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
32332 instead of g_unichar_isdigit.
32334 2002-04-11 Nick Drochak <ndrochak@gol.com>
32336 * icall.c: Implement a simple Double.ToString().
32338 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32340 * appdomain.h: only io-layer.h is supposed to be included.
32341 * icall.c: explicitly import environ. Fix warning.
32343 2002-04-10 Nick Drochak <ndrochak@gol.com>
32345 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
32346 return true even if it's not Daylight Savings time.
32347 Only return false for the case where the function isn't
32348 implemented for a plaform (read Windows).
32350 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32352 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
32355 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
32357 * mempool.c (mono_mempool_alloc): only use g_malloc when
32358 absolutely necessary.
32360 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
32362 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
32364 * class.c (mono_class_vtable): use domain mempool to allocate vtable
32365 (mono_class_proxy_vtable): use domain mempool
32367 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
32369 * appdomain.h, appdomain.c: split initialization that requires the
32370 execution engine support into mono_runtime_init().
32372 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
32374 * class.c (mono_class_init): don't include vtable inside MonoClass
32375 to save some memory, gather some statistics.
32376 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
32378 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32380 * icall.c: internalcall implementation for ValueType.Equals().
32382 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
32384 * object.c (mono_message_init): moved
32385 (mono_runtime_exec_main): new arch. independent impl.
32386 (mono_runtime_invoke_array): new method - like
32387 mono_runtime_invoke, but you can pass an array of objects.
32388 (mono_remoting_invoke): new arch. independent impl.
32389 (mono_message_invoke): new arch. independent impl.
32390 (mono_runtime_class_init): new arch. independent impl.
32391 (mono_runtime_object_init): new arch. independent impl.
32393 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32395 * metadata.c, object.c, reflection.c: documented the exported
32398 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
32400 * icall.c: simpler code to pass the assembly builder data to corlib.
32401 Implement GetNestedTypes() internalcall.
32403 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32405 * class.c: warn if a type can't be loaded.
32407 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
32409 * image.h: typedef MonoImageOpenStatus
32410 * types.h: removed unused file
32412 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
32414 * icall.c: Enum_ToObject accepts enum value arguments.
32416 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
32418 * class.c: move initialization of properties, events and nested
32419 classes, so that they happen for interfaces, too.
32421 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
32423 * icall.c: cleanup some ugly casts in Array_SetValue*.
32425 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32427 * icall.c: the values array fro enums is of the correct type, now.
32428 Implement (correctly) getFullName instead of assQualifiedName for
32430 * reflection.h, reflection.c: added mono_type_get_name ().
32432 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32434 * assembly.c, image.h: for each MonoImage, record from wich assembly
32436 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
32437 Make Type.Assembly work.
32439 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
32441 * debug-symfile.h: use char* instead of gpointer to avoid
32444 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
32446 * icall.c (ves_icall_InternalExecute): impl. FielSetter
32447 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
32449 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
32451 * icall.c (mono_message_init): impl. (code cleanup)
32452 (ves_icall_InternalExecute): impl. FieldGetter
32454 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
32455 defined we call all (non-static)methods through the vtable.
32457 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
32459 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
32460 finalizer even though the memory is still referenced (and the chunk of
32461 memory is not freed).
32463 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
32465 * assembly.c: fix brokeness.
32467 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
32469 * class.c: kill some warnings. Check explicit interface method
32470 implementation also without considering the namespace.
32471 Load also literal strings in static class data.
32473 2002-03-29 Miguel de Icaza <miguel@ximian.com>
32475 * assembly.c (default_assembly_name_resolver): Kill memory leak.
32476 (default_assembly_name_resolver): Make the resolver take the
32477 "base" directory where the assembly was originally defined, so we
32478 can load DLLs that are in the same directory as the assembly that
32479 is being referenced.
32481 2002-03-28 Dick Porter <dick@ximian.com>
32487 * unicode.c: Warning cleanups
32489 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
32491 * object.h, reflection.h: use the correct type instead of MonoObject.
32493 2002-03-28 Martin Baulig <martin@gnome.org>
32495 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
32496 (mono_debug_update_symbol_file): Initialize classes if necessary.
32498 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32500 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
32501 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
32503 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
32505 * assembly.h: fix function prototype.
32506 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
32507 * mono-endian.h: use const cast.
32509 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
32511 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
32513 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32515 * loader.c: don't assert when a typeref can't be loaded, give
32516 a chance to the runtime to trow an exception instead.
32517 * loader.h: fix warning.
32519 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
32521 * class.c (mono_class_proxy_vtable): added proxy support
32523 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
32525 * icall.c: removed last of PAL calls, added System.Environment
32526 * file-io.h, file-io.c: MonoIO implementation
32527 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
32529 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32531 * appdomain.c: do not use the byte marker in ldstr table lookup.
32532 * debug-helpers.c: allow two ':' to separate class and method name.
32533 * object.c: allocate arrays bounds with the GC, too.
32534 * verify: add a few more checks.
32536 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
32538 * reflection.c: output also literal strings. Allocate parameter data
32539 with GC_malloc() (thanks, Martin, for catching this!).
32541 2002-03-26 Martin Baulig <martin@gnome.org>
32543 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
32544 include the `this' offset in the `param_offsets'.
32546 2002-03-25 Martin Baulig <martin@gnome.org>
32548 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
32549 mono_debug_get_class() function to get the classes. Added new
32550 relocation types for arrays and strings.
32551 (mono_debug_get_class): New static function to search in all
32552 referenced assemblies for a metadata token.
32554 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
32556 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32558 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
32559 hold gc-allocated objects. Make the string heap a stream like the
32560 others. Removed duplicated code when writing stream info.
32561 Added asserts to catch possible buffer overflows. Set the sorted map
32562 for tables that need sorting. Added some documentation.
32564 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
32566 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
32567 for interned strings and vtables.
32569 2002-03-24 Martin Baulig <martin@gnome.org>
32571 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
32572 it in the array since it was created with g_slist_prepend().
32574 2002-03-24 Martin Baulig <martin@gnome.org>
32576 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
32577 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
32578 (mono_debug_method_from_token): Renamed to
32579 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
32580 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
32582 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
32585 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
32587 2002-03-24 Martin Baulig <martin@gnome.org>
32589 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
32590 (mono_debug_method_from_token): New func.
32592 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
32593 New interncall, calls mono_debug_local_type_from_signature().
32594 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
32595 calls mono_debug_method_from_token().
32597 2002-03-23 Martin Baulig <martin@gnome.org>
32599 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
32600 specifies the number of bytes to be converted, not the array size.
32601 Return the number of chars, not the number of bytes.
32602 (ves_icall_iconv_get_chars): The `byteCount' argument
32603 specifies the number of bytes to be converted, not the array size.
32605 2002-03-23 Martin Baulig <martin@gnome.org>
32607 * reflection.h (MonoReflectionSigHelper): New type.
32609 * reflection.c (mono_reflection_sighelper_get_signature_local),
32610 (mono_reflection_sighelper_get_signature_local): New functions.
32612 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
32613 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
32616 2002-03-23 Martin Baulig <martin@gnome.org>
32618 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
32619 is_writeable is set.
32620 (mono_raw_buffer_update): New function to write the modified map
32623 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
32625 * debug-symfile.c (mono_debug_update_symbol_file): Call
32626 mono_raw_buffer_update() when done writing.
32628 2002-03-23 Martin Baulig <martin@gnome.org>
32630 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
32632 * debug-symfile.c: Added support for arguments and local variables.
32634 2002-03-23 Dick Porter <dick@ximian.com>
32636 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
32637 protected by ifdefs, hence breaking the w32 build.
32639 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32641 * object.c: implement is_interned() the right way.
32643 2002-03-21 Martin Baulig <martin@gnome.org>
32645 * debug-symfile.[ch]: New files to handle debugging information
32646 files. There's also support to dynamically update these symbol
32647 files to include machine dependent information.
32649 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
32651 * threads.c (mono_thread_create): new function to create thread
32654 2002-03-20 Martin Baulig <martin@gnome.org>
32656 * icall.c (ves_icall_InternalInvoke): Create a new object if the
32657 method is a constructor.
32658 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
32659 points to ves_icall_InternalInvoke().
32661 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
32663 * file-io.c: Flush shouldn't throw exceptions.
32665 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
32667 * file-io.c: FileStream flush support; FileSetLength now
32668 restores file pointer.
32670 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32672 * class.c: set image for pointer classes.
32674 2002/03/19 Nick Drochak <ndrochak@gol.com>
32676 * sysmath.c: Forgot one.
32678 2002-03-18 Miguel de Icaza <miguel@ximian.com>
32680 * sysmath.c: Avoid redefining existing names.
32682 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
32684 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
32685 handled by runtime as icall rather than dllimport from libm.so
32686 * file-io.c, file-io.h: fixed handle argument type.
32688 2002-03-18 Dick Porter <dick@ximian.com>
32690 * reflection.c (mono_image_get_type_info): rename interface to
32691 iface, because of "#define interface struct" on windows.
32693 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
32695 * class.c, class.h: rename and export mono_ptr_class_get().
32696 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
32697 * reflection.c, reflection.h, icall.c: better/saner type name
32698 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
32701 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
32703 * class.c (mono_class_init): removed hardcoded GHC_SLOT
32705 * icall.c (ves_icall_InternalInvoke): impl.
32707 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32709 * reflection.c: output the interface map table, too.
32711 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32713 * class.c (class_compute_field_layout): separate computation of
32714 static field layout
32716 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
32718 * icall.c: added System.Buffer support.
32719 * file-io.c: moved file icalls from PAL to FileStream.
32721 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
32723 * icall.c (ves_icall_System_Object_GetHashCode): impl.
32725 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
32727 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
32729 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32731 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
32733 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32735 * debug-helpers.{c,h}: moved here from monograph some useful functions
32736 to locate a method by name/signature in a class or image. Included
32737 also a small and flexible IL disassembler.
32739 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32741 * reflection.c: fixup tokens in methods with small header size, too.
32743 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
32745 * object.c (mono_string_to_utf8): remove assert(!error), instead
32748 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
32750 * icall.c: update to the new mono_Array_class_get interface.
32752 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32754 * appdomain.c, object.c: Boehm-GC enable.
32755 * icall.c: make get_data_chunk() support split data requests.
32756 Ensure a class is initialized in more cases. Return only the first
32757 property found in GetProperties() or the compiler gets confused.
32758 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
32759 * reflection.h, reflection.c: add fixup mechanism for field and method
32760 tokens. Initialize assembly->typeref in a single place. Output
32761 properties after events. Support custom attributes for events, too.
32762 Typo fix for paramter custom attrs.
32764 2002-03-07 Martin Baulig <martin@gnome.org>
32766 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
32768 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
32770 * class.c (mono_array_class_get): fix. for multi. dim. arrays
32772 2002-03-06 Martin Baulig <martin@gnome.org>
32774 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
32775 non-zero lower bounds. See testcases #F10-#F13.
32777 2002-03-05 Martin Baulig <martin@gnome.org>
32779 * exception.c (mono_get_exception_argument_out_of_range): New exception.
32781 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
32782 ves_icall_System_Array_GetValue(), only calculate the absolute array position
32784 (ves_icall_System_Array_SetValue): Likewise.
32785 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
32786 as argument and does the actual work. This function is used when copying a
32787 multi-dimensional array.
32788 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
32789 now do all the widening conversions of value types.
32790 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
32792 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32794 * class.c: remove some magic numbers and use the smbolic names,
32795 instead. Added init_events() to load event info at class init time.
32796 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
32797 and mono_metadata_methods_from_event().
32798 * reflection.h, reflection.c: added support for writing out the evnets
32799 related information.
32801 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32803 * reflection.h, icall.c: use a different method (GetInterfaces)
32804 to gather interface info and add isbyref, isprimitive and
32805 ispointer to the ves_icall_get_type_info() return value.
32807 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32809 * class.h: stared adding support for events.
32810 * icall.c: split find_members implementation. Added debug icall to get
32811 the address of an object.
32812 * reflection.c: handle TypeBuilders in mono_type_get_object().
32814 2002-03-01 Martin Baulig <martin@gnome.org>
32816 * icall.c (ves_icall_System_Array_GetLength): This must throw an
32817 ArgumentOutOfRangeException(), not an ArgumentException().
32818 (ves_icall_System_Array_GetLowerBound): Likewise.
32819 (ves_icall_System_Array_GetValue): Improved argument checking.
32820 (ves_icall_System_Array_SetValue): Improved argument checking.
32822 2002-03-01 Martin Baulig <martin@gnome.org>
32824 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
32825 called with invalid arguments rather than just dying with g_assert().
32826 (ves_icall_System_Array_SetValue): Likewise.
32827 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
32828 raise a NotImplementedException instead.
32829 (ves_icall_System_Array_GetLength): Added argument checking.
32830 (ves_icall_System_Array_GetLowerBound): Added argument checking.
32832 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
32834 * object.h (mono_assert): new macros mono_assert and
32835 mono_assert_not_reached
32837 2002-02-28 Martin Baulig <martin@gnome.org>
32839 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
32840 and "System::String::IsInterned" to "System::String::_IsInterned".
32842 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
32844 * icall.c: remove hacks for typebuilder. Added icall to create a
32845 modified type from a tybebuilder.
32846 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
32847 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
32848 to create a backing MonoClass for a TypeBuilder.
32850 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32852 * class.c, class.h: more refactoring of class init.
32853 Export mono_class_setup_mono_type() and mono_class_setup_parent().
32855 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
32857 * marshal.c, marshal.h: start of marshaling interface.
32859 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
32861 * icall.c: fix order in assembly qualified name icall.
32863 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32865 * class.c: do not free str, since we store it in the hash table.
32866 * reflection.h: add label field to MonoILExceptionInfo.
32867 * reflection.c: handle references to more than one assembly. Handle
32868 case when there isn't a module created in the assembly.
32870 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32872 * class.c: Fix typo. Start refactoring of class init code.
32874 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32876 * appdomain.c: exit with 1 on error.
32877 * class.c: we already have the name in MonoClassField.
32878 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
32879 MonoStreamHeader instead of an offset of image->raw_metadata.
32881 2002-02-26 Miguel de Icaza <miguel@ximian.com>
32883 * appdomain.c (mono_init): Be even more descriptive about the error.
32885 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
32887 * appdomain.c: give the user an informative message when corlib can't
32890 2002-02-26 Martin Baulig <martin@gnome.org>
32892 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
32893 New icall to get the time zone data.
32895 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32897 * reflection.c: set virtual and raw size of section correctly.
32898 * threads.c: transfer domain information to newly created threads.
32900 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32902 * class.c: when instancing a class in a domain, load the default
32903 vaules for static fields from the constant table. Fix System.Enum to
32905 * icall.c: implement Object::GetType() internalcall. Implemented
32906 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
32907 Fixed checking of binding flags in find_members().
32908 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
32909 * reflection.c: handle enumerations when writing to the constant
32910 table. Use a different object cache for types.
32913 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
32915 * object.c (mono_object_isinst): fix for arrays
32917 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
32919 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32921 * object.c: don't use mprotect () and fix intern pool hash table
32922 lookup for big endian systems.
32924 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32926 * icall.c: change type_is_subtype_of () signature.
32928 2002-02-21 Mark Crichton <crichton@gimp.org>
32930 * rand.c, rand.h: Added random number generator for
32931 System.Security.Cryptography classes.
32933 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
32935 * icall.c: Added System.Security.Cryptography calls.
32937 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32939 * class.c, icall.c, metadata.c: better support for pointer types.
32940 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
32941 * reflection.c: Add support for getting custom attrs for properties
32942 and simplify some code.
32944 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32946 * icall.c: change getToken () and add custom attribute GetBlob()helper
32948 * reflection.h: add custom attrs array to the reflection builder structures.
32949 * reflection.c: encode and emit custom attributes for all the relevant
32950 reflection objects. Cache fieldref and methodref tokens. Change
32951 mono_image_create_token() interface to take a MonoDynamicAssembly.
32952 More complete custom attributes decoder. Load custom attributes for
32953 Assembly, Field, Method and Constructor objects, too. Make the
32954 returned array an Attribute[] one, not object[]. Added
32955 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
32956 custom attribute constructor.
32958 2002-02-20 Dick Porter <dick@ximian.com>
32962 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
32963 problem code out for now).
32965 2002-02-19 Radek Doulik <rodo@ximian.com>
32967 * object.c (mono_ldstr): use hash table to avoid multiple swapping
32969 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
32971 * icall.c: register the GetCustomAttributes method.
32972 * object.c, object.h: add mono_string_new_len ().
32973 * reflection.h, reflection.c: added mono_runtime_invoke(),
32974 mono_install_runtime_invoke(). Added
32975 mono_reflection_get_custom_attrs () to load custom attributes and
32976 create the attribute objects.
32978 2002-02-19 Dick Porter <dick@ximian.com>
32979 * threads-dummy-types.c:
32980 * threads-dummy-types.h:
32983 * threads-pthread-types.c:
32984 * threads-pthread-types.h:
32985 * threads-pthread.c:
32986 * threads-pthread.h: Deleted obsolete files
32988 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
32990 * class.c (mono_class_vtable): runtime init the class when we
32991 allocate static class data.
32993 * icall.c (ves_icall_System_Array_SetValue): check for null values.
32995 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
32996 and String - but we will need generic marshalling support in the
32998 (mono_init): set the domain name in a ms compatible way
33000 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
33003 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
33005 * object.c (mono_array_clone): use alloca() instead of g_malloc
33008 * appdomain.c (mono_domain_unload): impl.
33010 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
33012 * appdomain.c, object.c: fix intern pool implementation.
33013 * class.c: fix alignment code.
33015 2002-02-16 Radek Doulik <rodo@ximian.com>
33017 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
33018 and s2 > s1, just copy lower bytes to be compatible with little
33019 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
33020 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
33022 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
33023 force big_endian to be 1 for big endian machines
33024 (ves_icall_iconv_new_decoder): ditto
33026 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
33028 * socket-io.c (convert_sockopt_level_and_name): If the system
33029 doesn't define SOL_IP or SOL_TCP, get them by hand using
33030 getprotobyname() and caching the values (because this could be a
33032 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
33033 Use the appropriate struct when the system does support it. Ie,
33034 not all systems have struct ip_mreqn so use struct ip_mreq when
33037 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
33039 * reflection.c: handle finally clauses.
33041 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
33043 * socket-io.c: use g_snprintf() instead of snprintf.
33045 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
33047 * reflection.c (mono_param_get_objects): Cast second argument to
33048 mono_method_get_param_names to a const char** to silence the
33051 * appdomain.c (mono_domain_assembly_open): Put parens around the
33052 truth statement in the for-loop.
33054 * unicode.c (iconv_convert): Got rid of a compiler warning about
33055 int i being unused when the system has a new iconv.
33056 (iconv_get_length): Same.
33058 * image.c (load_class_names): Cast the second argument to
33059 g_hash_table_insert() to char* to hush compiler warnings about the
33061 (mono_image_open): Same here.
33063 * socket-io.c: Don't conditionally include sys/filio.h or
33064 sys/sockio.h here anymore since we now get them from
33065 io-layer/io-layer.h
33066 (inet_pton): If the system doesn't support inet_aton, implement
33067 using inet_addr and also #define INADDR_NONE if it isn't defined
33070 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
33072 * metadata.c, metadata.h: added function to get packing and size info
33074 * reflection.h, reflection.c: handle field RVA data. Save info about
33075 the table layout if needed. Assign typedef indexes to all the types
33076 before dumping the info about them to avoid forward reference problems.
33078 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
33080 * socket-io.c (convert_sockopt_level_and_name): ifdef
33081 SO_ACCEPTCONN because it is not defined on my system (old debian)
33083 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
33085 * opcode.c: use stddef.h to get NULL.
33087 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
33089 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
33090 for FIONBIO, FIONREAD and SIOCATMARK.
33091 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
33092 define INADDR_NONE and besides, inet_addr() is deprecated and
33093 should not be used. Use inet_pton() instead - it also has the
33094 added bonus that it can easily handle IPv6 addresses as well.
33095 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
33097 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
33099 * decimal.c: remove _MSC_VER conditional.
33101 2002-02-13 Dick Porter <dick@ximian.com>
33104 * icall.c: Internal calls for Blocking, Select, Shutdown,
33105 GetSocketOption and SetSocketOption
33107 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33109 * assembly.cs: better resolver: use it instead of some kludgy
33112 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
33114 * reflection.c: the best way to speed-up the compiler is to avoid
33117 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
33119 * class.c (mono_class_vtable): changed the object layout
33120 (obj->vtable->class).
33121 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
33123 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
33125 * assembly.c: look for assemblies in the assembly dir, too.
33127 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
33129 * class.c: fix thinko in mono_class_from_type().
33131 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
33133 * exception.h, exception.c: added TypeLoadException.
33134 * object.h, object.c: added mono_array_clone ().
33135 * icall.c: handle throwOnError in AssemblyGetType().
33136 Added Array.Clone().
33137 * opcode.h, opcode.c: use a single value for the opcode val.
33138 Compile fix for non-gcc compilers.
33140 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
33142 * opcodes.c, opcodes.h: export interesting info about opcodes.
33144 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
33146 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
33149 * class.c (class_compute_field_layout): set element_class for enums
33150 (mono_class_create_from_typedef): set element_class for normal classes
33152 * icall.c (ves_icall_System_Enum_get_value): impl.
33154 * class.c (mono_class_create_from_typedef): do not set valuetype
33155 flag for System.ValueType and System.Enum
33157 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
33159 * unicode.c (iconv_convert): fix big endian problem.
33161 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
33163 * class.c: add asserts if we are ever going to scribble over memory.
33164 * socket-io.c: not all systems have AF_IRDA defined.
33166 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
33168 * class.c (class_compute_field_layout): do not consider static
33169 fields to compute alignment
33171 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
33173 * appdomain.c (mono_appdomain_get): impl.
33174 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
33176 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
33178 * icall.c: ignore "file://" prefix when loading an assembly.
33180 2002-01-23 Dick Porter <dick@ximian.com>
33184 * Makefile.am: Added socket support
33186 2002-01-23 Miguel de Icaza <miguel@ximian.com>
33188 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
33189 code back. This should return the assemblies that are loaded by
33190 the runtime on behalf of an application domain.
33192 The current implementation is still broken, it just returns every
33193 assembly loaded, but until we get real applications domain this
33196 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
33198 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
33201 2002-01-23 Miguel de Icaza <miguel@ximian.com>
33203 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
33204 the mono_class_from_name lookup.
33205 (ves_icall_get_parameter_info): ditto.
33206 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
33208 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
33210 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
33212 * class.c: load also nested classes on class init.
33213 System.ValueType instance methods gets passed boxed
33214 values, unless methods in derived classed that get a pointer to the
33216 * icall.c: use better name parsing code in GetType().
33217 * image.c, image.h: add mono_image_loaded ().
33218 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
33219 * reflection.c, reflection.h: added mono_reflection_parse_type().
33221 2002-01-22 Veronica De Santis <veron78@interfree.it>
33223 * icall.c : Added mapping of internal calls for Manual and Auto reset events
33224 * threads.c : Added the implementation of internal calls for events
33225 * threads.h : Added prototypes of internal calls for events
33227 2002-01-21 Radek Doulik <rodo@ximian.com>
33229 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
33231 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
33233 * class.c (mono_class_init): set min_align to 1 (instead of 0)
33234 (mono_class_value_size): use min_align
33236 2002-01-20 Dick Porter <dick@ximian.com>
33239 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
33240 so it compiles on w32.
33242 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
33244 * metadata.c (mono_type_stack_size): impl.
33246 * class.c (mono_class_get_field): impl. memberref token
33248 2002-01-16 Veronica De Santis <veron78@@interfree.it>
33250 * icall.h : Added the internal calls mapping for CreateMutex_internal
33251 and ReleaseMutex_internal.
33252 * threads.h : Added the prototype of mutexes internal calls.
33253 * threads.c : Added the implementations of mutexes internal calls.
33255 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
33257 * metaparse.h: removed unused file.
33258 * reflection.c, reflection.h: added stream_data_align () function
33259 to align data in streams and keep stream aligned. Add support for
33260 exception support in method headers.
33262 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
33264 * unicode.c: make iconv_convert () return the number of bytess written
33265 in the output buffer.
33267 2002-01-15 Dick Porter <dick@ximian.com>
33268 * threads.c: Make the runtime's idea of infinite timeouts coincide
33269 with the class library's
33271 Fix a particularly egregious bug in mono_thread_cleanup(). That
33272 code was so utterly bogus it must have been written on a Monday.
33274 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
33276 * reflection.h: add subtypes field to TypeBuilder.
33277 * reflection.c: encode constants for literal fields.
33278 Handle subtypes. Fix user string token (and add a zero byte)
33281 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
33283 * class.c (mono_class_init): bug fix: assign slot numbers for
33286 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
33288 * reflection.c: don't try to output a code RVA for abstract methods.
33289 Small fixes for method header format. Output parameter info to the
33290 ParamDef table. Save method overriding info to MethodImpl table.
33291 Fix property support. Allow typedef.extends to be a type in the
33293 * verify.c: fix off-by-one error.
33295 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
33297 * class.c: fix mono_class_from_mono_type () for szarray types.
33298 Remove unused cache check in mono_class_from_type_spec().
33299 * icall.c: *type_from_name () functions handle simple arrays and byref.
33300 * reflection.c: handle byref and szarray types. Handle methods without
33301 body (gets P/Invoke compilation working). Handle types and fields in
33303 * reflection.h: add rank to MonoTypeInfo.
33305 2002-01-10 Dick Porter <dick@ximian.com>
33307 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
33310 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
33312 * icall.c: initialize class in type_from_handle ().
33313 Loop also in parent classes for get_method ().
33314 * reflection.c: properly encode class and valuetype types.
33315 Start on encoding TypeBuilder types. Handle fieldrefs.
33316 Use correct length when registering a user string.
33317 Handle ConstructorBuilder and MonoMethod in get_token ().
33318 Make mono_type_get_object () aware of cached types.
33319 * object.c: back out change to mono_string_new ().
33321 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
33322 * object.c: mono_string_new should return a NULL when the string
33323 passed in is NULL -- not try to deference it.
33325 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
33327 * icall.c: hack to make IsSubType work for TypeBuilders.
33328 * reflection.c: emit constructors before methods.
33329 Retrieve param names in mono_param_get_objects().
33331 2002/01/05 Nick Drochak <ndrochak@gol.com>
33333 * Makefile.am: fix list of headers and sources so automake 1.5
33334 doesn't complain. Removed \# at end of list.
33336 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
33338 * reflection.c: get token for a method ref. Set return type of
33339 constructor to void.
33340 * loader.c: debug message.
33341 * class.c: typo fix.
33343 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
33345 * icall.c: fix array init with rank > 1. FindMembers
33346 loops in parent class as well.
33347 * image.c: do not insert nested types in name cache.
33348 * reflection.c: warning fix.
33349 * reflection.h: add override method (for interface impl).
33351 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
33353 * metadata.c: fix customattr decoding.
33355 2001-12-21 Miguel de Icaza <miguel@ximian.com>
33357 * rawbuffer.cs: Added native Win32 implementation, avoids using
33358 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
33360 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
33362 * class.c: make the low-level routines handle the cache.
33364 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
33366 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
33368 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
33370 * class.c: fix mono_array_element_size() for objects.
33371 * class.h, class.c: add properties to MonoClass and load them
33373 * icall.c: check with isinst() when assigning a value to an array
33374 instead of requiring the classes to match exactly.
33375 Implemented icall for System.Type::GetType().
33376 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
33377 enums. Handle bindingflags when looking for methods and fields.
33378 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
33379 and mono_metadata_methods_from_property().
33380 * reflection.h, reflection.c: added structures for propreties,
33381 parameters and enums. Implemented mono_property_get_object() and
33382 mono_param_get_objects().
33384 2001-12-18 Dick Porter <dick@ximian.com>
33386 * file-io.c: Use mono_string_to_utf16() instead of
33387 mono_string_chars()
33389 * object.c: Added mono_string_to_utf16(), which copies the non
33390 NULL-terminated MonoString into a new double-null-terminated
33393 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
33395 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
33397 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
33399 * file-io.c: raise exceptions if handle is invalid.
33401 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
33403 * assembly.c: yet another check for mscorlib.
33404 * class.c, class.h: load nesting info for classes.
33405 * icall.c: many new functions to support the Reflection classes.
33406 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
33407 * reflection.h, reflection.c: mono_image_create_token(),
33408 mono_assembly_get_object(), mono_type_get_object(),
33409 mono_method_get_object(), mono_field_get_object(): methods to return
33410 objects that parallel the C representation of assemblies, types,
33413 2001-12-11 Dick Porter <dick@ximian.com>
33416 * file-io.c: Internal calls for file IO.
33418 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
33420 * tabledefs.h: missing FileAttributes.
33421 * verify.h, verify.c: use is_valid_string () to simplify and check for
33422 valid strings more correctly. Fix warnings and speeling.
33423 Check more tables: Filed, File, ModuleRef, StandAloneSig.
33424 Check code: branches, maxstack, method calls.
33426 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
33428 * object.c (mono_object_allocate): removed static, so that the jit
33429 can allocate value types.
33431 * icall.c (ves_icall_System_DateTime_GetNow): impl.
33433 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33435 * class.c: init enum types right away and register the
33436 token->MonoClass map in mono_class_create_from_typedef ().
33437 * verify.h, verify.c: first cut of the verifier.
33438 * pedump.c: add --verify switch to verify metadata tables.
33439 * tabledefs.h: add some missing enums.
33441 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
33443 * class.c (mono_install_runtime_class_init): impl.
33444 (mono_class_init): renamed mono_class_metadata_init to
33445 mono_class_init, also removed the metadata_inited flag
33447 * object.c (mono_object_isinst): use faster algorithm
33449 2001-11-30 Radek Doulik <rodo@ximian.com>
33451 * mono-endian.h: reverted last change
33452 added function prototypes
33454 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
33455 add mono-endian.c back
33457 * mono-endian.c: returned back, as Paolo pointed out, it's needed
33458 for unaligned access, I've mistaked it with endianess. I am
33460 (mono_read16): fix reverted endianess
33461 (mono_read64): ditto
33462 (mono_read32): ditto
33464 2001-11-30 Dick Porter <dick@ximian.com>
33466 * exception.c: Implement mono_exception_from_name()
33468 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33470 * metadata.h, metadata.c: remove params_size and locals_size and their
33471 calculation from the metadata code: they are only usefult to the
33474 2001-11-29 Radek Doulik <rodo@ximian.com>
33476 * object.c (mono_ldstr): swap bytes here, it's probably not the
33477 best place, but works for me now, I'll redo it once I know mono
33478 better, also note that I add PROT_WRITE and don't reset back, also
33479 note that it's only affects big endians, so x86 should be OK
33481 * mono-endian.h (read16): use just glib macros for both endians
33483 * mono-endian.c: removed as glib macros are used in in
33484 mono-endian.h so we don't need to care about endianess for read
33485 macros as glib does that for us already
33487 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
33489 * class.h, class.h: take minimum alignment into consideration so
33490 that the fields of a class remain aligned also when in an array.
33492 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33494 * loader.h, loader.c: add mono_method_get_param_names().
33495 * class.c: 0-init class fields.
33497 2001-11-26 Dick Porter <dick@ximian.com>
33501 * threads.c: New file that handles System.Threading on all platforms
33504 * object.h: Remove the synchronisation struct from MonoObject,
33505 replace it with a pointer that gets initialised on demand
33507 * Makefile.am: Replace all the system-specific threading code with
33508 a single file that uses the new wrapper library
33510 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
33512 * class.c, class.h: add mono_install_trampoline() so that the runtime
33513 can register a function to create a trampoline: removes the ugly
33514 requirement that a runtime needed to export arch_create_jit_trampoline.
33515 * object.h, object.c: added mono_install_handler() so that the runtime
33516 can install an handler for exceptions generated in C code (with
33517 mono_raise_exception()). Added C struct for System.Delegate.
33518 * pedump.c: removed arch_create_jit_trampoline.
33519 * reflection.c: some cleanups to allow registering user strings and
33520 later getting a token for methodrefs and fieldrefs before the assembly
33522 * row-indexes.h: updates and fixes from the new ECMA specs.
33524 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
33526 * class.h, class.c: add enum_basetype field to MonoClass.
33527 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
33528 to get index in the constant table reated to a field, param or
33530 * reflection.h, reflection.c: handle constructors. Set public-key and
33531 version number of the built assembly to 0.
33532 * row-indexes.h: update from new ECMA spec.
33534 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33536 * class.h, class.c: add a max_interface_id to MonoClass.
33537 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
33538 since it's used to do that. Added mono_type_type_from_obj().
33539 Make GetType() return NULL instead of segfaulting if the type was not
33540 found. Handle simple arrays in assQualifiedName.
33541 * object.h: add a struct to represent an Exception.
33542 * reflection.c: output call convention in method signature.
33543 Add code to support P/Invoke methods and fixed offsets for fields.
33545 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
33547 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
33549 * icall.c: use mono_array_addr instead of array->vector: fixes the
33550 reflection image writing.
33551 * reflection.c: init call convention byte to 0 in method signature.
33552 Encode the property signature. Don't output property-related methods
33553 twice. Really process the properties for a type (don't cast a field to
33554 a property, my mom always told me that).
33555 Fix 64 bit issues in pointer alignment in a different and more
33558 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
33560 * loader.h: Removed type class from MonoDefaults, added monotype
33562 * loader.c: Loaded MonoType, removed loading of Type
33564 * icall.c (my_mono_new_object): Now returns a System.MonoType,
33565 and fills in System.Type._impl with a RuntimeTypeHandle rather
33566 than the actual MonoClass *
33568 (ves_icall_type_from_handle): change from type_class to
33571 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
33574 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
33577 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
33579 (ves_icall_System_Reflection_Assembly_GetType): implemented
33581 (ves_icall_System_MonoType_assQualifiedName): implemented
33583 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
33585 2001-11-09 Miguel de Icaza <miguel@ximian.com>
33587 * assembly.c (mono_assembly_open): Implement a cache for the
33590 (mono_assembly_close): only destroy the assembly when the last
33593 2001-11-09 Dick Porter <dick@ximian.com>
33595 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
33597 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
33599 * class.c (mono_class_metadata_init): bug fix: compute the right slot
33601 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33603 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
33604 from Martin Weindel.
33605 * object.h: add mono_string_chars ().
33607 2001-11-07 Miguel de Icaza <miguel@ximian.com>
33609 * reflection.c (build_compressed_metadata): Eliminates warnings
33610 and uses 64-bit clean code.
33612 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
33613 (mono_type_equal): Change signature to eliminate warnings.
33615 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33617 * icall.c, loader.c: remove the internalcall array constructors.
33618 Changes to match the new MonoArray structure.
33619 * object.h, object.c: an array object doesn't allocate an extra
33620 vector. Add mono_array_new_full () to create jagged arrays easily.
33622 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33624 * metadata.h, metadata.c: add mono_metadata_field_info () to
33625 retreive all the info about a field from vairous tables.
33626 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
33627 * class.h, class.c: augment MonoClassField with more info.
33628 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
33629 policy and load a field's RVA if needed.
33631 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
33633 * class.c (mono_class_metadata_init): create a trampoline for all
33634 virtual functions instead of actually compiling them.
33636 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
33638 * class.h, class.c: include name in MonoClassField.
33639 * class.c: fix fundamental type of System.Object and System.String.
33640 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
33642 * icall.c: remove internalcalls for the Reflection stuff that is now
33644 * loader.c: mono_field_from_memberref () implementation.
33645 * mono-endian.c: thinko (s/struct/union/g).
33646 * object.c, object.h: make the mono_string_* prototypes actually use
33647 MonoString instead of MonoObject.
33648 * reflection.c, reflection.h: updates for changes in the reflection
33649 code in corlib: we use C structures that map to the actual C# classes.
33650 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
33651 fat method header if needed and use the info from the ILGenerator for
33652 methods. Handle fields in types. Misc fixes.
33654 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
33656 * class.c (mono_class_metadata_init): bug fix: always allocate
33657 space for static class data
33659 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
33661 * class.c (mono_compute_relative_numbering): use relative
33662 numbering to support fast runtime type checks.
33664 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
33666 * class.c (mono_class_create_from_typeref): added debugging output
33667 to print class name when MonoDummy is returned instead of real class
33669 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
33671 * class.c (mono_class_metadata_init): interface offset table now
33672 contains pointers into the vtable - this is more efficient for the jit
33674 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
33676 * class.c (mono_class_metadata_init): use a temporary vtable (the
33677 old algorithm only worked for the interpreter, but not for the jit)
33679 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
33681 * loader.c (method_from_memberref): use mono_class_get to get the
33682 class of an array instead of using System.Array directly.
33683 (mono_get_method): also add MEMBERREF methods to the method cache
33684 which usefull for arrays.
33686 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
33688 * pedump.c (arch_compile_method): added to compute vtable entry
33690 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
33691 number of interfaces.
33693 * class.h: merged MonoArrayClass into MonoClass
33695 * class.c (mono_class_create_from_typedef): compute the vtable size and
33696 allocate space to include the vtable inside MonoClass
33697 (mono_class_metadata_init): initialize the vtable
33699 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
33701 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
33702 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
33703 * image.c: endian fixes by Laurent Rioux.
33704 * object.h, object.c: rename MonoStringObject to MonoString and
33705 MonoArrayObject to MonoArray. Change some function names to conform to
33706 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
33707 guint16* as first argument, so don't use char*.
33708 Provide macros to do the interesting things on arrays in a portable way.
33709 * threads-pthread.c: updates for the API changes and #include <sched.h>
33710 (required for sched_yield()).
33711 * icall.c: updates for the API changes above.
33712 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
33713 platforms that need them.
33715 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33717 * class.c: set the correct type for all the fundamental
33718 type when loading the class.
33720 2001-10-05 Dick Porter <dick@ximian.com>
33722 * threads-pthread.c (pthread_mutex_timedlock): Simple
33723 compatibility version for C libraries that lack this call.
33725 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33727 * class.c: MonoTypes stored in MonoClass are stored as
33728 fundamental MonoTypes when the class represents a
33729 fundamental type (System.Int32, ...).
33730 The TypeHandle return by ldtoken is a MonoType*.
33731 * icall.c: ves_icall_get_data_chunk () write out all the
33732 PE/COFF stuff. Implement ves_icall_define_method (),
33733 ves_icall_set_method_body (), ves_icall_type_from_handle ().
33734 * image.c: properly skip unknown streams.
33735 * loader.h, loader.c: add type_class to mono_defaults.
33736 * metadata.c, metadata.h: export compute_size () as
33737 mono_metadata_compute_size () with a better interface.
33738 Typo and C&P fixes.
33739 * pedump.c: don't try to print the entry point RVA if there is no entry point.
33740 * reflection.c, reflection.h: many cleanups, fixes, output method
33741 signatures and headers, typedef and typeref info, compress the metadata
33742 tables, output all the heap streams, cli header etc.
33743 * row-indexes.h: typo fixes.
33745 2001-10-04 Dick Porter <dick@ximian.com>
33747 * object.h: Add a synchronisation mutex struct to MonoObject
33749 * object.c (mono_new_object): Initialise the object
33750 synchronisation mutexes
33752 * icall.c: System.Threading.Monitor internal calls
33754 * threads-pthread.h:
33755 * threads-pthread.c: System.Threading.Monitor internal calls
33757 * threads-types.h: New file, includes the system-specific thread
33760 * threads-pthread-types.h:
33761 * threads-pthread-types.c: New files, handle pthread-specific
33762 synchronisation types
33764 * threads-dummy-types.h:
33765 * threads-dummy-types.c: New files of dummy support for
33766 thread-specific types
33770 * pedump.c: include mono-endian.h not endian.h
33772 * Makefile.am: More threads files.
33773 Name mono-endian.h not endian.h
33775 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
33777 * Makefile.am, reflection.h, reflection.c: move here the reflection related
33778 stuff and implement a few more bits.
33779 * icall.c: a field needs to be dereferenced twice. Do not use the same
33780 name for two variables in the same scope.
33781 * image.c, image.h: cleanups.
33783 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
33785 * class.c (mono_class_metadata_init): bug fix: compute the right size
33787 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
33789 * icall.c: implemented some of the Reflection internalcalls.
33790 * image.c, image.h: start writing out the PE/COFF image.
33791 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
33792 that does the reverse than decode_blob_size ().
33793 * object.c: use mono_metadata_encode_value (). Move here
33794 temporary implementation of mono_string_to_utf8 ().
33795 * rawbuffer.c: make malloc_map static.
33797 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33799 * metadata.c: fix type comparison for arrays.
33800 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
33801 Added a couple of new classes to monodefaults.
33802 * icall.c: added a couple of Reflection-related internalcalls.
33803 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
33804 Added a byval_arg MonoType to MonoClass.
33806 2001-09-28 Dick Porter <dick@ximian.com>
33809 * threads-pthread.h:
33810 * threads-pthread.c: Implemented internal calls for
33811 LocalDataStoreSlot operations. Applied mutexes around all shared
33812 data. Reworked the thread creation and Start() operations to
33813 avoid a race condition.
33816 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
33818 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
33820 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
33822 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
33824 * class.c, loader.c: warn and return NULL instead of erroring out.
33825 * icall.c: added System.AppDomain::getCurDomain().
33826 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
33828 2001-09-25 Dick Porter <dick@ximian.com>
33830 * threads-pthread.h:
33831 * threads-pthread.c: Implemented timed thread joining and added
33832 System.Threading.Thread::Join_internal internal call
33834 * icall.c: Added System.Threading.Thread::Join_internal internal call
33837 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
33839 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
33841 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
33842 mono_string_intern () to implement the semantics of the ldstr opcode
33843 and the interning of System.Strings.
33844 * icall.c: provide hooks to make String::IsIntern and String::Intern
33847 2001-09-23 Dick Porter <dick@ximian.com>
33850 * threads-dummy.h: New files of dummy threading routines
33852 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
33853 support code based on system specifics
33855 Rename PTHREAD_LIBS to THREAD_LIBS
33857 2001-09-23 Dick Porter <dick@ximian.com>
33859 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
33860 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
33862 (mono_thread_init): Set up a Thread object instance to return when
33863 the main thread calls Thread.CurrentThread
33864 (mono_thread_cleanup): Wait for all subthreads to exit
33866 * icall.c: New internal calls for System.Threading.Thread::Sleep
33867 (including Schedule) and CurrentThread
33869 * threads.h: New file, to insulate thread-specific stuff from the
33872 2001-09-21 Dick Porter <dick@ximian.com>
33874 * threads-pthread.h:
33875 * threads-pthread.c: New file, for handling pthreads-style
33876 threading support. Start() now starts a new thread and executes
33877 the ThreadStart delegate instance.
33879 * icall.c: Added the internalcall for
33880 System.Threading.Thread::Start_internal
33882 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
33884 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
33886 * loader.c: work around the different signatures for delegates
33887 constructors csc generates in compiled code vs the ones compiled in mscorlib.
33889 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33891 * class.h, class.c: add mono_class_get_field_from_name ().
33892 * *: Fix C comments and other ANSI C issues.
33894 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
33896 * endian.h, assembly.c: fix some endianness issues.
33898 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
33900 * loader.h, load.c: add delegate_class to mono_defaults.
33901 Handle runtime provided methods in mono_get_method ().
33903 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
33905 * loader.c (mono_get_method): use pinvoke for internal call
33907 * icall.c: use pinvoke for internal call
33909 * loader.c (method_from_memberref): set the method name
33911 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
33913 * metadata.c: help the compiler generate better code for
33914 mono_class_from_mono_type ().
33916 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
33918 * class.c (mono_class_metadata_init): delayed computing of the
33919 class size to mono_class_metadata_init ()
33921 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
33923 * class.c, class.h: add an interfaces member to MonoClass.
33924 * image.c, image.h: add assembly_name field to MonoImage
33925 from the assembly table.
33926 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
33928 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33930 * class.c: Handle Array in mono_class_from_mono_type ().
33931 * metadata.c, pedump.c: some endian fixes.
33933 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33935 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
33936 * metadata.c: fix small problem introduced with the latest commit.
33938 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
33940 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
33941 We don't need a MonoMetadata pointer anymore to compare signatures in
33942 mono_metadata_signature_equal (), update callers.
33943 Reduced memory usage an number of allocations for MonoMethodHeader and
33944 MonoMethodSignature.
33946 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
33948 * metadata.c: added compare for szarray.
33950 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
33952 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
33953 and add a couple more types to it and mono_defaults. Give an hint on
33954 classes that need implementing in our corlib and are referenced
33957 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
33959 * class.h, class.c: keep track if a class is also an Enum.
33960 * loader.c: Implement a couple more types for use in libffi
33961 marshalling. Gives better diagnostics when failing to dlopen
33962 a library. Set method->klass for P/Invoke methods, too.
33964 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
33966 * class.c, class.h: add a MonoType this_arg to MonoClass that
33967 represents a pointer to an object of the class' type that
33968 can be used by the interpreter and later the type cache.
33969 Add best guess alignment info for valuetype objects.
33971 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
33973 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
33974 into MonoType: one less level of indirection and allocation and
33975 simplifies quite a bit of code. Added cache for MonoTypes that are
33976 used frequently, so that we don't need to allocate them all the time.
33978 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
33980 * class.c (mono_class_create_from_typedef): System.Enum is also a
33981 value type, although it does not derive from System.ValueType
33982 (maybe a bug in the ms compiler?)
33984 * metadata.c (mono_type_size): return the right size for value types
33986 * loader.c (mono_get_method): only initialize method header if not abstract
33988 * class.c (mono_class_from_mono_type): use mono_default values.
33990 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
33992 * *: use MonoClass pointers instead of <type_tokens>
33994 * class.h: new flag: metadata_inited.
33996 * class.c (mono_class_metadata_init): impl.
33997 (mono_class_instance_size): impl.
33998 (mono_class_data_size): impl.
34000 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
34002 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
34003 MonoClass now has the name and name_space fields.
34004 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
34005 mono_get_method () takes and optional MonoClass as argument.
34006 Removed mono_typedef_from_name() and added mono_class_token_from_name()
34007 instead that takes advantage of a map from class names to typedef
34008 tokens in MonoImage.
34010 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
34012 * metadata.c: zero is not a valid alignment boundary.
34013 Merge MONO_TYPE_VOID in default decoding code.
34015 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
34017 * image.h: merged MonoMetadata into MonoImage
34019 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
34020 identify the type of elements.
34022 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
34024 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
34025 * cil-coff.h: split MonoMSDOSHeader and add size info.
34026 * image.c: add some consistency checks.
34027 * metadata.c: fix row size computation: one programmer
34028 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
34029 add explanation for the locator routine.
34030 Fix decoding of size in method header.
34032 2001-08-20 Miguel de Icaza <miguel@ximian.com>
34034 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
34035 (g_concat_dir_and_file): Bring g_concat_dir_and_file
34036 function from gnome-libs. This uses the right path separator
34037 based on the OS, and also works around a bug in some systems where
34038 a double slash is not allowed.
34039 (default_assembly_name_resolver): Use g_concat_dir_and_file
34040 (mono_assembly_open): ditto.
34042 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
34044 * metadata.c (mono_metadata_signature_equal): impl.
34046 * *: void is now a realy MonoType (instead of using NULL)
34048 * metadata.c (do_mono_metadata_parse_type): use
34049 mono_metadata_parse_type to parse void value.
34051 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
34053 * metadata.c, metadata.h: in the signature and method header store
34054 only the space required for holding the loca vars and incoming arguments.
34056 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
34058 * metadata.c (do_mono_metadata_parse_type): treat void like any
34059 other type (instead of assigning NULL);
34061 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
34063 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
34065 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
34067 * image.c (do_mono_image_open): added a cache for arrays.
34069 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
34071 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
34072 decode a single column from a row in a metadata table and changes
34073 to take advantage of it in the typedef locator (gives a nice speed up).
34074 Store offset info for function params.
34076 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
34078 * image.h (MONO_IMAGE_IS_CORLIB): removed
34080 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
34082 * assembly.c: how could mono_assembly_close () had ever worked?
34083 * metadata.c, metadata.h: provide offset info for local vars.
34084 Implement mono_type_size () to take care of alignment as well
34085 as size (it was mono_field_type_size in cli/class.c before).
34087 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
34089 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
34091 * assembly.h (CORLIB_NAME): set to corlib.dll
34093 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
34095 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
34097 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
34098 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
34099 tokentype.h: massive namespace cleanup.
34101 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
34103 * metadata.h, metadata.c: decode exception clauses when parsing method header.
34105 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
34107 * metadata.c (mono_metadata_free_type): added check for type !=
34108 NULL (void) before calling mono_metadata_free_type()
34110 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
34112 * metadata.h, row_indexes.h: added header with enumerations to use
34113 to index in the columns from tables in metadata and to decode coded
34114 tokens: we should start using this instead of embedding magic numbers
34117 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
34119 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
34120 Move metadata_t info from cli_image_info_t to MonoImage, where
34121 it's easily accessible. Changed all the uses accordingly.
34122 Added the method and class caches to MonoImage.
34123 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
34124 and mono_metadata_decode_value () signature to be more consistent
34125 with the other parse functions (and simplify code). Taken advantage
34126 of zero-length array allocation with GCC. Removed reduntant (and
34127 wrong) MonoFieldType struct and use MonoParam instead. Changed
34128 mono_metadata_parse_field_type () to use common code for parsing.
34129 Added mono_metadata_typedef_from_field () and
34130 mono_metadata_typedef_from_method () to lookup a typedef index from a
34131 field or method token.
34132 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
34134 2001-07-23 Miguel de Icaza <miguel@ximian.com>
34136 * metadata.c (mono_metadata_parse_field_type): Implement.
34137 (do_mono_metadata_parse_type): Split engine from
34138 mono_metadata_parse_type, so that we can create smaller structures
34139 for things that just have one pointer to the MonoType (look at
34142 2001-07-20 Miguel de Icaza <miguel@ximian.com>
34144 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
34145 as Jan Gray found out, it is incorrect.
34147 2001-07-18 Miguel de Icaza <miguel@ximian.com>
34149 * assembly.c: Implement asssembly loading. This loads an image
34150 and loads all the referenced assemblies. Come to think of it, we
34151 could always do lazy loading of the assemblies.
34153 * image.c (mono_image_open): Keep loaded images in a hashtable.
34155 * image.h (MonoImage): Add reference count.
34157 2001-07-17 Miguel de Icaza <miguel@ximian.com>
34159 * assembly.c (mono_assembly_open): Keep track of the file name in
34160 case the assembly has no ASSEMBLY table.
34162 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
34165 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
34167 * metadata.c, metadata.h: decode local vars in method header
34168 parse function. Change callers accordingly.
34170 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
34172 * metadata.h, cil-coff.h: protect against multiple inclusion.
34173 Added some new structures to hold information decoded from metadata:
34174 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
34175 and relevant decoding/free functions.
34176 * metadata.c: implement decoding functions. Add warning for out of bounds
34177 index in mono_metadata_locate(). Implement mono_get_method () to retreive
34178 all the info about a method signature and invocation. Remove check on
34179 uninitialized local var in parse_mh() and fix memory leak.
34181 2001-07-12 Miguel de Icaza <miguel@ximian.com>
34183 * metadata.h: More macros.
34185 * tokentype.h: New file.
34187 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
34189 * assembly.c: added a consistency check and initialize
34190 some structures with g_new0().
34191 * metadata.c: fixed a couple more bugs in table size computation
34192 and add other checks for out-of bound access to metadata.
34194 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
34196 * metatada.c: fix bugs computing table sizes. Spew a
34197 warning when index in string heap is out of bounds.
34199 2001-07-04 Miguel de Icaza <miguel@ximian.com>
34201 * metadata.h: Add a couple of macros to manipulate tokens.
34203 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
34205 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
34206 cli_section_tables).
34208 2001-07-01 Miguel de Icaza <miguel@ximian.com>
34210 * metadata.c (mono_metadata_user_string): New function, provides
34211 access to the UserString heap.
34213 2001-06-27 Miguel de Icaza <miguel@ximian.com>
34215 * metadata.c: Add inline documentation.
34217 2001-06-26 Miguel de Icaza <miguel@ximian.com>
34219 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
34222 2001-06-22 Miguel de Icaza <miguel@ximian.com>
34224 * typeattr.h: New file, TypeAttribute flags.
34226 2001-06-21 Miguel de Icaza <miguel@ximian.com>
34228 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
34229 mono_assembly_ensure_section): Section loading code.
34230 (load_section_tables): Load the sections.
34232 * mono/metadata/metadata.c (mono_metadata_locate_token,
34233 mono_metadata_locate): Functions to locate the information
34234 definition given a token or a table and an index.
34235 (mono_metadata_compute_table_bases): New.
34236 (compute_size): New function to compute the sizes of the various
34239 * mono/metadata/metadata.h: Finish listing the different index
34242 * mono/metadata/pedump.c: Improve to dump new information.
34244 2001-06-19 Miguel de Icaza <miguel@ximian.com>
34246 * mono/metadata/metadata.c: Entered all the tables matching
34249 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2