1 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
3 * metadata-verify.c: Add lfanew verification.
5 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7 * metadata-verify.c: Initial skeleton of the metadata verifier.
9 * pedump.c: Add support for the metadata verifier.
11 * verify-internal.h: Export the whole assembly metadata verifier function.
13 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
15 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
17 2009-01-09 Zoltan Varga <vargaz@gmail.com>
19 * Makefile.am: Upgrade dtrace-prelink.sh location.
21 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
23 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
24 well. Otherwise the shutdown deadlock that happens on unix will can happen
26 If the main thread code finishes too fast it's possible that the finalizer
27 thread won't have executed yet, won't record itself as the finalizer thread
28 and the shutdown sequence will wait on it forever.
30 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
32 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
35 2009-01-08 Miguel de Icaza <miguel@novell.com>
37 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
38 Robert Jordan for pointing this out.
40 2009-01-07 Miguel de Icaza <miguel@novell.com>
42 * icall.c: Wrap calls to mono_strtod in CriticalSection
43 invocations when using eglib, to work around #464316.
45 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
47 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
48 return value of GetCurrentDirectory to never access unitialized memory.
50 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
52 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
53 return value of GetCurrentDirectory and expand the buffer if needed.
57 2009-10-07 Tom Hindle <tom_hindle@sil.org>
59 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
60 Adding a call to mono_init_com_types.
62 Code is contributed under MIT/X11 license.
64 2009-01-07 Geoff Norton <gnorton@novell.com>
66 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
67 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
68 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
69 be the value of the ip buffer.
71 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
73 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
74 interfaces_packed here.
76 Fixes part of #463294.
78 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
80 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
82 Fixes part of #463294.
84 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
86 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
87 is a boxed complex as well.
89 Fixes part of #463294.
91 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
93 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
94 control if a methodspec should be created for the generic method definition from external assemblies.
95 Caching of methodspec is done using the handleref hash table.
99 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
101 * loader.c (find_method): When searching the interfaces of a class
102 check the transitive closure of implemented interfaces.
106 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
108 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
110 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
112 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
113 interfaces calculation to fill_valuetype_array_derived_types.
115 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
116 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
119 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
120 interfaces for valuetypes if needed.
122 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
123 for their basetype as well. Types are array expanded if rank is > 0.
127 2008-12-30 Bill Holmes <billholmes54@gmail.com>
129 * socket-io.h : Changing the signature of
130 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
133 * icall-def.h : Changing the signature of
134 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
136 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
137 For Windows only. Avoid blocking when calling accept by
138 querying for a connection via select. The loop also queries
139 the thread state every 1000 micro seconds for the thread
140 stop state. This will avoid the process hanging on shutdown
141 when using a TcpChannel that is never connected to.
143 Code is contributed under MIT/X11 license.
145 2008-12-30 Marek Safar <marek.safar@gmail.com>
147 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
149 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
151 * class.c (get_implicit_generic_array_interfaces): Extract common
152 code to a helper function making it a lot easier on the eyes.
154 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
156 * class.c (get_implicit_generic_array_interfaces): If the internal
157 enumerator is an interface inflate System.Object instead of itself.
161 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
163 * object.c (mono_runtime_invoke_array): Don't assert with
164 byref nullable types.
166 * marshal.c (mono_marshal_get_runtime_invoke): To handle
167 byref nullables we unbox the object and store it on the
169 We can't use the boxed object since it is the T of Nullable<T>
170 and the boxed representation of a nullable it's underlying type
172 We could cheat and create a boxed nullable and use the same
173 machinery of other byref VTs but this feels like a hack and
174 using the stack has the bonus of reducing heap pressure.
178 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
180 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
185 2008-12-19 Bill Holmes <billholmes54@gmail.com>
187 * icall-def.h : Adding an internal call definition for
188 System.Environment.internalBroadcastSettingChange.
190 * icall.c : Adding a Windows only implementation to broadcast a
191 WM_SETTINGCHANGE when an environment variable has changed.
193 Code is contributed under MIT/X11 license.
195 2008-12-19 Mark Probst <mark.probst@gmail.com>
197 * class.c, class-internals.h: Made
198 mono_class_has_parent_and_ignore_generics() non-static.
200 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
202 * image.c: deal with the mmap failing when loading an image.
204 2008-12-17 Geoff Norton <gnorton@novell.com>
206 * threadpool.c: Ensure that the io_queue_lock is initialized
207 in all circumstances, as we always attempt to cleanup against it.
209 2008-12-17 Miguel de Icaza <miguel@novell.com>
211 * icall.c (ves_icall_System_Environment_get_Platform): For
212 compatibility reasons for existing client code we will keep
213 returning 4 for a while.
215 For how long will depend on the documentation being updated, and
216 for us to give client code a chance to be updated.
218 This reverts the original decison on #433108 since we did not
219 catch roughly 33 instances of the broken code in our own source
220 code base, we did not catch failures on the buildbots, and QA did
221 not bring this as a problem.
223 Only today I found some customer's code breaking due to our own
224 class libraries not being fully updated and tracked it down to
225 this change. I am reverting it because if we could not even get
226 our story straight in our own code base, how can we hope that our
227 end user code be fixed?
229 As of this morning, our Wiki page that documents how to detect
230 Unix had not been fixed.
232 2008-12-16 Zoltan Varga <vargaz@gmail.com>
234 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
236 * class.c (mono_class_get_fields): Handle loading errors.
238 2008-12-12 Mark Mason <mmason@upwardaccess.com>
240 * 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.
242 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
244 * mono-perfcounters.c: avoid warning.
246 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
248 * reflection.c (ensure_runtime_vtable): Work on generic instances and
249 make sure all interfaces have MonoClass::interface_id set.
251 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
252 method table is property set.
254 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
256 * class.c: New function mono_class_setup_interface_id that setup
257 MonoClass::interface_id if needed.
259 * class-internals.h: Export new function.
261 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
263 * class.c: Add code to sanity check the vtable after setup_vtable_general
266 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
268 * icall.c: make Assembly.GetExecutingAssembly work properly when
269 reflection is used to invoke the method.
272 2008-12-11 Mark Probst <mark.probst@gmail.com>
274 * metadata/generic-sharing.c: Look for constraints in all type
275 arguments, not just the first one.
277 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
279 * appdomain.c: return the correct CodeBase for an Assembly instance
280 that was loaded from the shadow-copy directories.
283 2008-12-10 Zoltan Varga <vargaz@gmail.com>
285 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
287 * sgen-gc.c (check_object): New debugging helper function.
289 * object.c: Fix calls to mono_value_copy_array ().
291 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
293 * class.c (mono_class_setup_fields): If working on an inflated class
294 first check if the generic definition did init with success.
298 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
300 pedump.c (main): Fix a warning.
302 2008-12-10 Bill Holmes <billholmes54@gmail.com>
304 * object-internals.h : Adding a definition for
305 MonoReflectionComVisibleAttribute.
307 * marshal.c (cominterop_com_visible) : Method added to check the
308 ComVisible attribute of a class.
310 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
311 cominterop_raise_hr_exception added to consolidate common code
312 to raise hr exceptions.
314 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
315 if a managed class should support IDispatch.
318 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
319 Added additional checks for managed object when getting
320 an IDispatch interface.
322 Code is contributed under MIT/X11 license.
324 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
326 pedump.c (main): Handle mono_get_method () returning NULL.
328 2008-12-09 Zoltan Varga <vargaz@gmail.com>
330 * marshal.h: Fix a warning.
332 2008-12-09 Bill Holmes <billholmes54@gmail.com>
334 * marshal.c : Adding cominterop_release_all_rcws to release all
335 runtime callable wrappers held by the runtime.
337 * marshal.h : Adding declaration for cominterop_release_all_rcws.
339 Code is contributed under MIT/X11 license.
341 2008-12-09 Zoltan Varga <vargaz@gmail.com>
343 * metadata.c (mono_image_alloc_lock): New helper function.
344 (mono_image_alloc0_lock): Ditto.
346 * metadata.c: Use the alloc_lock () helper functions for allocating
347 memory from the image mempool.
349 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
351 * class.c (mono_class_from_generic_parameter): Document it's
352 locking behavior. Fix double checked locking here, we stored in
353 param->pklass a partially initialized MonoClass and no membar was used.
355 2008-12-05 Marek Habersack <mhabersack@novell.com>
357 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
358 (3) functions are present in the C library use them to do the
359 job. If they are absent, make sure that the sum of int_part and
360 dec_part is rounded before returning. This is necessary due to the
361 division of dec_part by the power of 10 before the final addition
362 is performed - if the result is not rounded in some cases it will
363 yield invalid results.
365 2008-12-04 Zoltan Varga <vargaz@gmail.com>
367 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
368 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
369 instruction instead of a pointer constant.
371 2008-12-03 Zoltan Varga <vargaz@gmail.com>
373 * loader.c (mono_method_get_header): Do most of the work outside the
374 loader lock, to avoid assembly load hook deadlocks.
376 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
377 (mono_metadata_parse_type_full): Ditto.
379 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
381 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
382 Make the stack depth fixed. Ensure proper argument passing to the backtrace
383 funtions. Finally, use a lock to produce well ordered output.
385 The lock looks silly, as all calls to the corlib mempool should be guarded
386 with the loader lock, but for some reason this fact doesn't help.
388 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
390 2008-12-02 Mark Probst <mark.probst@gmail.com>
392 * socket-io.c: 64 bit big-endian fixes.
394 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
396 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
397 targets that require strict compatibility between the types.
399 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
400 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
401 Kill the strict argument and create a new one valuetype_must_be_boxed.
403 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
404 state that all valuetypes must be boxed.
408 2008-11-29 Kornél Pál <kornelpal@gmail.com>
410 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
411 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
413 Contributed under MIT/X11 license.
415 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
417 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
418 the inflate_generic_type machinery should handle it.
420 This avoids a crash when the field's flags is zero and it's type is
422 What happens is that mono_metadata_parse_type_full will see that opt_attrs
423 is zero and will return one of the cached built-in primitive types. Since
424 those types live in read-only memory, the code that copies it crashes.
426 2008-11-28 Mark Probst <mark.probst@gmail.com>
428 * object.c: Don't put function descriptors into generalized IMT
431 2008-11-28 Mark Probst <mark.probst@gmail.com>
433 * class.c: Enable generic code sharing on PPC64.
435 2008-11-27 Mark Probst <mark.probst@gmail.com>
437 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
440 * generic-sharing.c: Allocate the method template slists from the
441 image mempool so it doesn't leak.
443 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
445 * class.c (generic_array_methods): Release the linked list.
447 2008-11-27 Mark Probst <mark.probst@gmail.com>
449 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
450 invocation to g_utf16_to_utf8().
452 2008-11-26 Mark Probst <mark.probst@gmail.com>
454 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
455 arguments on big endian archs.
457 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
459 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
460 the type name (test added in corlib).
462 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
464 * pedump.c: initialize perf. counters. Fixes a segv.
466 2008-11-25 Martin Baulig <martin@ximian.com>
468 * mono-debug-debugger.c
469 (mono_debugger_runtime_invoke): Return the exception object if an
470 exception was thrown. Visual Studio displays the exception object
471 in the locals window.
473 2008-11-24 Mark Probst <mark.probst@gmail.com>
475 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
478 2008-11-24 Mark Probst <mark.probst@gmail.com>
480 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
481 MONO_TYPE_U are sizeof (gpointer), too.
483 2008-11-24 Mark Probst <mark.probst@gmail.com>
485 * marshal.c (mono_type_native_stack_size): Fixed size and
486 alignment for reference types.
488 2008-11-23 Mark Probst <mark.probst@gmail.com>
490 * class.c (mono_class_generic_sharing_enabled): Disable generic
491 code sharing for PPC64.
493 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
495 * icall.c (mono_method_get_equivalent_method): Make sure
496 method->klass->methods is inited before looping over it.
498 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
500 * object.c: when calling ExecuteAssembly in a newly created domain,
501 the configuration file and application base are already set up.
502 Bug #446353 take 2 fixed.
504 2008-11-20 Zoltan Varga <vargaz@gmail.com>
506 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
507 Fixes #444715. Fix a warning.
509 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
511 * appdomain.c: write the full path of the assembly to the .ini file
512 created when "shadow-copying"
515 2008-11-18 Zoltan Varga <vargaz@gmail.com>
517 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
520 2008-11-17 Bill Holmes <billholmes54@gmail.com>
522 * marshal.h : Fix the cygwin build.
523 marshal.c:12442: undefined reference to `_IID_IMarshal'
525 Code is contributed under MIT/X11 license.
527 2008-11-17 Bill Holmes <billholmes54@gmail.com>
529 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
530 free threaded marshaler when QueryInterface is called on a COM callable
531 wrapper requesting the IMarshal interface.
533 Code is contributed under MIT/X11 license.
535 2008-11-14 Zoltan Varga <vargaz@gmail.com>
537 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
539 * reflection.c (mono_type_get_object): Special case the very common
542 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
545 2008-11-13 Bill Holmes <billholmes54@gmail.com>
547 * process.h : Adding method declaration for
548 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
550 * process.c : Adding implementation for
551 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
553 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
554 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
556 Code is contributed under MIT/X11 license.
558 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
560 * appdomain.c (unload_thread_main): Clean up threadpool by
561 calling mono_thread_pool_remove_domain_jobs.
563 * domain-internals.h (struct _MonoDomain): Add new fields to
564 help coordinate the cleanup of the threadpool.
566 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
567 that cleans up the threadpool of all jobs associated with an appdomain.
568 It does that by cleaning up the queues and making sure all active
569 threads are accounted.
571 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
572 unloaded or in the process of. Take this is such way that there is
573 no race condition between another thread starting the unload and the
574 current thread acknowledging it.
576 * threadpool.c (async_invoke_thread): Same.
578 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
579 firing the new thread.
581 * threadpool.c (start_tpthread): Same.
583 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
585 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
587 2008-11-06 Jonathan Chambers <joncham@gmail.com>
589 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
590 Add support for DuplicateHandle.
592 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
593 Add support for DuplicateHandle.
595 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
596 Add support for DuplicateHandle.
598 Code is contributed under MIT/X11 license.
600 2008-11-06 Mark Probst <mark.probst@gmail.com>
602 * class-internals.h: Make min_align into a whole byte.
604 * class.c: Set min_align for SIMD types to 16.
606 2008-11-05 Geoff Norton <gnorton@novell.com>
608 * attach.c: Default the attacher to enabled for all cases including
611 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
613 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
616 2008-11-04 Mark Probst <mark.probst@gmail.com>
618 * monitor.c, monitor.h: New function for querying offsets of
619 members of MonoThreadsSync.
621 2008-11-04 Zoltan Varga <vargaz@gmail.com>
623 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
624 to speed up this function and to avoid the boundless memory growth caused by
625 the signature_dup () calls.
627 2008-11-02 Zoltan Varga <vargaz@gmail.com>
629 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
632 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
635 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
637 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
640 * domain-internals.h: made mono_set_private_bin_path_from_config()
642 * object.c: call the above function after setting the configuration
643 file path for the root domain.
646 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
648 * assembly.c: when the assembly is loaded from an absolute path, end
649 basedir with a directory separator.
652 2008-10-30 Mark Probst <mark.probst@gmail.com>
654 * monitor.c (mono_monitor_get_fast_enter_method): If
655 CompareExchange is not available, don't create the fastpath
656 instead of asserting. (The method is missing in the 1.1 profile.)
658 2008-10-30 Mark Probst <mark.probst@gmail.com>
660 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
662 * monitor.c, monitor.h: Code for generating Monitor.Enter and
663 Monitor.Exit IL fastpaths.
665 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
667 * class.c (mono_class_create_from_typedef): Added Vector2ul.
669 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
671 * class.c (mono_class_create_from_typedef): Added Vector2l.
673 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
675 * class.c (mono_class_create_from_typedef): Added Vector2d.
677 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
679 * appdomain.c: translate \ into / for cache_path.
680 * domain-internals.h: new mono_is_shadow_copy_enabled().
681 * icall.c: (fill_reflection_assembly_name) do the same path
682 manipulations that get_code_base does.
683 (get_code_base) use mono_is_shadow_copy_enabled.
685 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
687 * appdomain.c: shadow-copied assemblies go to CachePath +
688 ApplicationName when both are set. DynamicBase has nothing to do with
692 2008-10-26 Zoltan Varga <vargaz@gmail.com>
694 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
697 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
698 standalone signatures.
700 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
701 comparison code: instead of comparing the signatures using a custom
702 equals function, transform them to a common signature and compare that. This
703 works better with AOT.
705 2008-10-25 Zoltan Varga <vargaz@gmail.com>
707 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
709 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
710 call for generic instances.
711 (mono_class_setup_properties): Call setup_properties () before accessing
714 * class.c (mono_class_get_virtual_methods): New helper function to iterate
715 over the virtual methods of a class using metadata if possible, avoiding the
716 creation of MonoMethod's for non-virtual methods.
718 * class.c (mono_class_setup_vtable_general): Rewrite this to use
719 get_virtual_methods () to iterate over the virtual methods of classes.
721 2008-10-25 Martin Baulig <martin@ximian.com>
723 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
725 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
727 * class.c (mono_class_create_from_typedef): Added Vector4i.
729 2008-10-24 Mark Probst <mark.probst@gmail.com>
731 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
732 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
733 special-casing applies to eliminate the call completely.
735 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
737 * class.c (mono_class_create_from_typedef): Added Vector8s.
739 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
741 * class.c (mono_class_create_from_typedef): Added Vector16sb.
743 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
745 * icall.c: get rid of annoying warning.
747 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
749 * threadpool.c: in 1.x, if you change the background status of the
750 threadpool thread, it's not reset.
751 Remove unnecessary calls to SetState.
753 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
755 * threadpool.c: asynchronously create a set of idle threads upon first
756 use of the threadpool. SetMinThreads will now start the appropriate
757 number of idle threads if they are not already running. The default is
758 1 threadpool thread per CPU. Increased the maximum number of threads
761 2008-10-22 Martin Baulig <martin@ximian.com>
763 Revert r116521 from Zoltan, it breaks the debugger:
765 * class.c (mono_class_get_virtual_methods): New helper function to iterate
766 over the virtual methods of a class using metadata if possible, avoiding the
767 creation of MonoMethod's for non-virtual methods.
769 * class.c (mono_class_setup_vtable_general): Rewrite this to use
770 get_virtual_methods () to iterate over the virtual methods of classes.
772 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
774 * threads.c: when creating a threadpool thread, set its state to
776 * threadpool.c: reset the background state of a threadpool thread
777 after finishing each work item
780 2008-10-22 Zoltan Varga <vargaz@gmail.com>
782 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
784 * class.c (mono_class_setup_vtable_general): Add an optimized version for
785 generic instances which works by inflating the methods in the container
788 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
789 variant which doesn't make a copy if no inflation was done.
790 (mono_class_setup_fields): Use it.
792 * metadata.c (mono_metadata_get_shared_type): New helper function to
793 return a shared instance of a given MonoType.
795 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
796 a copy of most non-generic types.
798 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
800 * threadpool.c: remove one more GetSystemInfo () call.
802 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
804 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
805 use the code in mono-proclib.h to get processor information.
807 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
809 * appdomain.c: fixed the logic that determines whether assemblies in a
810 directory are "shadow-copied" or not. Bug #433483 fixed.
812 2008-10-22 Zoltan Varga <vargaz@gmail.com>
814 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
817 2008-10-21 Zoltan Varga <vargaz@gmail.com>
819 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
822 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
823 reflection.c: Use mono_field_get_name () for accessing a field's name.
825 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
828 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
831 * loader.c (find_method_in_class): Reenable the metadata optimization by
832 not using it for generic instances.
834 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
835 data/def_type fields from MonoClassField into a separate structure.
836 (struct MonoClassField): Remove data/def_type fields.
837 (struct _MonoClass): Add a 'field_def_values' array to store the default
838 values/RVA for fields.
840 * class.c reflection.c: Update after the changes.
842 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
843 for accessing field->data.
845 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
847 * loader.c (find_method_in_class): Revert the last change for now as
848 it breaks Mono.C5 unit tests.
850 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
851 'field_generic_types' and 'field_objects' which contain the information
852 previously stored in MonoInflatedField.
853 (MonoInflatedField): Delete.
854 (struct _MonoClassField): Delete 'generic_info' field.
856 * reflection.c: Store the information which was previously in
857 field->generic_info in MonoDynamicGenericClass instead.
859 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
860 MonoClassField changes.
862 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
864 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
865 store the value inside the data array of the MonoMethodWrapper.
866 This saves memory, is faster and fixes the lifetime issues (methods
867 were never removed from the hash previously). May also fix bug#436996.
869 2008-10-21 Zoltan Varga <vargaz@gmail.com>
871 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
872 generic instances, compute the type from the generic definition instead of
873 looking in field->generic_info.
875 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
876 for inflated fields, the only user was get_fieldref_token () which no
879 * class.c (mono_class_init): Revert the last change as it seems to cause
882 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
883 bytes on 64 bit platforms.
885 * object.c (mono_class_create_runtime_vtable): Fix a warning.
887 * object.c (mono_class_create_runtime_vtable): Don't initalize
888 field->data/field->def_type here, it is done lazily by
889 mono_class_get_field_default_value ().
891 * icall.c (ves_icall_get_enum_info): Call
892 mono_class_get_field_default_value () instead of directly accessing
893 field->data and field->def_type.
895 * object.c (get_default_field_value): Ditto.
897 * class.c (mono_field_get_data): Ditto.
899 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
900 call for generic instances.
902 * loader.c (find_method_in_class): If klass != from_class, then inflate
903 the method with the context of from_class, since the caller assumes this.
905 2008-10-20 Zoltan Varga <vargaz@gmail.com>
907 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
908 for accessing method->slot.
910 2008-10-20 Cedric Vivier <cedricv@neonux.com>
912 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
914 2008-10-19 Zoltan Varga <vargaz@gmail.com>
916 * class.c (mono_method_get_vtable_index): Use
917 mono_method_get_vtable_slot () for accessing method->slot.
919 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
920 accessing klass->methods.
922 * class.c (mono_method_get_vtable_slot): New helper function.
923 (mono_class_get_vtable_entry): Ditto.
924 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
925 accessing method->slot.
927 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
928 method to get_inflated_method ().
930 * class.c (mono_class_get_inflated_method): New helper method to obtain
931 a method of an inflated class without calling setup_methods ().
932 (mono_class_get_cctor): Use get_inflated_method.
934 * generic-sharing.c (mono_class_get_method_generic): Ditto.
936 * marshal.c image.c: Lazily create all the marshal caches.
938 * image.c (mono_image_init): Move initialization of runtime_invoke
941 * marshal.c (get_cache): New helper function to lazily initialize a
943 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
945 * debug-helpers.c (mono_method_full_name): Include generic arguments.
947 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
949 * loader.c: fixed check for interface type.
951 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
953 * appdomain.c: check for NULL setup before it's referenced.
956 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
958 * class.c: remove the unused old vtable setup code.
960 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
962 * class.c: don't depend on interface order in
963 setup_interface_offsets (bug #435777).
964 * reflection.c: sort the InterfaceImpl table (patch from
965 Jb Evain <jbevain@novell.com>).
967 2008-10-13 Zoltan Varga <vargaz@gmail.com>
969 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
970 the low level assemblies lock.
972 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
974 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
975 object.c, reflection.c, socket-io.c, threads.c: introduced
976 mono_framework_version () to return the major framewrok version,
977 changed the code that was using more complex patterns to use it.
978 Return the correct value for PlatformID for OSX.
980 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
982 * icall-def.h, process.h, process.c: added an icall to get info about
983 processes using mono-proclib.
985 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
987 * mono-perfcounters.c: use the mono-proclib functions to
988 access process information.
990 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
992 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
993 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
994 reflection.c: remove rawbuffer usage: mmap support is more sanely
995 provided by utils/mono-mmap.
997 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
999 * gc.c: use posix semaphores when possible so that
1000 mono_gc_finalize_notify() is signal safe.
1002 2008-10-11 Zoltan Varga <vargaz@gmail.com>
1004 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
1005 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
1006 be #ifdef-ed out, the linker will remove the rest.
1008 * marshal.c: Implement DISABLE_COM.
1010 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
1012 2008-10-11 Miguel de Icaza <miguel@novell.com>
1014 * locales.c (string_invariant_compare_char): Optimization: do not
1015 call g_unichar_type unless we actually need the information.
1017 2008-10-10 Mark Probst <mark.probst@gmail.com>
1019 * object.c, class-internals.h: Also create remoting trampolines
1020 for generic methods. Pass the domain to the remoting trampoline
1021 creation function, too.
1023 2008-10-10 Zoltan Varga <vargaz@gmail.com>
1025 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
1027 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1029 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
1032 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
1035 * locales.c: remove the use of g_strdown. Fixes bug #322313.
1037 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1039 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
1040 for the least possible amount of time (extending the fix in r113458).
1042 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1044 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
1046 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1048 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
1049 as possible simd intrinsic types.
1050 Optimized the test to check for the common prefix first.
1052 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
1054 * class.c: back out part of a broken optimization committed on
1055 May 23th (bug #433908).
1057 2008-10-09 Mark Probst <mark.probst@gmail.com>
1059 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
1060 Win32. Should fix #432388 for most cases until we have the new
1063 2008-10-08 Zoltan Varga <vargaz@gmail.com>
1065 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
1066 instead of using inst->id so the hash is stable for AOT.
1068 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1071 * icall.c: create a .ini file for shadow-copied assemblies that
1072 contains the location of the original assembly. Use this to return the
1073 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
1074 Also fix the number of '/' for windows when returning the CodeBase.
1077 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1079 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
1081 Code is contributed under MIT/X11 license.
1083 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1085 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
1086 if if the class vtable needs initialized.
1088 Code is contributed under MIT/X11 license.
1090 2008-10-07 Bill Holmes <billholmes54@gmail.com>
1092 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
1093 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
1094 STRING->BSTR, and CLASS->INTERFACE.
1096 Code is contributed under MIT/X11 license.
1098 2008-10-07 Marek Habersack <mhabersack@novell.com>
1100 * sysmath.h: changed the declaration of the
1101 ves_icall_System_Math_Round2 icall by adding an extra
1102 away_from_zero parameter.
1104 * sysmath.c (ves_icall_System_Math_Round2): added support for
1105 away from zero rounding. The icall now takes an extra boolean
1106 parameter to signal that away from zero operation is requested.
1108 2008-10-06 Zoltan Varga <vargaz@gmail.com>
1110 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
1111 the delegate klass so it can work with full-aot.
1112 (mono_marshal_get_delegate_end_invoke): Ditto.
1113 (mono_marshal_get_delegate_invoke): Ditto.
1115 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
1117 * gc.c, attach.h, attach.c: remove a bad pattern:
1118 add_finalizer_callback () is not implemented correctly, it can't
1119 without adding more overhead to the finalizer loop and it's not
1120 even needed, since we know exactly what we need to call, so there is
1121 no need to do so through an expensive function pointer.
1123 2008-10-04 Zoltan Varga <vargaz@gmail.com>
1125 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
1127 * attach.c (mono_attach_init): Remove the #ifdef.
1129 2008-10-04 Andreas Färber <andreas.faerber@web.de>
1131 * attach.c (mono_attach_init): Don't use
1132 mono_gc_add_finalizer_thread_callback when compiling without GC.
1135 Code is contributed under MIT/X11 license.
1137 2008-10-03 Zoltan Varga <vargaz@gmail.com>
1139 * class.c (mono_class_create_from_typedef): Remove the
1140 #ifndef DISABLE_SIMD stuff.
1142 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
1144 * class-internals.h (MonoClass): Added simd_type bit field.
1146 * class.c (mono_class_create_from_typedef): Check if type is a simd
1149 2008-10-03 Mark Probst <mark.probst@gmail.com>
1151 * object.c (mono_method_add_generic_virtual_invocation): Only add
1152 instantiations to the thunk whose count is at least as large as
1155 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
1157 * icall.c: changed the Type of the exception thrown when trying to
1158 invoke a constructor on an abstract class. Part of the fix for bug
1161 2008-10-02 Mark Probst <mark.probst@gmail.com>
1163 * class.c, class-internals.h (mono_method_get_vtable_index): New
1164 function which returns the index into the vtable and properly
1165 handles inflated virtual generic methods.
1167 2008-10-01 Mark Probst <mark.probst@gmail.com>
1169 * object.c, domain.c, object-internals.h, domain-internals.h:
1170 Generalize IMT thunk machinery to also handle thunks for virtual
1171 generic method invokes. When a virtual generic method is invoked
1172 more than a number of times we insert it into the thunk so that it
1173 can be called without lookup in unmanaged code.
1175 * generic-sharing.c, class-internals.h: Fetching a
1176 MonoGenericInst* for a method from an (M)RGCTX.
1178 2008-10-01 Zoltan Varga <vargaz@gmail.com>
1180 * marshal.c (emit_marshal_string): Applied a variant of a patch by
1181 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
1182 marshalling. Fixes #431304.
1184 2008-10-01 Bill Holmes <billholmes54@gmail.com>
1186 * marshal.c (emit_marshal_variant) : Change the attribute checks to
1187 handle when ref is specified without In or Out.
1189 Code is contributed under MIT/X11 license.
1191 2008-09-30 Mark Probst <mark.probst@gmail.com>
1193 * loader.c (mono_get_method_constrained): Don't expand method with
1194 the class's context, because it's already a method of that class.
1196 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
1198 * attach.c : should be correct build fix.
1200 2008-09-29 Zoltan Varga <vargaz@gmail.com>
1202 * attach.c: Fix the previous change.
1204 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
1206 * attach.c : quick w32 build fix.
1208 2008-09-27 Miguel de Icaza <miguel@novell.com>
1210 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
1211 crashes MonoDevelop: #430455.
1213 2008-09-27 Zoltan Varga <vargaz@gmail.com>
1215 * domain-internals.h (struct _MonoDomain): Move most fields used only by
1216 the JIT do MonoJitDomainInfo in ../mini/mini.h.
1218 * domain.c: Remove initialization/cleanup of the removed fields.
1220 2008-09-27 Mark Probst <mark.probst@gmail.com>
1222 * class.c (mono_class_generic_sharing_enabled): Enable generic
1223 code sharing for PPC.
1225 2008-09-26 Bill Holmes <billholmes54@gmail.com>
1227 * attach.c : Fixing the Windows builds.
1229 Code is contributed under MIT/X11 license.
1231 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1233 * class.c (mono_class_generic_sharing_enabled): Experimentally change
1234 the default generic sharing mode to 'all'.
1236 2008-09-25 Mark Probst <mark.probst@gmail.com>
1238 * generic-sharing.c, class-internals.h: New function for checking
1239 whether a method needs a static RGCTX invoke wrapper. A few
1240 funtions moved from mini/generic-sharing.c.
1242 * icall.c: New function used.
1244 2008-09-25 Mark Probst <mark.probst@gmail.com>
1246 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
1247 Static RGCTX invoke wrapping applies to value type methods, too.
1249 * class.c (mono_class_setup_vtable_general): In generic-shared
1250 value types, wrap methods with a static RGCTX invoke wrapper.
1252 2008-09-25 Zoltan Varga <vargaz@gmail.com>
1254 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
1257 2008-09-24 Zoltan Varga <vargaz@gmail.com>
1259 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
1260 register a callback which is called when the finalizer thread is woken
1262 (finalizer_thread): Call the callback if it exists.
1264 * attach.h attach.c: New files, implementing the attach mechanism.
1266 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
1268 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
1269 by the previous change.
1271 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
1273 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
1274 loader.c, marshal.c, metadata-internals.h, metadata.c,
1275 method-builder.c, object.c, reflection.c: introduced specific functions
1276 to allocate from the domain and image mempools and cleaned up most of
1277 the code to use them (still missing a few in reflection.c).
1278 Keep the loader bytes counter updated.
1280 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
1282 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
1283 loader-related counters.
1285 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
1287 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
1288 added more MS-compatible counters.
1290 2008-09-22 Zoltan Varga <vargaz@gmail.com>
1292 * class.c (mono_class_setup_fields): Call setup_fields before accessing
1293 class->blittable. Fixes #428217.
1295 2008-09-21 Zoltan Varga <vargaz@gmail.com>
1297 * reflection.c (mono_image_get_field_on_inst_token): Call
1298 field_encode_signature () since that handles custom modifiers too.
1301 2008-09-20 Zoltan Varga <vargaz@gmail.com>
1303 * reflection.c (add_custom_modifiers): New helper function to merge custom
1304 modifiers stored in objects to a MonoType.
1305 (fieldref_encode_signature): Encode custom modifiers.
1306 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
1307 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
1309 2008-09-19 Kornél Pál <kornelpal@gmail.com>
1311 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
1312 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
1313 64-bit IL only images because imports are not resolved for IL only images.
1314 Special thanks to Bill Holmes for finding this bug and testing the patch.
1315 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
1317 Contributed under MIT/X11 license.
1319 2008-09-19 Miguel de Icaza <miguel@novell.com>
1321 * mono-config.c (dllmap_start): Add support for the bits keyword
1322 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
1324 2008-09-19 Mark Probst <mark.probst@gmail.com>
1326 * reflection.c (inflate_mono_method): When the class the method is
1327 to be inflated for is itself not inflated, just return the method.
1329 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
1331 * mono-perfcounters.c: use more user friendly process instance names.
1333 2008-09-18 Bill Holmes <billholmes54@gmail.com>
1335 * marshal.c (emit_marshal_variant) : Change the attribute checks to
1336 handle "[in] ref" and "[in][out] ref" cases.
1338 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
1339 to mono_mb_create_method. This was causing problems calling native to
1340 managed passing Variants by value.
1342 Code is contributed under MIT/X11 license.
1344 2008-09-18 Zoltan Varga <vargaz@gmail.com>
1346 * class.c (can_access_internals): Call mono_assembly_load_friends ()
1347 before accessing the friend_assembly_names field.
1349 * assembly.c (mono_assembly_load_friends): Make this callable multiple
1351 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
1352 called lazily when it is needed.
1354 * metadata-internals.h (struct _MonoAssembly): Add
1355 'friend_assembly_names_inited' flag.
1357 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
1359 * mono-perfcounters-def.h: fix the types of a few counters.
1360 * mono-perfcounters.c: implemented the instance names getter
1363 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
1365 * culture-info-table.h : regenerated.
1367 2008-09-17 Robert Jordan <robertj@gmx.net>
1369 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
1370 context bound objects. Fixes #415577.
1372 Code is contributed under MIT/X11 license.
1374 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
1376 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
1377 implementation (bug #423582).
1379 2008-09-16 Zoltan Varga <vargaz@gmail.com>
1381 * object.c (mono_object_get_virtual_method): Handle the case method->slot
1382 is not set. Fixes #426309.
1384 2008-09-16 Jb Evain <jbevain@novell.com>
1386 * class.c (mono_class_from_name): fix the exported type look up
1387 when the type is defined in a referenced assembly.
1389 2008-09-16 Jb Evain <jbevain@novell.com>
1391 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
1392 increment the next index counter on each iteration to make that work
1393 for more than one type forwarder. Unmanaged part to fix #422929.
1395 2008-09-15 Mark Probst <mark.probst@gmail.com>
1397 * object-internals.h: enum ComInterfaceType in
1398 MonoInterfaceTypeAttribute is guint32, not guint16.
1400 2008-09-12 Mark Probst <mark.probst@gmail.com>
1402 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
1405 2008-09-11 Mark Probst <mark.probst@gmail.com>
1407 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
1410 2008-09-11 Mark Probst <mark.probst@gmail.com>
1412 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
1413 Endianness fixes for MonoSymbolFileOffsetTable.
1415 2008-09-10 Bill Holmes <billholmes54@gmail.com>
1417 * process.c (complete_path) : Removing quotes from the
1418 input path. The glib file routines do not handle file paths
1419 that have quotes around them.
1421 Code is contributed under MIT/X11 license.
1423 2008-09-10 Bill Holmes <billholmes54@gmail.com>
1425 * socket-io.h : Adding a comment to provide locations where
1426 changes to MonoSocketAsyncResult need to be synced.
1428 Code is contributed under MIT/X11 license.
1430 2008-09-10 Zoltan Varga <vargaz@gmail.com>
1432 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
1433 parameters as well. Fixes #425001.
1435 2008-09-08 Miguel de Icaza <miguel@novell.com>
1437 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
1440 2008-09-07 Miguel de Icaza <miguel@novell.com>
1442 * console-io.c: Add support for tracking the window size if it
1445 The setup is very simple: the TtySetup function will now return a
1446 pointer to a location in memory that tracks the current console
1447 size. The managed code checks its current value every time its
1448 queried against the last value set, and updates accordingly.
1450 With this setup we can work with multiple consoles, and we do not
1451 require to poke into managed code from a signal handler.
1453 Additionally, the environment for COLUMNS and LINES is now handled
1456 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
1458 2008-09-07 Mark Probst <mark.probst@gmail.com>
1460 * marshal.c (mono_type_native_stack_size): Treat
1461 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
1463 2008-09-04 Jb Evain <jbevain@novell.com>
1465 * class.c (mono_class_is_assignable_from): fix assignability of nullables
1468 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
1470 * verify.c (verify_type_compatibility_full): Revert change
1471 to allow converting a native int to unmanaged pointer be verifiable
1472 under non-strict mode.
1473 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
1475 * verify.c: Added some TODOs.
1477 2008-09-02 Bill Holmes <billholmes54@gmail.com>
1479 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
1480 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
1481 Changed to use GlobalAlloc for the memory returned on Windows platforms.
1483 Code is contributed under MIT/X11 license.
1485 2008-09-02 Jb Evain <jbevain@novell.com>
1487 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
1489 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
1491 reflection.c (typebuilder_setup_fields): Handle classes with
1494 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
1496 class.c (mono_class_setup_events): Add memory barrier due to
1497 double checked locking.
1499 class.c (mono_class_setup_properties): Same.
1501 2008-08-31 Zoltan Varga <vargaz@gmail.com>
1503 * class.c (mono_class_is_assignable_from): Fix the build.
1505 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
1506 before accessing klass->interface_bitmap. Fixes #421744.
1508 2008-08-28 Zoltan Varga <vargaz@gmail.com>
1510 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
1511 the runtime into no-exec mode, useful when running the AOT compiler.
1513 * appdomain.c gc.c object.c: Avoid executing managed code when running
1516 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
1518 * reflection.c (_mono_reflection_get_type_from_info): Handle the
1519 special case when the mono_assembly_loaded () returns NULL because the
1520 search hook is not installed.
1522 2008-08-25 Zoltan Varga <vargaz@gmail.com>
1524 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
1525 crashes in bstr marshalling on linux.
1527 2008-08-24 Zoltan Varga <vargaz@gmail.com>
1529 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
1530 with more than one parameter.
1532 2008-08-24 Miguel de Icaza <miguel@novell.com>
1534 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
1535 start/stop flow control as well when turning off ICANON (allows
1536 C-s and C-q to be read by Console.ReadKey).
1538 2008-08-24 Zoltan Varga <vargaz@gmail.com>
1540 * class.c (mono_class_init): Move the initialization of nested classes
1541 into mono_class_get_nested_types (). Fixes #418433.
1543 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
1546 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
1547 iterating tough the nested classes of a class.
1549 2008-08-23 Zoltan Varga <vargaz@gmail.com>
1551 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
1554 2008-08-22 Miguel de Icaza <miguel@novell.com>
1556 * console-io.c (sigcont_handler): Support signal chaining for
1559 (console_set_signal_handlers): Use best practices with sigaction,
1560 clear the structure before using it.
1562 2008-08-22 Robert Jordan <robertj@gmx.net>
1564 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
1565 Fix the Windows build.
1567 2008-08-22 Zoltan Varga <vargaz@gmail.com>
1569 * class.c (mono_class_generic_sharing_enabled): Make the default
1570 sharing mode 'corlib'.
1572 2008-08-21 Zoltan Varga <vargaz@gmail.com>
1574 * console-io.c (console_set_signal_handlers): Fix a warning.
1576 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
1577 method normally, the JIT will take care of avoiding recursion.
1579 2008-08-20 Bill Holmes <billholmes54@gmail.com>
1581 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
1583 Code is contributed under MIT/X11 license.
1585 2008-08-20 Miguel de Icaza <miguel@novell.com>
1587 * console-io.c (sigcont_handler): We need to restore the entire
1588 termios state, not only the original settings, as things like echo
1589 can be controlled after this (Booish exposes this issue with its
1590 own ReadLine implementation).
1592 Additionally, we need to set the terminal back into keypad_xmit
1595 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
1596 string as a paramter as well. Otherwise we get different
1599 2008-08-20 Zoltan Varga <vargaz@gmail.com>
1601 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
1602 delegates with byref out parameter passing. Fixes #351520.
1604 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
1606 (mono_type_get_desc): Add the type arguments for GENERICINST.
1607 (mono_method_full_name): Stringify the class name using mono_type_full_name
1608 so it picks up generic arguments.
1610 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
1612 * console-io.c: Removed debug output.
1614 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1616 reflection.c (mono_reflection_create_runtime_class): Alloc
1617 the nested classes linked list using the dynamic image mempool.
1618 Fixes leak in corlib compilation.
1620 2008-08-19 Miguel de Icaza <miguel@novell.com>
1622 * console-io.c: Fix incredibly annoying behavior on the console
1623 after resuming execution after control-z. This affected every
1624 console application.
1626 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1628 * mempool-internals.h: Header for mono private mempool functions. The first
1629 two function are for allocating glib linked lists using pools.
1631 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
1633 * Makefile.am: Added mempool-internals.h.
1635 2008-08-16 Zoltan Varga <vargaz@gmail.com>
1637 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
1638 (mono_domain_free): Ditto.
1640 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
1641 be used by the JIT to store its domain-specific information, instead of putting
1642 it directly into MonoDomain.
1644 * domain.c (mono_install_create_domain_hook): New helper function to install
1645 a hook which initializes domain->runtime_info.
1647 * domain.c (mono_install_free_domain_hook): Ditto.
1649 2008-08-15 Zoltan Varga <vargaz@gmail.com>
1651 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
1652 asserting if the ares parameter is null.
1654 * mono-perfcounters.c: Fix warnings.
1656 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
1657 is not needed, don't check for interruptions either.
1658 (mono_marshal_get_delegate_end_invoke): Ditto.
1660 2008-08-15 Marek Habersack <mhabersack@novell.com>
1662 * mono-perfcounters.c (predef_readonly_counter): added support for
1663 reading the ASP.NET Requests Queued counter from another process.
1665 2008-08-12 Zoltan Varga <vargaz@gmail.com>
1667 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
1668 MonoImage to simplify the AOT code.
1670 2008-08-10 Zoltan Varga <vargaz@gmail.com>
1672 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
1673 marshalling. Fixes #416078.
1675 2008-08-08 Zoltan Varga <vargaz@gmail.com>
1677 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
1678 it is set, looking up the icall address is deferred to the JIT, since
1679 in embedded scenarios, the icall might not be registered in the runtime
1680 doing the AOT compilation. Backported from the 2.0 branch.
1682 2008-08-08 Zoltan Varga <vargaz@gmail.com>
1684 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
1687 2008-08-05 Marek Habersack <mhabersack@novell.com>
1689 * Makefile.am: added support for cross-compilation.
1691 2008-08-04 Zoltan Varga <vargaz@gmail.com>
1693 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
1695 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
1697 * mono-perfcounters.c: jitted methods and jitted bytes counters.
1699 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
1701 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
1702 mono-perfcounters.c: performance counters implementation.
1704 2008-07-31 Zoltan Varga <vargaz@gmail.com>
1706 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
1707 to gpointer, letting the AOT code decide what to store in it.
1709 2008-07-31 Bill Holmes <billholmes54@gmail.com>
1711 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
1712 mono_class_setup_methods if the methods are not initialized.
1714 Code is contributed under MIT/X11 license.
1716 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
1718 * verify.c: Remove some debug code I commited by accident.
1720 * verify.c (mono_method_is_valid_in_context): Change the return value
1721 to make possible to distinguish between invalid and unverifiable.
1723 * verify.c (verifier_load_method): Don't return NULL for unverifiable
1726 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
1728 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
1729 constraints. Fixes regression in gtest-253.
1731 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
1733 * verify.c (mono_verifier_verify_class): Don't allow generic types
1734 with explicit layout.
1736 * verify.c (mono_method_verify): Check locals and argument types.
1738 2008-07-29 Zoltan Varga <vargaz@gmail.com>
1740 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
1741 wait if the thread is in StopRequested state.
1743 * class.c (mono_class_from_name): Refactor the module searching code into
1744 a separate function so it can be reused in the AOT case too.
1746 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
1748 * verify.c (mono_type_is_valid_in_context): Improve the error message.
1749 Check both the type and it's generic type definition for loader errors.
1751 * verify.c (mono_method_is_valid_in_context): Don't generate another
1752 error when a type errors occur, this leads to the wrong exception been
1755 2008-07-28 Dick Porter <dick@ximian.com>
1759 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
1760 New internal calls to duplicate and close a process handle.
1762 2008-07-27 Andreas Färber <andreas.faerber@web.de>
1764 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
1766 2008-07-27 Zoltan Varga <vargaz@gmail.com>
1768 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
1770 2008-07-27 Robert Jordan <robertj@gmx.net>
1772 * class.c (mono_class_init): Don't compute class.has_finalize for
1773 valuetypes. Fixes #412477.
1775 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
1777 * verify.c: Implement constraint equivalence checking.
1778 This is required when a generic parameter is used as
1779 argument to a constrained one.
1783 2008-07-24 Zoltan Varga <vargaz@gmail.com>
1785 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1787 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
1789 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
1790 synch with managed object layout.
1792 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
1794 * verify.c (do_branch_op): Handle valuetypes and generic
1797 * verify.c (do_cmp_op): Same.
1801 2008-07-24 Mark Probst <mark.probst@gmail.com>
1803 * generic-sharing.c: Fix memory leaks.
1805 * class.c, class-internals.h: Make
1806 mono_class_inflate_generic_type_with_mempool() non-static.
1808 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
1810 * pedump.c (dump_verify_info): Dump full class name.
1812 2008-07-24 Mark Probst <mark.probst@gmail.com>
1814 * generic-sharing.c: Removed some old code that didn't do anything.
1816 2008-07-24 Massimiliano Mantione <massi@ximian.com>
1817 * profiler.c: Added runtime_initialized_event,
1818 mono_profiler_install_runtime_initialized and
1819 mono_profiler_runtime_initialized. This new hook tells the profiler
1820 when the runtime is sufficiently initialized to be able to call
1821 mono_thread_attach on the root appdomain.
1822 * profiler.h, profiler-private.h: Likewise.
1824 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
1826 * verify.c (do_cast): Do boxing for generic arguments as well.
1828 * class.c (is_nesting_type): Drop generic instantiations before
1829 checking for nesting.
1831 * class.c (can_access_instantiation): Allow access to generic
1834 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
1836 * verify.c (verify_class_for_overlapping_reference_fields):
1837 On some cases, the field size might be zero, guard against that.
1838 Fix the explicit layout check to work as expected.
1840 2008-07-23 Zoltan Varga <vargaz@gmail.com>
1842 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
1843 mono_thread_resume () during shutdown, since the thread we want to abort
1846 2008-07-22 Zoltan Varga <vargaz@gmail.com>
1848 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
1851 * debug-mono-symfile.c: Fix a warning.
1853 * mono-perfcounters.c (get_cpu_times): Fix a warning.
1855 * object.c (mono_class_vtable): Check if exception_type is set, and return
1856 NULL as defined by the function comments.
1858 2008-07-22 Mark Probst <mark.probst@gmail.com>
1860 * mempool.c: Use malloc for every single mempool allocation if the
1861 configure option is set. This makes it easier to track mempool
1862 allocations with tools like Valgrind.
1864 2008-07-22 Jb Evain <jbevain@novell.com>
1866 * reflection.c (create_dynamic_mono_image): emit the same
1867 metadata version that SL2 does when creating a SL2 image.
1869 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
1872 * icall.c: New icall System.Enum:get_hashcode. This function
1873 avoids the overhead of boxing the enum to the underlying type.
1875 2008-07-21 Mark Probst <mark.probst@gmail.com>
1877 * reflection.c (mono_method_get_object): Don't let static RGCTX
1878 invoke wrappers get into MonoReflectionMethods.
1880 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
1882 * object-internals.h:
1883 * object.c: New mono_runtime_class_init_full function
1884 that makes throwing the exception optinal.
1886 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
1887 for the case where the exception object is supplied.
1889 2008-07-16 Kornél Pál <kornelpal@gmail.com>
1891 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
1894 Contributed under MIT/X11 license.
1896 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
1898 * string-icalls.c (ves_icall_System_String_InternalSplit):
1899 Optimize array allocation by caching the MonoClass of the
1902 * icall.c (ves_icall_Type_GetMethodsByName): Same.
1904 * reflection.c (mono_param_get_objects): Same.
1906 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
1909 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
1910 It inflates the given type using the class context.
1912 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1914 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
1915 the vtable if it already exists.
1917 * object-internals.h: Add mono_class_try_get_vtable as part of the
1920 * reflection.c (mono_type_get_object): Use the MonoObject from the
1921 vtable when possible. Reduces locking contention on reflection heavy
1924 2008-07-15 Zoltan Varga <vargaz@gmail.com>
1926 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
1927 g_bit_nth_msf () since that macro is not implemented in eglib.
1929 2008-07-13 Zoltan Varga <vargaz@gmail.com>
1931 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
1932 on platforms which do not support it.
1934 2008-07-12 Zoltan Varga <vargaz@gmail.com>
1936 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
1938 2008-07-11 Martin Baulig <martin@ximian.com>
1940 * mono-debug-debugger.h
1941 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
1943 * mono-debug-debugger.c
1944 (_mono_debugger_interruption_request): New global volatile variable.
1945 (mono_debugger_check_interruption): New public function.
1948 (mono_thread_current_check_pending_interrupt): Call
1949 mono_debugger_check_interruption().
1950 (mono_thread_interruption_checkpoint_request): Likewise.
1952 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1954 * verify.c: Add more type checks for loaded types. Verify the result
1955 handle from ldtoken.
1957 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1959 * loader.c (field_from_memberref): Don't crash if the field
1962 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1964 * verify.c: Verify if type and method instantiations
1965 don't have invalid VAR or MVAR arguments.
1967 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1969 * verify.c: Fix double free of function pointer list.
1971 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1973 * object.c (mono_string_to_utf8): Comment the new code as it
1976 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
1978 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
1980 2008-07-07 Bill Holmes <billholmes54@gmail.com>
1982 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
1983 is not throw too many times.
1985 Code is contributed under MIT/X11 license.
1987 2008-07-07 Zoltan Varga <vargaz@gmail.com>
1989 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
1990 debugging is turned off.
1992 2008-07-06 Zoltan Varga <vargaz@gmail.com>
1994 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
1996 2008-07-04 Mark Probst <mark.probst@gmail.com>
1998 * class-internals.h, class.c: Added new generic sharing option:
1999 Share only stuff in System.Collections.Generic, which is now the
2002 2008-07-04 Mark Probst <mark.probst@gmail.com>
2004 * generic-sharing.c, class-internals.h: New function for getting a
2005 generic method in a generic class given the corresponding method
2006 for a different instantiation of the class. Partly refactored
2007 from mini-trampolines.c.
2009 * class.c: Make sure generic methods have a class_inst if they are
2010 part of a generic class.
2012 * metadata.c (mono_type_stack_size_internal): Handle type
2015 2008-07-04 Mark Probst <mark.probst@gmail.com>
2017 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
2018 Signifies whether information on the this/vtable/mrgctx variable
2021 2008-07-04 Mark Probst <mark.probst@gmail.com>
2023 * object.c, object-internals.h, icall.c: New function
2024 mono_delegate_ctor_with_method(), which does the same as
2025 mono_delegate_ctor(), but takes an explicit method argument
2026 instead of taking the method from the jit info.
2028 * marshal.c: When creating a delegate with an inflated method take
2029 the "this" argument as the target class for the castclass.
2031 2008-07-03 Mark Probst <mark.probst@gmail.com>
2033 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
2034 mono_jit_info_table_find() to perform very badly in some cases.
2036 2008-07-02 Zoltan Varga <vargaz@gmail.com>
2038 * icall.c (type_from_typename): Handle 'string'.
2040 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
2041 wrappers into the wrapper_hash, since the key is not a MonoMethod.
2043 2008-07-01 Zoltan Varga <vargaz@gmail.com>
2045 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
2047 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
2048 number of available managed allocator types.
2050 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
2051 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
2053 2008-06-30 Zoltan Varga <vargaz@gmail.com>
2055 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
2056 which is a low level lock protecting just the 'jit_code_hash' hash table.
2058 * domain.c: Initialize+cleanup jit_code_hash_lock.
2060 2008-06-30 Kornél Pál <kornelpal@gmail.com>
2062 * coree.c (mono_load_coree): Set coree_module_handle global variable only
2063 after initialization.
2065 * coree.h: Make MonoFixupExe internal.
2067 Contributed under MIT/X11 license.
2069 2008-06-30 Kornél Pál <kornelpal@gmail.com>
2071 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
2072 because that is platform independent. Check NumberOfRvaAndSizes in PE32
2074 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
2075 image being loaded is a CLI image and _CorValidateImage gets called.
2077 * coree.h: Add MonoLoadImage.
2079 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
2080 instead of LoadLibrary.
2082 Contributed under MIT/X11 license.
2084 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
2086 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
2087 for any primitive type.
2089 2008-06-29 Zoltan Varga <vargaz@gmail.com>
2091 * object.c (mono_array_new_specific): Optimize this and the other allocation
2094 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
2095 domains too if mono_dont_free_domains is set.
2097 * domain-internals.h (mono_dont_free_domains): New internal option controlling
2098 whenever to free appdomain data after it has been unloaded.
2100 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
2102 2008-06-28 Zoltan Varga <vargaz@gmail.com>
2104 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
2105 (mono_method_get_equivalent_method): Fix a warning.
2107 * object.c (mono_message_init): Avoid looking up array types for each call.
2109 2008-06-27 Zoltan Varga <vargaz@gmail.com>
2111 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
2114 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
2117 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
2120 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
2123 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
2125 * object.c (mono_value_box): Fix boxing of nullables.
2127 2008-06-26 Kornél Pál <kornelpal@gmail.com>
2129 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
2130 mono_module_handle that is defined by the linker; no initialization required.
2131 * coree.h: Remove mono_module_handle, add __ImageBase, update
2132 mono_image_open_from_module_handle.
2133 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
2134 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
2135 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
2136 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
2137 to 4 GB away from image base address. IA64 version is not tested but was very
2138 easy to implement and should work if we ever need it.
2139 * domain.c (mono_init_internal): Avoid system error message boxes.
2140 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
2141 with has_entry_point. Handle do_mono_image_load fauilre correctly.
2142 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
2143 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
2144 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
2146 Contributed under MIT/X11 license.
2148 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
2150 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
2151 as part of the private mono API.
2153 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
2154 Do proper argument checking for methods that belong to generic classes.
2155 Do proper type resolution for GMFH/2.
2158 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
2160 * verify.c (do_switch): Fix a memory corruption bug with
2161 the jump index is out of bound.
2163 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
2165 * verify.c: Disable debug code.
2167 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
2169 * reflection.c (mono_image_get_methodbuilder_token): Use
2170 mono_image_get_methodspec_token_for_generic_method_definition
2171 instead of mono_image_get_memberref_token. We cache more memberef
2174 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2176 * verify.c: Inflate exception clause types.
2179 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2181 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
2184 * reflection.c (mono_image_get_ctorbuilder_token): Same.
2186 * reflection.c (mono_image_create_method_token): Same.
2188 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2190 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
2191 It does the same as mono_image_get_methodref_token but works on
2194 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
2195 and always generate a methodspec. This follows the old behavior and fixes
2196 the regressions in System.Core.
2198 2008-06-24 Zoltan Varga <vargaz@gmail.com>
2200 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
2201 don't event mono_class_get () succeeds. Fixes #402182.
2203 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
2205 * metadata-internals.h: Added MonoDynamicImage::methodspec
2206 hashtable to store methodspec tokens created for MethodBuilders.
2208 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
2209 MethodBuilders as open instantiations if a methodspec was requested.
2211 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
2213 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
2215 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
2219 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
2221 * loader.c (method_from_methodspec): Avoid crashing if the
2222 method lookup fails.
2224 2008-06-20 Dick Porter <dick@ximian.com>
2226 * socket-io.c (get_socket_assembly): Cope with Moonlight network
2227 classes being in a different assembly. Fixes bug 399184.
2229 2008-06-20 Zoltan Varga <vargaz@gmail.com>
2231 * loader.c (mono_loader_init): Make this callable multiple times.
2232 (mono_dllmap_insert): Call mono_loader_init () so this works even before
2233 the runtime is initialized. Fixes #401755.
2235 2008-06-19 Dick Porter <dick@ximian.com>
2237 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
2240 2008-06-19 Dick Porter <dick@ximian.com>
2243 * icall-def.h: Implement Socket generic Send() and Receive()
2244 methods. Fixes bug 395168.
2246 2008-06-19 Kornél Pál <kornelpal@gmail.com>
2248 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
2250 Contributed under MIT/X11 license.
2252 2008-06-18 Martin Baulig <martin@ximian.com>
2254 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
2255 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
2256 set to 80.0. The debugger <-> runtime interface is now frozen as
2260 (mono_debug_debugger_version): Bump to 4.
2262 2008-06-18 Martin Baulig <martin@ximian.com>
2264 * debug-mono-symfile.c
2265 (load_symfile): Don't check the minor version.
2267 * debug-mono-symfile.h: Bump the version number to 50.0.
2269 2008-06-18 Martin Baulig <martin@ximian.com>
2271 * debug-mono-symfile.c
2272 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
2273 minimum required version.
2275 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
2277 * reflection.c (mono_custom_attrs_from_property): Fix support for
2278 retriveving cattrs of dynamic inflated generic types.
2280 * reflection.c (mono_custom_attrs_from_event): Same.
2282 * reflection.c (mono_custom_attrs_from_field): Same;
2284 * reflection.c (typebuilder_setup_events): Same cattrs of events.
2286 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
2287 Moved to metadata.c.
2289 * metadata.c: New functions to retrive the equivalent field, event
2290 of property from the generic type definition.
2292 * metadata-internals.h: Added new functions from metadata.c.
2294 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
2296 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
2297 to cached in a mempool is used.
2299 * metadata.c (free_generic_class): In some situations field generic_info type
2300 is not properly dup'ed and leads to double free'ing.
2304 2008-06-17 Mark Probst <mark.probst@gmail.com>
2306 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
2307 this arguments (will be needed later for generic methods).
2310 2008-06-17 Mark Probst <mark.probst@gmail.com>
2312 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
2313 Create a static RGCTX invoke wrapper for methods which require it.
2315 2008-06-17 Mark Probst <mark.probst@gmail.com>
2317 * object.c, class-internals.h: New function for checking whether
2318 an individual field is special static.
2320 2008-06-15 Zoltan Varga <vargaz@gmail.com>
2322 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
2323 linear search since the table is sorted.
2325 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
2328 2008-06-14 Zoltan Varga <vargaz@gmail.com>
2330 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
2331 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
2333 * gc.c (mono_domain_finalize): Allow an infinite timeout.
2335 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
2337 * threads.c (mono_thread_request_interruption): Get rid of locking, use
2338 InterlockedCompareExchange to query and modify
2339 thread->interruption_requested.
2341 * object-internals.h (struct _MonoThread): Change interruption_requested
2342 to a gint32 so it can be modified by atomic operations. Add
2343 'critical_region_level' from the managed side, change small_id to a guint32,
2344 add new set of 'unused' fields.
2346 * appdomain.c: Bump corlib version.
2348 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2350 * class.c (mono_class_from_name): Search modules as well. Fixes
2353 2008-06-13 Mark Probst <mark.probst@gmail.com>
2355 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
2356 templates. Templates are generalized with an additional type_argc
2357 argument. RGCTX templates have type_argc==0, MRGCTX templates
2360 * domain-internals.h, domain.c: New hash table for looking up
2363 * metadata.c, metadata-internals.h: Rename hash and equal
2364 functions for MonoGenericInst's and make them public.
2366 * class-internals.h: New data structures for the MRGCTX. Macros
2367 for distinguishing slots in the RGCTX and the MRGCTX.
2369 2008-06-13 Mark Probst <mark.probst@gmail.com>
2371 * object.c (mono_method_get_imt_slot): Put the same methods of
2372 different instantiations of the same generic interface in the same
2373 IMT slots, to make generic sharing simpler.
2375 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
2377 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
2379 * metadata.c (mono_metadata_field_info_with_mempool): Added.
2380 This function works just like mono_metadata_field_info, but
2381 accept a mempool as argument to be used allocating memory.
2383 * marshal.c (mono_marshal_load_type_info): Use new function
2384 to load marshal data into image mempool.
2386 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
2388 * class.c (mono_class_inflate_generic_type_with_mempool):
2389 This function allows to inflate a generic type using
2392 * class.c (inflate_generic_type): Take a mempool as argument
2393 and use it to do type dup'ing.
2395 * class.c (mono_class_setup_fields): Field type for generic
2396 generic classes are allocated from the image mempool.
2398 * metadata.c (free_generic_class): Inflated field type is
2399 now allocated in the image mempool.
2401 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
2403 * threads.c (thread_cleanup): Free MonoThread::name.
2405 2008-06-12 Marek Habersack <mhabersack@novell.com>
2407 * appdomain.c (ensure_directory_exists): avoid unnecessary
2408 mkdir(2) calls when the shadow directory already exists.
2409 (mono_make_shadow_copy): copy also satellite assemblies from the
2410 private bin directories.
2412 2008-06-11 Zoltan Varga <vargaz@gmail.com>
2414 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
2416 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
2417 a page boundary. Fixes #396219.
2419 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2421 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
2422 due to double-checked locking.
2424 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2426 * assembly.c (build_assembly_name): Release memory on failure.
2428 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
2430 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2432 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
2435 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2437 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
2440 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2442 * loader.c (field_from_memberref): Check if field signature type is equal
2443 to the non-inflated type of the field. Fixes #398980.
2445 2008-06-11 Zoltan Varga <vargaz@gmail.com>
2447 * assembly.c (mono_assembly_load_from_full): Call
2448 mono_assembly_load_friends () outside the assemblies lock, since it can
2449 acquire the loader lock. Fixes #323696.
2451 * reflection.c (resolve_object): Inflate the inst with the context for
2452 FieldOnTypeBuilderInst. Fixes #399010.
2454 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2456 * reflection.c (mono_image_get_field_on_inst_token): Don't
2457 inflate the field to encode it's signature. If it's a
2458 VAR or MVAR it should stay that way in the signature.
2461 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2463 * reflection.c (resolve_object): Release memory of inflated types.
2465 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2467 * loader.c (mono_method_get_signature_full): Remove assert about
2468 loading a methodspec to a generic method. We have such methods, such as
2469 System.Threading.Interlocked::CompareExchange<T>.
2470 This assert was removed since it crashes the verifier when it checks
2471 methods calling CompareExchange<T>.
2473 2008-06-10 Marek Safar <marek.safar@gmail.com>
2475 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
2476 of Type array and not MonoType.
2478 2008-06-10 Marek Habersack <mhabersack@novell.com>
2480 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
2483 2008-06-10 Martin Baulig <martin@ximian.com>
2485 * debug-mono-symfile.h
2486 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
2487 changes to the file format, but we were generating incorrect
2488 source file indices in the line number table due to a bug, which
2489 made backtraces report an incorrect source file.
2491 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2493 * mono-debug.c: Moved mono_debug_free_method_jit_info from
2494 mini/debug-mini.c to here.
2496 * mono-debug.c (il_offset_from_address): Free memory from find_method.
2498 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
2499 use it to release structs returned by mono_debug_find_method.
2501 2008-06-10 Zoltan Varga <vargaz@gmail.com>
2503 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
2504 since it needs to set method->slot for all interface methods.
2506 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2508 * class-internals.h: Forgot to add.
2510 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2512 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
2514 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
2515 Lookup the custom attributes from property_hash.
2517 * reflection.c (mono_save_custom_attrs): Save the custom attributes
2518 in property_hash. Allocate all data using the image mempool.
2520 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
2521 for dynamic_custom_attrs to checks if the image is dynamic.
2523 2008-06-09 Zoltan Varga <vargaz@gmail.com>
2525 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
2528 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
2529 runtime functions while holding the domain assemblies lock.
2531 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2533 * verify.c: Reapplied the last bit of the reverted changes.
2535 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2537 * verify.c: Reapplied more of the reverted changes.
2539 2008-06-09 Martin Baulig <martin@ximian.com>
2541 * debug-mono-symfile.c (load_symfile): Check the major version
2542 first; if it's wrong, don't print the minor version in the error message.
2544 2008-06-09 Zoltan Varga <vargaz@gmail.com>
2546 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
2547 lock instead of the domain lock to avoid deadlocks, since the thread might
2548 already hold the loader lock.
2550 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
2551 (mono_thread_attach): Ditto.
2553 * monitor.c: Use a TLS variable for holding the current thread id instead
2554 of calling pthread_self ().
2555 (mono_monitor_init_tls): New internal function to initialize the TLS
2557 (mono_monitor_try_enter_internal): Put the owner == id check after the
2560 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
2561 missed optimizations when using gcc-4.3.
2563 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
2565 * reflection.c (mono_dynamic_image_free): Free the memory
2566 used by MonoGenericParam in MonoDynamicImage::gen_param.
2568 * reflection.c (mono_reflection_setup_generic_class): Allocate
2569 container from mempool.
2571 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
2572 container from mempool.
2574 2008-06-07 Zoltan Varga <vargaz@gmail.com>
2576 * threads.c (mono_set_pending_exception): New internal function to set the
2577 pending exception of the current thread.
2578 (mono_thread_get_and_clear_pending_exception): Check for
2579 thread->pending_exception as well.
2581 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
2583 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
2584 it can trigger a collection.
2586 2008-06-06 Martin Baulig <martin@ximian.com>
2588 Merged the `debugger-kahalo' branch.
2591 (MONO_DEBUGGER_VERSION): Bumped to 72.
2593 * debug-mono-symfile.h
2594 (MonoSymbolFileMethodIndexEntry): Removed.
2595 (MonoSymbolFileMethodEntry): New public typedef.
2596 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
2597 (MonoSymbolFileSourceEntry): Remove everything except `index' and
2599 (MonoSymbolFileMethodEntry): Removed.
2600 (MonoSymbolFileLexicalBlockEntry): Removed.
2601 (MonoSymbolFileLineNumberEntry): Removed.
2602 (MonoDebugLexicalBlockEntry): Removed.
2603 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
2604 removed `num_il_offsets' and `il_offsets'.
2605 (MonoSymbolFile): Replace `version' with `major_version' and
2607 (MONO_SYMBOL_FILE_VERSION): Replace with
2608 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
2609 `MONO_SYMBOL_FILE_MINOR_VERSION'.
2611 * debug-mono-symfile.c
2612 (mono_debug_symfile_lookup_location): Add support for the new line
2613 number table format.
2615 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
2617 * metadata.c (free_generic_class): Release the inflated
2618 MonoClass of dynamic generic classes if it's not a generic
2621 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
2623 * verify.c: Reapplied more of the reverted changes.
2625 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
2627 * reflection.c (lookup_custom_attr): Clean the cached flag or
2628 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
2631 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
2633 * verify.c: Reapplied a small part of the reverted changes.
2635 2008-06-07 Zoltan Varga <vargaz@gmail.com>
2637 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2639 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
2640 previously in managed code.
2641 (mono_monitor_exit): Ditto.
2642 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
2644 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
2645 the managed definition.
2647 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
2649 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
2651 2008-06-06 Zoltan Varga <vargaz@gmail.com>
2653 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
2655 * monitor.c: Add some micro optimizations.
2657 * icall.c (type_from_typename): Handle 'bool'.
2659 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
2661 * verify.c: Implement constructor verification per P III 1.8.1.4.
2664 2008-06-06 Zoltan Varga <vargaz@gmail.com>
2666 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
2667 holding the assemblies lock here too.
2669 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2671 * verify.c: Kill stack_top function.
2673 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2675 * verify.c: Kill stack_get function.
2677 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2679 * verify.c (mono_method_verify): Last change broke the build. Fixed.
2681 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2683 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
2686 * verify.c (mono_method_verify): Inflate params and locals to avoid
2687 mismatch when checking for compatibility.
2689 2008-06-05 Jonathan Chambers <joncham@gmail.com>
2691 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
2692 Length prefix should be size in bytes. Fix bug #339530.
2694 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
2695 Length prefix should be size in bytes. Fix bug #339530.
2697 Code is contributed under MIT/X11 license.
2699 2008-06-05 Bill Holmes <billholmes54@gmail.com>
2701 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
2703 Contributed under MIT/X11 license.
2705 2008-06-05 Martin Baulig <martin@ximian.com>
2707 * mono-debug-debugger.c
2708 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
2710 2008-06-05 Zoltan Varga <vargaz@gmail.com>
2712 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
2713 while holding the assemblies lock to prevent deadlocks. Handle the case
2714 where the search hook returns NULL but the assembly was still loaded.
2717 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
2718 modify domain state.
2720 2008-06-05 Andreas Färber <andreas.faerber@web.de>
2722 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
2723 * Makefile.am (pedump_LDADD): Post-process object files and
2724 add dtrace-generated object file, if necessary.
2726 Code is contributed under MIT/X11 license.
2728 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2730 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
2732 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2734 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
2736 2008-06-04 Mark Probst <mark.probst@gmail.com>
2738 * threads.c: Try to free everything from the delayed free table
2739 when shutting down threads, and set the variable to NULL after the
2740 table is freed so that calling
2741 mono_thread_hazardous_try_free_all() when shutting down the root
2742 domain doesn't crash.
2744 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2746 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
2747 the caller if resulting type was inflated.
2749 * class.c (mono_class_create_from_typespec): Free the MonoType if it
2752 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
2755 2008-06-04 Zoltan Varga <vargaz@gmail.com>
2757 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
2758 class library tests.
2760 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
2761 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
2764 2008-06-04 Mark Probst <mark.probst@gmail.com>
2766 * domain.c, domain-internals.h: The JIT infos are now freed by the
2767 JIT info table code. They are freed immediately if there only a
2768 single JIT info table in circulation. If there is more, the free
2769 is delayed via a queue.
2771 * threads.c, threads-types.h: New hazard pointer function for
2772 freeing all freeable delayed items in one sitting.
2774 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2776 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
2778 * reflection.c (typebuilder_setup_properties): Same.
2780 * reflection.c (typebuilder_setup_events): Same.
2782 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2784 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
2785 and use it for allocating memory.
2787 * reflection.c (mono_marshal_spec_from_builder): Same.
2789 * reflection.c: Change code to use new signatures.
2791 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
2793 2008-06-03 Zoltan Varga <vargaz@gmail.com>
2795 * decimal.c (rescale128): Put back one line which was accidently commented
2798 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
2801 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2803 * reflection.c (mono_reflection_generic_class_initialize): Name must
2804 be always malloc'ed so we can free it later on. Do this for field, property
2807 * metadata.c (free_generic_class): Free field, property and event names.
2809 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2811 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
2812 instead of g_memdup.
2814 * reflection.c (typebuilder_setup_fields): Same.
2816 2008-06-03 Zoltan Varga <vargaz@gmail.com>
2818 * decimal.c (rescale128): Optimize this function a bit more.
2820 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2822 * metadata.c (free_generic_class): Release some memory from
2823 SRE generic classes.
2825 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2827 * reflection.c (mono_image_get_generic_field_token): No reference
2828 to name is kept, free it.
2830 * reflection.c (mono_reflection_generic_class_initialize): Free
2831 more memory of the inflated field.
2833 2008-06-03 Zoltan Varga <vargaz@gmail.com>
2835 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
2838 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
2840 * reflection.c (mono_dynamic_image_free): Release memory used by
2841 MonoDynamicImage::array_methods elements.
2843 * reflection.c (assembly_add_win32_resources): Release memory after
2846 2008-06-02 Zoltan Varga <vargaz@gmail.com>
2848 * decimal.c (log2_32): Use an optimized version for this function too.
2850 * decimal.c (log2_64): Fix this on 32 bit machines.
2852 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
2854 * class.c (mono_dup_array_type): Implement allocation using a mempool.
2856 * class.c (mono_metadata_signature_deep_dup): Same.
2858 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
2861 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
2863 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
2865 * metadata-internals.h: Added mono_metadata_signature_dup_full.
2867 * class-internals.h: Update signatures to take a MonoMemPool.
2869 2008-06-02 Dick Porter <dick@ximian.com>
2871 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
2873 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
2874 FormatMessage API to get the error text. Fixes bug 321827.
2876 2008-06-02 Zoltan Varga <vargaz@gmail.com>
2878 * decimal.c: Add some micro optimizations to make decimal operations faster.
2880 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2882 * reflection.c (method_encode_clauses): Take a mempool
2883 as parameter and use it to allocate the clause array.
2885 * reflection.c (mono_image_get_field_on_inst_token): Free
2886 the inflated type after encoding it.
2888 * reflection.c (mono_dynamic_image_free): Free each element
2889 of MonoDynamicImage::gen_params.
2891 * reflection.c (reflection_methodbuilder_to_mono_method):
2892 Allocate the generic param array from the mempool.
2893 Allocate signature params from the mempool.
2895 * reflection.c (mono_reflection_generic_class_initialize):
2896 Free inflated fields after been used.
2898 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
2900 * icall.c: Reapply the memory leak fixes as they no
2901 longer make mono crash.
2903 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
2905 * reflection.c (mono_type_get_object): Don't store the suplied
2906 MonoType with type_hash. A caller which pass a type that
2907 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
2908 might end with a pointer to freed memory.
2909 The solution is to use byval_arg or this_arg from the associated
2910 MonoClass of the supplied type.
2912 2008-05-29 Zoltan Varga <vargaz@gmail.com>
2914 * icall.c: Revert the rest of the last change as it breaks the build too.
2916 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2918 * icall.c: Revert a leak fix as it's breaking the build.
2920 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2922 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
2924 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2926 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
2928 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2930 * icall.c: Fix some memory leaks.
2932 2008-05-29 Dick Porter <dick@ximian.com>
2934 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
2935 async socket operations from the pending list when a socket
2936 closes. Leaving it until the threadpool services the event
2937 exposes a race condition when a socket descriptor is reused.
2940 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2942 * object.c: Fix negative index check for array alocation.
2944 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2946 * icall.c, marshal.c: Delegate wrappers should skip visibility.
2947 This check is performed by the verifier for IL created delegates
2948 and by Delegate::CreateDelegate for programatically created ones.
2951 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2953 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
2954 Fix code to use mono_array_size_t instead of int.
2956 Based on patch by Luis F. Ortiz.
2957 Contributed under X11 license.
2958 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2960 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2962 * icall.c: Added ves_icall_System_Array_GetLongLength and
2963 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
2966 * icall.h: Export both new functions.
2968 Based on patch by Luis F. Ortiz.
2969 Contributed under X11 license.
2970 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2972 2008-05-28 Martin Baulig <martin@ximian.com>
2974 The debugger now requires exactly r103463.
2976 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
2977 This version is not supported by the debugger, wait for 72.
2979 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2981 * object.h: Changed array related functions to use
2982 mono_array_size_t instead of guint32. Forgot to commit this file.
2984 Patch by Luis F. Ortiz.
2985 Contributed under X11 license.
2986 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2989 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2991 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
2992 don't define it. Use the number literal instead.
2994 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2996 * icall.c: Changed array related functions to use
2997 mono_array_size_t instead of guint32.
2999 * icall.c (ves_icall_System_Array_GetLength): Check for length
3000 overflow under MONO_BIG_ARRAYS.
3002 Based on patch by Luis F. Ortiz.
3003 Contributed under X11 license.
3004 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3006 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3008 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
3010 Based on patch by Luis F. Ortiz.
3011 Contributed under X11 license.
3012 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3014 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3016 * object.c, object.h: Changed array related functions to use
3017 mono_array_size_t instead of guint32.
3019 Patch by Luis F. Ortiz.
3020 Contributed under X11 license.
3021 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3023 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
3025 * object.h: Introduced mono_array_size_t typedef. This must be used
3026 in all places an array length is expected. This is 64bits wide if
3027 MONO_BIG_ARRAYS is enabled.
3029 Patch by Luis F. Ortiz.
3030 Contributed under X11 license.
3031 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
3033 2008-05-27 Zoltan Varga <vargaz@gmail.com>
3035 * security-manager.c class.c: Set the class exception info by calling
3036 mono_class_set_failure ().
3038 * class.c (mono_class_get_exception_data): New accessor function.
3039 (mono_class_set_failure): Store exception_data in the property hash.
3041 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
3042 the struct as a property.
3044 * loader.c (mono_get_method_full): Store the lookup result for method
3045 tokens in method_cache, the others in methodref_cache to decrease the memory
3046 usage of hash tables.
3048 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
3049 (mono_image_init): method_cache is lazy inited now.
3051 * metadata-internals.h (struct _MonoImage): Change method_cache to
3052 a MonoValueHashTable, add a separate methodref_cache.
3054 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
3056 * number-formatter.h: Fix tables to avoid arithemtic overflow in
3057 Double.ToString as exposed by Bug #383531.
3059 2008-05-26 Zoltan Varga <vargaz@gmail.com>
3061 * number-formatter.h: Make some tables static.
3063 * class.c (mono_method_set_generic_container): New accessor function.
3064 (mono_method_get_generic_container): Ditto.
3066 * class-internals.h (struct _MonoMethod): Remove rarely used
3067 'generic_container' field, store it in the property hash instead. Add
3068 'is_generic' boolean field instead.
3070 * image.c (mono_image_init): Initialize property_hash.
3071 (mono_image_close): Destroy property_hash.
3073 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
3074 hold rarely used fields of runtime structures belonging to this image.
3076 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
3077 to get/set method->generic_container.
3079 * loader.c (mono_get_method_from_token): Avoid loading the method header for
3082 2008-05-25 Zoltan Varga <vargaz@gmail.com>
3084 * class.c (mono_class_inflate_generic_method_full): Don't increase
3085 mono_stats.inflated_method_count for methods found in the cache.
3087 * threads.c (mono_thread_request_interruption): Add a comment about
3090 2008-05-24 Zoltan Varga <vargaz@gmail.com>
3092 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
3093 interface_offsets_packed table.
3095 * class.c (mono_class_init): Remove some dead code.
3097 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
3098 mono_class_setup_vtable () when CAS is active to detect security problems.
3100 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
3102 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
3104 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
3105 parameters as it's irrelevant for delegate checking.
3107 2008-05-23 Zoltan Varga <vargaz@gmail.com>
3109 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
3111 * class.c (mono_class_init): Control the creation of a generic vtable using
3112 a global which is true by default, but set to false by the runtime startup code.
3114 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
3115 Disabled for now since it breaks the embedding API.
3116 Move the setup of class->methods for arrays to mono_class_setup_methods ().
3117 (mono_class_setup_methods): Add a memory barrier.
3119 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
3120 when mono_class_init () doesn't compute the generic vtable.
3122 2008-05-23 Massimiliano Mantione <massi@ximian.com>
3123 * profiler.c: Added mono_profiler_install_statistical_call_chain,
3124 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
3125 to support call chains (backtrace) in the stat profiler.
3126 * profiler.c, profiler-private.h: Likewise.
3128 2008-05-22 Mark Probst <mark.probst@gmail.com>
3130 * generic-sharing.c: Init generic class when a method of it is
3131 requested via a runtime generic context.
3133 2008-05-22 Zoltan Varga <vargaz@gmail.com>
3135 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
3137 * reflection.c (mono_type_get_object): Add a FIXME.
3139 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
3141 * class.c (mono_class_get_method_by_index): New helper function, returning an
3142 entry in the class->methods array.
3144 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3146 * class.c (mono_class_init): Only do the array optimization for szarrays.
3147 Avoid creating a generic vtable for generic instances as well.
3148 (mono_class_get_method_from_name_flags): Don't search in the metadata for
3151 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
3153 * loader.c (mono_get_method_constrained): Inflate the signature
3154 with class context. Fix #325283.
3156 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3158 * object.c (mono_class_create_runtime_vtable): Add a comment.
3160 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
3162 (setup_interface_offsets): Handle the case when this is called twice for arrays.
3163 (mono_class_setup_vtable_general): Add an assert.
3164 (mono_class_init): Avoid creating a generic vtable for arrays.
3166 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
3167 here, let mono_class_init () do that.
3169 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
3170 interfaces in mscorlib.
3172 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
3173 interfaces. Add some comments.
3174 (mono_class_init): Call mono_class_setup_methods () here since it is no
3175 longer called by mono_class_setup_vtable ().
3177 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
3178 not set in class->vtable.
3179 (mono_class_create_runtime_vtable): Reenable the disabled code.
3181 * object.c (mono_class_create_runtime_vtable): Disable the last change for
3182 now as it causes some test failures.
3184 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
3185 if using the vtable trampoline. Also remove some strange code which put the
3186 generic methods themselves into the vtable slots. Remove the AOT init_vtable
3187 stuff as it is no longer needed.
3189 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
3191 * pedump.c: Give make --verify all option check code as well.
3192 Using --verify code won't check for metadata now.
3194 2008-05-19 Martin Baulig <martin@ximian.com>
3196 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
3199 (_mono_debug_using_mono_debugger): New global variable; it's set
3200 directly by the debugger, so mono_debug_using_mono_debugger() also
3201 works after attaching.
3203 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
3205 * object.c (mono_class_create_runtime_vtable): Use memory barriers
3206 as we do double checked locking on MonoClass::runtime_info and
3207 MonoClassRuntimeInfo::domain_vtables.
3209 2008-05-18 Zoltan Varga <vargaz@gmail.com>
3211 * debug-helpers.c (print_field_value): Fix a warning.
3213 2008-05-16 Zoltan Varga <vargaz@gmail.com>
3215 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
3216 set in the AOT case.
3218 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
3220 * class.c (mono_class_setup_vtable_general): Use memory barriers
3221 as we do double checked locking on MonoClass::vtable.
3223 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
3225 * reflection.c (resolve_object): Inflate only if the generic context
3226 is not null. Fixes #389886.
3228 2008-05-15 Jonathan Chambers <joncham@gmail.com>
3230 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
3233 Code is contributed under MIT/X11 license.
3235 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
3237 * class.c: Revert unrelated change.
3239 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
3241 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
3242 a generic instantiation, use mono_class_from_mono_type instead of playing
3243 with MonoType directly.
3245 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
3247 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
3248 checks must ignore generic instantiations, so mono_class_has_parent is not
3249 suitable. Fixes #390128.
3251 2008-05-14 Zoltan Varga <vargaz@gmail.com>
3253 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
3254 it to avoid registering tokens during metadata generation. Fixes #390023.
3256 2008-05-14 Kornél Pál <kornelpal@gmail.com>
3258 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
3261 Contributed under MIT/X11 license.
3263 2008-05-14 Kornél Pál <kornelpal@gmail.com>
3265 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
3266 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
3267 to fixup the EXE image.
3268 (mono_cleanup): Use mono_close_exe_image.
3269 (mono_close_exe_image): New function.
3270 * image.c: Include "marshal.h".
3271 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
3272 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
3273 counting when the image is loaded outside of mono_image_open_full. Set status
3274 based on GetLastError.
3275 * coree.c: Include required headers. Add init_from_coree.
3276 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
3277 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
3278 (_CorExeMain): Set init_from_coree.
3279 (CorExitProcess): Only call ExitProcess for now.
3280 (CorBindToRuntimeEx): New stub implementation.
3281 (CorBindToRuntime): New function.
3282 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
3283 (MonoFixupExe): ILONLY executables require no fixups.
3284 (mono_set_act_ctx): New function to set activation context.
3285 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
3286 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
3287 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
3288 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
3290 * domain-internals.h: Add mono_close_exe_image.
3292 Contributed under MIT/X11 license.
3294 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
3296 * metadata.c (mono_metadata_compute_size): Correctly calculate field
3297 size for generic param and event tables. Fixes #388977.
3299 2008-05-13 Zoltan Varga <vargaz@gmail.com>
3301 * loader.c (mono_method_signature): Use memory barriers because of the double
3302 checked locking pattern.
3304 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
3305 aborting or aborted as well. Fixes #376391.
3307 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
3308 existing runtime state in the Suspend handler during shutdown.
3310 2008-05-12 Zoltan Varga <vargaz@gmail.com>
3312 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
3314 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
3315 which are starting up or shutting down.
3317 * threads.c (mono_threads_set_shutting_down): Don't return a value since
3318 this function never returns if the runtime is already shutting down.
3320 * icall.c (ves_icall_System_Environment_Exit): Update after
3321 mono_threads_set_shutting_down () signature change.
3323 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
3325 * class.c: Added can_access_instantiation to verify if the instantiation
3326 is visible. Fix access check for nested types as they returned TRUE
3327 before doing type and generic instantiation visibility checks.
3329 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
3331 * reflection.c (mono_reflection_create_generic_class): The created type
3332 must have a different container from its TypeBuilder. Otherwise they
3333 will end sharing generic arguments, which is wrong.
3335 Due to the sharing, making a generic instance of the created type using
3336 the TypeBuider generic arguments resulted in the generic type definition
3337 been returned, which is wrong as well.
3339 As a bonus the code was leaking the type_params array. This memory should
3340 be allocated from the image mempool.
3342 This fixes bug #354047.
3344 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
3346 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
3347 to here as they are now used in assembly.c new code.
3348 Added a skipverification flag to MonoAssembly.
3349 New internal function mono_assembly_has_skip_verification.
3351 * assembly.c: New function mono_assembly_has_skip_verification. It checks
3352 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
3355 2008-05-07 Zoltan Varga <vargaz@gmail.com>
3357 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
3358 needed. Fixes #387034.
3360 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
3362 2008-05-06 Miguel de Icaza <miguel@novell.com>
3364 * assembly.c (mono_assembly_load_reference): Prevent crash while
3365 disassembling Silverlight 2.0 executables while we still do not
3366 have GACed libraries.
3368 2008-05-07 Zoltan Varga <vargaz@gmail.com>
3370 * reflection.c: Special case generic type definitions as well. Fixes #383444.
3372 2008-05-06 Zoltan Varga <vargaz@gmail.com>
3374 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
3375 of the dynamic case. Fixes #387404.
3377 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3379 *verify.c (mono_verifier_is_class_full_trust): If under
3380 verify_all and the verifier mode was not set, only
3381 gac and corlib types are fulltrust. This makes --verify-all
3382 usable to detect unverifiable code, which is the expected
3385 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3387 * verify.h: Ops, commited the header with debug
3390 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3392 * verify.c (merge_stack): Use the new value on unverifiable
3395 * verify.c (verify_type_compatibility_full): Comparison
3396 of nullable types can't use mono_class_is_assignable_from.
3398 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
3399 that makes all verification errors be reported.
3401 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
3404 2008-05-05 Robert Jordan <robertj@gmx.net>
3406 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
3407 support for value types. See #386415.
3409 * object.c: comments.
3411 Code is contributed under MIT/X11 license.
3413 2008-05-05 Martin Baulig <martin@ximian.com>
3415 * debug-mono-symfile.h
3416 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
3417 for old pre-terrania symbol files.
3419 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3421 * mono-config.c: Add ppc64 architecture.
3423 Code is contributed under MIT/X11 license.
3425 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3427 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
3428 PPC64 uses function descriptors as well.
3430 Code is contributed under MIT/X11 license.
3432 2008-05-04 Zoltan Varga <vargaz@gmail.com>
3434 * object.c (compute_class_bitmap): Ignore literal static fields.
3436 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
3437 var has an invalid format.
3438 (describe_ptr): Add some sanity checks for the vtable.
3439 (add_nursery_frag): Clear unused nursery fragments.
3440 (major_collection): Clear all remaining nursery fragments.
3442 2008-05-03 Robert Jordan <robertj@gmx.net>
3444 * image.c, metadata-internals.h: add thunk_invoke_cache.
3446 * marshal.c, marshal.h: implement
3447 mono_marshal_get_thunk_invoke_wrapper ().
3449 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
3451 Code is contributed under MIT/X11 license.
3453 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
3455 * verify.c (do_leave): Empty the stack.
3457 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
3459 * class.c (mono_class_is_assignable_from): Variance
3460 doesn't work between reference and value types. For example,
3461 given type C<T+>, C<int32> is not assignable to C<object>.
3462 Break the argument checking loop on first error.
3464 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
3466 * icall.c : base64_to_byte_array() needs some more strict
3467 check for sequence of '=' characters. Patch by Santa
3468 Marta (http://deee.g.hatena.ne.jp/santamarta).
3470 Contributed under MIT/X11 license.
3471 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
3473 2008-05-02 Jonathan Chambers <joncham@gmail.com>
3475 * domain.c: Disable LoadLibrary support to fix Win32 build.
3477 Code is contributed under MIT/X11 license.
3479 2008-05-02 Zoltan Varga <vargaz@gmail.com>
3481 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
3482 to help with cache behaviour.
3484 2008-05-01 Miguel de Icaza <miguel@novell.com>
3486 * appdomain.c (mono_domain_from_appdomain): Add new accessor
3489 2008-05-01 Zoltan Varga <vargaz@gmail.com>
3491 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
3493 2008-05-01 Dick Porter <dick@ximian.com>
3495 * process.c (process_get_fileversion): Only pass 16 bits of
3496 language ID to VerLanguageName. Fixes bug 381204.
3498 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
3500 * verify.c (mono_method_verify): Fix the comparison
3501 operator for code bounds check.
3503 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
3505 * verify.c (mono_method_verify): Check the bounds of
3506 all access of the code array.
3508 2008-04-29 Kornél Pál <kornelpal@gmail.com>
3510 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
3512 2008-04-28 Zoltan Varga <vargaz@gmail.com>
3514 * image.c (mono_image_strong_name_position): Fix return value when the rva is
3517 2008-04-28 Kornél Pál <kornelpal@gmail.com>
3519 * loader.c (mono_get_method_from_token, mono_method_signature): Add
3520 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
3521 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
3522 fixup main EXE images when using mono.exe for mixed-mode assembly support.
3523 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
3525 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
3526 runtime initialization from metadata.
3527 * assembly.c: Remove obsolete ceGetModuleFileNameA.
3528 (mono_set_rootdir): Use mono_get_module_file_name.
3529 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
3531 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
3532 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
3533 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
3534 MonoCLIImageInfo. Add support for module handles.
3535 (load_cli_header): Update mono_cli_rva_image_map signature.
3536 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
3537 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
3538 (mono_image_rva_map): Add support for module handles.
3539 (mono_image_ensure_section_idx): Add support for module handles.
3540 (mono_image_close): Add support for module handles.
3541 (do_load_header): Add support for module handles.
3542 (mono_image_open_from_module_handle): New function for internal use.
3543 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
3544 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
3545 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
3547 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
3548 * image.h: Add mono_image_fixup_vtable.
3549 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
3551 * coree.h: New file.
3552 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
3553 unsupported native code.
3554 (mono_marshal_set_callconv_from_modopt): New function splitted from
3555 mono_marshal_get_managed_wrapper.
3556 (mono_marshal_get_managed_wrapper): Use
3557 mono_marshal_set_callconv_from_modopt.
3558 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
3559 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
3560 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
3561 that results in a deadlock when the runtime is loaded in _CorDllMain.
3562 * Makefile.am: Add coree.c and coree.h.
3564 Contributed under MIT/X11 license.
3566 2008-04-28 Mark Probst <mark.probst@gmail.com>
3568 * generic-sharing.c: Search for type arguments in array element
3571 2008-04-28 Mark Probst <mark.probst@gmail.com>
3573 * class-internals.h, generic-sharing.c: New, small runtime generic context.
3575 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
3577 * object.c: Don't setup the RGCTX when the vtable is created,
3578 because we're setting it up lazily now.
3580 2008-04-26 Zoltan Varga <vargaz@gmail.com>
3582 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
3585 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
3587 * verify.c (verify_class_for_overlapping_reference_fields):
3588 If class is under fulltrust allow reference types to overllap
3589 if they have the same RVA.
3591 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
3593 * pedump.c: Added new flag valid-only, that makes the verifier
3594 behaves just like --security=validil. It won't fail type load
3595 due to unverifiable restrictions.
3597 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3599 * class-internals.h (struct MonoMethod): Added a verification_success
3600 field to cache verifier executions. Reduced MonoMethod:slot size by
3603 2008-04-23 Zoltan Varga <vargaz@gmail.com>
3605 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
3606 instead of a 'vt' argument to save an indirection and to allow these to be used
3608 (scan_vtype): New helper function to scan an area using a gc descriptor.
3609 (mono_gc_wbarrier_value_copy): Implement this.
3610 (handle_remset): Add support for REMSET_VTYPE.
3611 (find_in_remset_loc): Ditto.
3612 (mono_gc_base_init): Allow some debugging options to be controlled through the
3613 use of the MONO_GC_DEBUG env variable.
3614 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
3615 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
3617 2008-04-23 Martin Baulig <martin@ximian.com>
3619 * domain.c (mono_domain_create): Move the call to
3620 mono_debug_domain_create() down, after allocating the domain id.
3622 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3624 verify.c (verify_class_for_overlapping_reference_fields): Skip
3625 static fields while verifying for overlapping fields as they
3626 don't matter at all.
3628 2008-04-23 Marek Habersack <mhabersack@novell.com>
3630 * domain-internals.h: added a declaration of
3631 mono_make_shadow_copy.
3633 * assembly.c (mono_assembly_open_full): shadow copying of
3634 assemblies moved to here, so that all the assemblies within the
3635 application domain's private binary directories can be
3636 processed. Fixes bug #380546
3638 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
3639 mono_make_shadow_copy and made non-static. The decision whether
3640 to shadow-copy an assembly is made based on its location - it's
3641 copied if it's in one of the private application domain binary
3642 directories and its different to the target file in the shadow
3643 directory. Fixes bug #380546
3645 2008-04-22 Zoltan Varga <vargaz@gmail.com>
3647 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
3649 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
3652 * reflection.c (mono_image_create_token): Handle
3653 Method/ConstructorOnTypeBuilderInst.
3654 (resolve_object): Ditto.
3655 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
3656 so it can be called from resolve_object. Also handle the case when the inflated
3657 class already has its methods setup.
3659 2008-04-21 Martin Baulig <martin@ximian.com>
3661 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
3663 2008-04-20 Geoff Norton <gnorton@novell.com>
3665 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
3666 pointer dereference.
3668 2008-04-15 Marek Habersack <mhabersack@novell.com>
3670 * appdomain.c (try_load_from): if IOMAP is in effect, call the
3671 portability API to look up the assembly file. Fixes behavior in
3672 situations when the application has a bin/ directory, but the
3673 assembly search patch refers to Bin/ (and thus the requested file
3674 name is Bin/SomeLibrary.dll). Fixes bug #379888
3676 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3678 verify.c (mono_type_is_generic_argument): Extracted this check
3679 from a dozen places to here.
3681 verify.c: Fixed all issues related to boxing generic arguments
3682 and their constraints.
3684 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3686 verify.c (mono_class_interface_implements_interface): Fix win32 build.
3688 2008-04-14 Zoltan Varga <vargaz@gmail.com>
3690 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
3691 isn't finished yet. Fixes #363447.
3693 2008-04-13 Zoltan Varga <vargaz@gmail.com>
3695 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
3698 2008-04-13 Jb Evain <jbevain@novell.com>
3700 * domain.c: update the 2.1 profile versions.
3701 Merged from the Moonlight 2 branch.
3703 2008-04-12 Zoltan Varga <vargaz@gmail.com>
3705 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
3706 mscorlibs for the non-refonly case as well.
3708 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
3709 in mono_assembly_load_from_full (). Fixes #378924.
3711 2008-04-11 Geoff Norton <gnorton@novell.com>
3713 * icall.c: The global extern environ doesn't exist on Mac. We
3714 need to call NSGetEnviron instead.
3716 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3718 verify.c: Add generic method constraint verification.
3720 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3722 class.c (mono_class_inflate_generic_method_full): Add a long
3723 explanation to the is_mb_open hack. Remove the FIXME.
3725 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3727 * verify.c (mono_method_verify): Mark all unknown opcodes
3728 as invalid. Mark jmp as unverifiable.
3730 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3732 * verify.c: Add code to do type constraint verification on class instances.
3734 * verify.c (mono_verifier_verify_class): Use the type constraint
3737 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3739 * class.c (mono_class_get_field_default_value): Don't pass cindex
3740 as hint to mono_metadata_get_constant_index. The local is not initialized
3741 and should contain garbage most of the time. This could only work
3744 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
3746 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
3748 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
3750 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
3752 * class.c (mono_class_from_generic_parameter): Save the token of the
3753 generic param in MonoClass::sizes.generic_param_token.
3755 * reflection.c (mono_custom_attrs_from_class): If the class type is
3756 VAR or MVAR retrieve the attributes of the generic param.
3758 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3760 * class.c (mono_class_init): Do class verification if the verifier
3763 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3765 * verify-internal.h: Added mono_verifier_verify_class.
3767 * verify.c: Added mono_verifier_verify_class. It checks for
3768 classes with explicit layout that have overlapping reference fields.
3770 * pedump.c: Init the verifier state prior to verification. Fixed
3771 command line arguments.
3773 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3775 * Makefile.am: Added verify-internals.h, hopefully fix the build.
3777 2008-04-08 Zoltan Varga <vargaz@gmail.com>
3779 * verify-internals.h: Fix a warning.
3781 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3783 * verify-internals.h: New header with the verifier configuration
3784 extracted from mini.c.
3786 * verify.c: Implemented the new functions exported by verify-internals.h.
3788 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3790 * verify.c: Add proper verification of ckfinite.
3792 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
3794 * verify.c (do_conversion): Improved error message to something
3797 * verify.c (check_is_valid_type_for_field_ops): Fix to work
3798 with primitive types.
3800 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
3802 * verify.c: Added tail prefix checking. Marked icall
3805 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
3807 * verify.c: Fix the detection of branches to the middle
3810 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
3812 * verify.c: Implemented verification of volatile. and
3813 unaligned. prefix. Check if a type is valid after retrieving it.
3815 2008-04-01 Dick Porter <dick@ximian.com>
3817 * process.c (process_get_fileversion): If there's no string block,
3818 set the file language to en_US. Fixes the other new part of bug
3821 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
3823 * class.c: New functions mono_method_can_access_field_full and
3824 mono_method_can_access_method_full. They perform type visibility
3825 and type site check.
3827 * class-internal.h: Added exported functions.
3829 * verify.c: Use new functions to implement proper visibility checks.
3831 2008-03-29 Zoltan Varga <vargaz@gmail.com>
3833 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
3835 2008-03-28 Dick Porter <dick@ximian.com>
3837 * process.c (process_get_fileversion): Use the first language ID
3838 we see, rather than insisting on an invariant language. Fixes bug
3841 2008-03-28 Zoltan Varga <vargaz@gmail.com>
3843 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
3844 the streams to fix reading of invalid memory later.
3846 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
3849 2008-03-26 Zoltan Varga <vargaz@gmail.com>
3851 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
3852 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
3854 2008-03-26 Massimiliano Mantione <massi@ximian.com>
3855 * threads.h: Added MonoThreadManageCallback type and
3856 mono_thread_set_manage_callback prototype
3857 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
3858 (used to store the mono_thread_manage callback).
3859 * threads.c: Added mono_thread_set_manage_callback, and handle
3860 "MonoThread->manage_callback" in build_wait_tids.
3862 2008-03-26 Dick Porter <dick@ximian.com>
3864 * process.c (process_get_fileversion): Set FileVersionInfo strings
3865 to Empty when the resource doesn't have the particular info.
3868 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
3870 * verify.c (mono_method_verify): Proper prefix validation.
3872 2008-03-25 Zoltan Varga <vargaz@gmail.com>
3874 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
3875 itself in a separate argument instead of throwing them. Fixes #373448.
3877 * appdomain.c: Bump corlib version.
3879 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3881 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
3883 2008-03-20 Kornél Pál <kornelpal@gmail.com>
3885 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
3888 2008-03-20 Mark Probst <mark.probst@gmail.com>
3890 * generic-sharing.c, class-internals.h: Code for putting
3891 reflection types into the runtime generic context.
3893 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3895 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
3899 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
3901 * verify.c (VerifyContext): Added instruction prefix data to the struct.
3903 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
3905 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
3907 * verify.c (do_cast): Let the result value keep the boxed status.
3909 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
3911 2008-03-17 Jb Evain <jbevain@novell.com>
3913 * reflection.c: when running on a 2.0 runtime, emit
3914 unconditionally the #~ header version as 2.0, and the
3915 CLI header version as 2.5, for symmetry's sake with csc.
3917 2008-03-16 Zoltan Varga <vargaz@gmail.com>
3919 * class.c: Remove the unused cache_interface_offsets stuff.
3921 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
3922 profiler.c: Fix warnings.
3924 2008-03-16 Mark Probst <mark.probst@gmail.com>
3926 * generic-sharing.c, class-internals.h: Support for putting
3927 methods into the runtime generic context.
3929 2008-03-16 Zoltan Varga <vargaz@gmail.com>
3931 * class.c (mono_class_setup_fields): Ignore calls made to this function for
3932 classes which are generic instances of not-yet finished typebuilders. Fixes
3935 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
3937 2008-03-15 Zoltan Varga <vargaz@gmail.com>
3939 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
3941 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
3942 field, replace it with a hash table in MonoDynamicImage.
3944 * reflection.c (inflate_mono_method): Access the generic definition object from
3945 image->generic_def_objects instead of imethod->reflection_info.
3947 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
3949 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
3951 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
3952 function in reflection.c so it is easier to keep in sync with the dynamic image
3955 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
3956 mono_image_close ().
3958 2008-03-15 Mark Probst <mark.probst@gmail.com>
3960 * class.c (mono_class_generic_sharing_enabled): Disable generic
3961 sharing for all architectures except AMD64 and x86 to fix build.
3963 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
3965 * verify.c: Use the generic definition MonoGenericContext when available.
3966 Remove code for checking generics instance compatibility in favor of
3967 mono_class_is_assignable_from.
3969 2008-03-14 Mark Probst <mark.probst@gmail.com>
3971 * marshal.c, marshal.h, metadata-internals.h, image.c,
3972 wrapper-types.h: New wrapper for invoking a shared static method
3973 without having to pass the runtime generic context argument.
3975 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
3977 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
3979 2008-03-14 Zoltan Varga <vargaz@gmail.com>
3981 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
3983 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
3984 create a token from a FieldOnTypeBuilderInst.
3985 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
3986 (resolve_object): Ditto.
3988 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
3989 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
3991 2008-03-14 Martin Baulig <martin@ximian.com>
3993 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
3995 * debug-mono-symfile.h
3996 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
3997 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
3999 2008-03-10 Martin Baulig <martin@ximian.com>
4001 * debug-mono-symfile.h
4002 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
4003 `lexical_block_table_offset'.
4004 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
4006 (MonoSymbolFile): Added `version'.
4009 (MonoDebugLexicalBlockEntry): Removed.
4010 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
4013 * mono-debug.c (mono_debug_add_method): Don't compute lexical
4014 blocks here; the debugger now does this internally.
4016 2008-02-27 Martin Baulig <martin@ximian.com>
4018 * object.c (mono_runtime_exec_main): Call
4019 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
4020 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
4022 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
4024 * verify.c (verify_type_compatibility_full): Allow native int to be converted
4025 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
4027 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
4029 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
4030 ldftn with a virtual method.
4032 2008-03-13 Geoff Norton <gnorton@novell.com>
4034 * decimal.c: Only include memory.h if the platform has it.
4036 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
4038 * assembly.c, class.c, metadata-internals.h: make sure public key
4039 tokesns are compared in a case-insensitive way. Also, all
4040 the lookups in the GAC use a lowercase public key token
4041 (gaacutil already does the lowercasing on install). Fixes
4044 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
4046 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
4049 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
4051 * image.c: when someone loads a mscorlib from a file, return the
4052 currently loaded mscorlib (fixes bug #369253).
4054 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
4056 * class.c: handle types with no parents by forcing them to have
4057 System.Object as a parent and marking them as broken (this currently
4058 allows the first part of bug #369173 to work as well, likely because
4059 we don't check for typeload exceptions everywhere yet).
4061 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
4063 * class.c: more complete check that types belong to corlib
4064 (fixes second part of bug #369173).
4066 2007-03-10 Bill Holmes <billholmes54@gmail.com>
4068 * generic-sharing.c: Including glib.h for the MSVC builds to define
4069 "inline" to "__inline" before including mono-membar.h.
4071 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
4072 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
4075 Contributed under MIT/X11 license.
4077 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
4079 * verify.c (do_invoke_method): Remove return type validation.
4081 * verify.c (do_ret): Do return type validation at return site instead of
4084 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
4086 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
4088 * verify.c: Some todos cleaned and improved a few error messages.
4090 2008-03-08 Zoltan Varga <vargaz@gmail.com>
4092 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
4094 2008-03-07 Zoltan Varga <vargaz@gmail.com>
4096 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
4097 system types correctly.
4099 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
4102 2008-03-06 Zoltan Varga <vargaz@gmail.com>
4104 * assembly.c (build_assembly_name): Fix a warning.
4106 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
4108 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
4109 the called function takes an object type argument. Fixes storing or
4110 valuetypes across remoting as well as reducing memory usage.
4111 * image.c, metadata-internals.h: remove now unused ldfld_remote and
4112 stfld_remote wrapper caches.
4114 2008-03-06 Zoltan Varga <vargaz@gmail.com>
4116 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
4119 * reflection.c (mono_image_register_token): New helper function to save
4120 a token->object mapping.
4122 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
4125 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
4126 one dimension arrays. Fixes #367670.
4127 (mono_reflection_get_type_internal): Ditto.
4129 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4131 * marshal.c: mono_load_remote_field_new() always returns object.
4132 so use the proper signature (fixes bug #366445).
4134 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4136 * class-internals.h (MonoMethod): Remove unused uses_this flag,
4137 add an 'inline_failure' flag instead.
4139 2008-03-04 Mark Probst <mark.probst@gmail.com>
4141 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
4142 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
4143 contains the location of "this", used for exception handling.
4145 2008-03-04 Zoltan Varga <vargaz@gmail.com>
4147 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
4148 their size on all platforms for perf reasons.
4150 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4152 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
4155 * object-internal.h: Same.
4157 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4159 * reflection.h: Fix the build I just broke.
4161 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4163 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
4164 Test if a token is valid, this remove explicit usage of
4165 MonoDynamicImage::tokens from the verifier code.
4167 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
4169 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
4170 instead of direct access to MonoDynamicImage::tokens.
4172 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4174 * verify.c (token_bounds_check): Fix the build I just broke.
4176 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
4178 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
4180 * verify.c (verifier_load_method): Fixed the errors message.
4182 * verify.c (mono_method_verify): Fixed a debug message.
4184 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
4186 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
4187 mono-perfcounters.h, class-internals.h: support for predefined
4188 writable counters, query of categories and counters, bugfixes.
4190 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
4192 * verify.c (do_refanytype): Verify the refanytype opcode.
4194 * verify.c (mono_method_verify): Use do_refanytype.
4196 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
4198 * verify.c (do_mkrefany): Verify the mkrefany opcode.
4200 * verify.c (mono_method_verify): Use do_mkrefany.
4202 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
4204 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
4205 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
4208 2008-02-27 Zoltan Varga <vargaz@gmail.com>
4210 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
4211 the type load exception.
4213 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
4215 * verify.c: Added a few FIXME for method signatures
4217 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
4218 of mono_method_get_signature and get vararg call working. Removed unused
4219 checks for return value.
4221 * verify.c (do_refanyval): Verify the refanyval opcode.
4223 * verify.c (mono_method_verify): Implemented verification of arglist and
4226 2008-02-27 Zoltan Varga <vargaz@gmail.com>
4228 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
4229 vtypes to marshal.c.
4231 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
4232 it works for AOT as well.
4234 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
4236 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
4237 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
4238 the system time is adjusted.
4240 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
4242 * icall.c, icall-def.h: use the new time functions (fixes the
4243 non-monotonic behaviour of TickCount).
4245 2008-02-26 Zoltan Varga <vargaz@gmail.com>
4247 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
4248 it breaks the build.
4250 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
4251 cattr is not finished yet.
4253 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
4255 * verify.c: Proper token validation for field, method and type.
4257 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
4259 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
4261 * loader.c (method_from_memberref): Generate type load error instead of method missing
4262 if the type is not found.
4264 2008-02-23 Zoltan Varga <vargaz@gmail.com>
4266 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
4267 some of the conversions caused the generation of a marshal directive exception.
4269 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
4271 verify.c: Report which exception should be thrown by the JIT.
4272 Added a lot of FIXME notes.
4274 2008-02-22 Mark Probst <mark.probst@gmail.com>
4276 * generic-sharing.c: Runtime generic context slots are not
4277 instantiated on init anymore. Instead, provide function to do the
4278 instantiating on demand.
4280 * class-internals.h: Added vtable to runtime generic context.
4281 Macros for encoding direct and indirect slot offsets in one
4284 2008-02-21 Mark Probst <mark.probst@gmail.com>
4286 * object.c, generic-sharing.c: Moved some generic sharing code
4287 from object.c to generic-sharing.c.
4289 * generic-sharing.c: Added support for extensible runtime generic
4292 * metadata-internals.h: Two new hash tables in MonoImage for
4293 extensible runtime generic context support.
4295 * domain.c: Unregister generic vtables upon domain unloading.
4297 * image.c: Destroy new hash tables upon image unloading.
4299 * metadata.c: Unregister generic subclasses upon image unloading.
4301 * class-internals.h: New data structure for runtime generic
4302 context template. New fields in the runtime generic context for
4305 * Makefile.am: Added generic-sharing.c.
4307 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
4309 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
4310 there is a pending loader exception, raise it.
4312 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
4315 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
4320 2008-02-20 Zoltan Varga <vargaz@gmail.com>
4322 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
4324 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
4326 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
4327 ref-only requests for compatibility with MS.
4329 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
4331 * reflection.c (mono_custom_attrs_from_method): Don't silently
4332 return an empty list for generic method instances.
4333 (mono_custom_attrs_from_param): Likewise.
4335 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
4336 Raja R Harinath <harinath@hurrynot.org>
4339 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
4340 * class.c (mono_class_inflate_generic_method_full): Initialize it
4341 when a fully-open method is instantiated.
4342 * metadata.c (inflated_method_equal, inflated_method_hash): Update
4344 * reflection.c (inflate_mono_method): Don't create a temporary context.
4346 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
4348 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
4349 Compute correct value, to prepare for imethod->reflection_info going away.
4351 2008-02-19 Zoltan Varga <vargaz@gmail.com>
4353 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
4355 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
4357 * verify.c: Implement skip visibility flag.
4359 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
4361 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
4362 which contains an extra field to tell the kind of exception that should be thrown.
4364 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
4366 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
4368 * loader.c (mono_method_get_param_names): Initialize 'klass' after
4369 'method' is updated.
4371 2008-02-11 Zoltan Varga <vargaz@gmail.com>
4373 * class.c (mono_class_layout_fields): Set class->min_align for classes using
4374 explicit layout as well. Fixes #360375.
4376 2008-02-11 Geoff Norton <gnorton@novell.com>
4378 * loader.c: Guard and dereference against inflated generic methods
4380 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
4382 * class.c: Include Retargetable spec in assembly name.
4383 * assembly.c: Always include PublicKeyToken spec in assembly name
4384 (with value "null" if assembly is not signed), and include
4386 * icall-def.h: Added icall for Assembly.get_fullname.
4387 * icall.c: Added icall returning the fullname of an assembly.
4389 2008-02-09 Zoltan Varga <vargaz@gmail.com>
4391 * class.c (mono_class_setup_vtable_general): Add a missing call to
4392 mono_class_setup_methods () which is needed in the AOT case.
4394 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
4396 * verify.c (mono_type_get_stack_name): Added. Return the name for the
4397 stack type of the given MonoType.
4399 * verify.c (verify_type_compatibility_full): Handle the void type.
4401 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
4402 way stack merging works.
4404 * verify.c (store_local): Improved verification message.
4406 * verify.c (do_branch_op): If the merging is invalid, the method
4407 is unverifiable and not invalid. Improved error message.
4409 * verify.c (merge_stacks): Properly merge a boxed valuetype and
4410 a reference type diferent than System.Object. Improved error
4413 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
4415 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
4417 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
4418 type of an enum even if the argument is byref.
4420 * verify.c: Replace all explicit uses of enumtype and enum_basetype
4421 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
4423 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
4425 *verify.c (verify_type_compatibility_full): Make enum types
4426 compatible with their base types.
4428 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
4429 types are compatible for the special case of a boxed valuetype and
4432 * verify.c (verify_stack_type_compatibility): The function
4433 is_compatible_boxed_valuetype was extracted from here.
4435 * verify.c (push_arg): Only set ctx->has_this_store if the method
4438 * verify.c (do_ldelem): Fixed a typo in an error message and added
4439 strict check for mixing int32 and native int as the array type
4442 * verify.c (merge_stacks): Consider boxed valuetypes in the
4443 compatibility checks.
4445 2008-02-07 Massimiliano Mantione <massi@ximian.com>
4446 * profiler.h: (MonoGCEvent): Added start-stop the world events.
4448 2008-02-06 Massimiliano Mantione <massi@ximian.com>
4449 *class.c: use_new_interface_vtable_code: renamed the env var to have
4450 a "MONO_" prefix, and fix the logic to enable it by default.
4452 2008-02-06 Massimiliano Mantione <massi@ximian.com>
4454 mono_class_setup_vtable_general: rewrote the way in which interface
4455 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
4456 makes the code more maintainable.
4457 For now the old code is still there, and can be activated setting
4458 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
4460 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
4462 * verify.c: guarded some debug functions around and #ifdef.
4464 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
4466 2008-02-06 Zoltan Varga <vargaz@gmail.com>
4468 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
4469 changes for now since they seem to break too many things.
4471 2008-02-05 Mark Probst <mark.probst@gmail.com>
4473 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
4474 mono_marshal_find_nonzero_bit_offset): Added macro and function
4475 for finding the byte- and bit-offset of a bitfield within a
4478 2008-02-05 Zoltan Varga <vargaz@gmail.com>
4480 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
4481 (mono_marshal_get_struct_to_ptr): Ditto.
4483 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
4486 2008-02-03 Zoltan Varga <vargaz@gmail.com>
4488 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
4489 between methods for non-corlib types.
4491 2008-02-02 Geoff Norton <gnorton@novell.com>
4493 * loader.c (mono_method_get_param_names): Populate the parameter name for
4494 generic parameters as well. (Fixes #342536)
4496 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
4498 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
4500 * verify.c (do_invoke_method): Fix for calling with byref structs.
4502 * verify.c (do_cast): push a boxed value type based on the type token and not
4505 2008-01-31 William Holmes <billholmes54@gmail.com>
4507 * process.c (process_module_string_read): Check the size returned form
4508 VerQueryValue to avoid out of memory exception.
4510 2008-01-30 Zoltan Varga <vargaz@gmail.com>
4512 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
4513 Handle properly modules which are not in the moduleref table. Fixes
4516 2008-01-29 Zoltan Varga <vargaz@gmail.com>
4518 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
4519 the dynamic case which is now in managed code.
4520 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
4522 * marshal.c (mono_string_to_bstr): Fix a warning.
4523 (init_com_provider_ms): Ditto.
4525 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
4527 * exception.c (mono_get_exception_out_of_memory): New helper function.
4529 2008-01-28 Jonathan Chambers <joncham@gmail.com>
4531 * marshal.c: Add support for BSTR marshalling
4532 using other COM systems.
4534 Code is contributed under MIT/X11 license.
4536 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
4538 * object.c (mono_runtime_invoke_array): reverted previous
4539 commit as it breaks the build.
4541 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
4543 * object.c (mono_runtime_invoke_array): Verify arguments for
4544 invalid types. Fixes #348522.
4546 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
4548 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
4549 non-final virtual calls using call.
4551 * verify.c (do_invoke): fixed some TODOs.
4553 * verify.c (push_arg): set has_this_store for "ldarga 0".
4555 2008-01-27 Zoltan Varga <vargaz@gmail.com>
4557 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
4558 which belong to an inflated class. Fixes #356531.
4560 2008-01-26 Robert Jordan <robertj@gmx.net>
4562 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
4563 which resort to FindFirstFile when a certain error condition
4564 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
4565 Code is contributed under MIT/X11 license.
4567 2008-01-24 Jonathan Chambers <joncham@gmail.com>
4569 * marshal.c (emit_marshal_string): Fix out string marshalling
4570 to use specified encoding. Fixes #323900.
4572 Code is contributed under MIT/X11 license.
4574 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
4576 * class.c (mono_class_inflate_generic_method_full): Don't modify
4577 iresult->context after cache check.
4579 2008-01-23 Zoltan Varga <vargaz@gmail.com>
4581 * class.c (mono_class_inflate_generic_method_full): Change the
4582 struct assignments to memcpy for better visibility and add some comments.
4584 2008-01-23 Dick Porter <dick@ximian.com>
4586 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
4587 procedure, and make it work on windows.
4589 2008-01-22 Zoltan Varga <vargaz@gmail.com>
4591 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
4592 a MonoReflectionTypeBuilder since it is always of that type.
4594 * reflection.c (mono_type_get_object): Remove an unneccesary check.
4596 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
4598 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
4600 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
4602 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
4604 * reflection.c (mono_reflection_create_runtime_class): Remove already created
4605 instantiations from the type cache.
4607 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4609 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
4611 * verify.c (do_unbox_value): push a controled mutability managed pointer.
4613 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4615 * verify.c (do_ldstr): added, verifies if the #US token is valid.
4617 * verify.c (mono_method_verify): removed old TODO
4619 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4621 * verify.c (do_newobj): add visibility check.
4623 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
4625 * verify.c (do_load_function_ptr): add visibility check.
4627 2008-01-21 Massimiliano Mantione <massi@ximian.com>
4629 mono_generic_class_get_class: hook profiler events.
4630 mono_field_get_offset: added to support heap-shot in the new profiler.
4631 *class.h: exported mono_field_get_offset.
4633 mono_reflection_setup_internal_class: hook profiler events.
4635 2008-01-20 Zoltan Varga <vargaz@gmail.com>
4637 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
4638 argument here too and use it to avoid checking for pending exceptions if
4641 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
4643 * assembly.c (build_assembly_name): add arg for passing the assembly
4644 flags. Do not consider a PublicKey with value "null" valid.
4645 (mono_assembly_name_parse_full): added boolean argument that will be
4646 set if the assembly name contains a PublicKeyToken spec. Added support
4647 for the Retargetable spec for which only Yes or No are allowed as valid
4648 value. Consider assembly name invalid if Retargetable spec is set, but
4649 either version, culture or public key (token) are not specified.
4650 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
4651 with implementation in assembly.c.
4652 * icall.c (fill_reflection_assembly_name): also copy assembly flags
4653 from MonoAssemblyName.
4654 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
4655 introduced argument for mono_assembly_name_parse_full to know if the
4656 assembly name has a PublicKeyToken spec, and if it has instruct
4657 fill_reflection_assembly_name to use default value for keyToken (if
4658 PublicKeyToken is null).
4660 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
4662 * verify.c (mono_method_verify): fixed ovf ops with
4663 float values. They are unverifiable now.
4665 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
4667 * class.c (set_failure_from_loader_error): add BadImageException to the
4668 list of exceptions that can cause a type to fail to load.
4670 * class.c (mono_class_get_exception_for_failure): same.
4672 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
4674 * verify.c (in_any_exception_block): added, check if offset
4675 is part of any exception handling clause.
4677 * verify.c (get_stack_type): added VAR and MVAR types.
4679 * verify.c (do_stobj): better error messages.
4681 * verify.c (do_cpobj): added, check cpobj.
4683 * verify.c (do_initobj): added, check initobj.
4685 * verify.c (do_sizeof): added, check sizeof.
4687 * verify.c (do_localloc): added, check localloc.
4689 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
4691 2008-01-17 Zoltan Varga <vargaz@gmail.com>
4693 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
4694 save_lmf/restore_lmf opcodes.
4696 * threads.c (mono_threads_install_notify_pending_exc): New function to
4697 install a callback notifying the JIT there is a pending exception on a thread.
4698 (mono_thread_request_interruption): Call the new callback.
4699 (mono_thread_get_and_clear_pending_exception): New function to return the
4700 exception pending on a thread.
4702 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
4703 to turn off checking for pending exceptions.
4704 (mono_marshal_get_native_wrapper): Ditto.
4706 2008-01-16 Zoltan Varga <vargaz@gmail.com>
4708 * threads-types.h: Get rid of the unnecessary extern declarations.
4710 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
4712 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
4713 return field from parent class if not private.
4714 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
4715 returns fields from parent class if they are not private.
4716 (method_nonpublic): added function to determine if a given method
4717 should be considered non-public. Returns false for private methods
4718 on parent class, and internal methods from parent on the 1.0 profile.
4719 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
4720 use method_nonpublic function to determine whether method should be
4722 (property_accessor_public): use newly introduced method_nonpublic
4723 function to determine whether accessor is non-public.
4724 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
4725 event from parent class if not private. Only return static event if
4726 Static flag is set, and only return static event from parent class if
4727 FlattenHierarchy flag is set.
4728 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
4729 include non-private events from parent class.
4731 2008-01-16 Zoltan Varga <vargaz@gmail.com>
4733 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
4736 2008-01-16 Wade Berrier <wberrier@novell.com>
4738 * security.c: Add assembly.h header to appease some warnings
4740 2008-01-16 Dick Porter <dick@ximian.com>
4742 * process.c (process_module_string_read): Remove trailing null
4745 2008-01-16 Mark Probst <mark.probst@gmail.com>
4747 * class-internals.h: A new data structure describing the layout of
4748 a runtime generic context (MonoRuntimeGenericContextTemplate).
4750 * metadata-internals.h: Added a hash table to MonoDomain that maps
4751 from open generic classes to their runtime generic context
4754 * object.c: Building of the runtime generic context, including
4755 proper handling of generic type arguments of superclasses.
4756 Building of the runtime generic context according to the template.
4758 2008-01-15 Zoltan Varga <vargaz@gmail.com>
4760 * class.c (mono_class_setup_fields): Set field.count for generic instances.
4763 * image.c (do_mono_image_open): Pass TRUE as last_exists to
4764 mono_portability_find_file (). Fixes #325466.
4765 (mono_image_get_public_key): Fix a warning.
4767 2008-01-14 Zoltan Varga <vargaz@gmail.com>
4769 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
4771 (mono_class_from_name_case): Ditto.
4773 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
4775 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
4776 common storage for the tables used in the System/NumberFormatter class.
4778 2008-01-13 Zoltan Varga <vargaz@gmail.com>
4780 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
4782 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
4784 * verify.c (get_boxable_mono_type): check if the token is valid.
4786 * verify.c (set_stack_value): changed to add an error if an
4787 invalid type is set on stack. Changed all callers due to signature change.
4789 * verify.c (do_stobj): implement stobj validation.
4791 2008-01-11 Zoltan Varga <vargaz@gmail.com>
4793 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
4794 set container->is_method, it was set earlier.
4796 * metadata.c (type_in_image): Handle MVARs which belong to not finished
4799 * reflection.c (mono_reflection_initialize_generic_parameter): Set
4800 is_method of the generic container to TRUE for methods.
4802 2008-01-10 Zoltan Varga <vargaz@gmail.com>
4804 * metadata.c (type_in_image): Handle type parameters properly.
4806 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
4807 memory ownership of this structure.
4809 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
4811 * verify.c (get_boxable_mono_type): make typedref types been just
4812 unverifiable. check for void type.
4814 * verify.c (do_unbox_any): added, verify opcode unbox.any.
4816 * verify.c (do_load_function_ptr): accept method spec tokens.
4818 2008-01-10 Zoltan Varga <vargaz@gmail.com>
4820 * marshal.c (mono_class_native_size): Always set *align even if this is called
4823 2008-01-09 Zoltan Varga <vargaz@gmail.com>
4825 * verify.c (mono_verify_corlib): Remove this as it was not used and was
4828 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
4830 * verify.c: removed some old unused tables. A huge bunch of small fixes
4831 to things found while testing the verifier with mono basic.
4833 * verify.c (dump_stack_value): dump null literal flag to.
4835 * verify.c (verify_type_compatibility_full): fix comparison
4836 for types that have a generic super type.
4838 * verify.c (verify_stack_type_compatibility): fix compatibility
4839 between null literals and reference types. fix compatibility between
4840 boxed valuetypes and object. fix corner case test for enums.
4842 * verify.c (do_cmp_op): proper verification of cgt.un in case
4845 * verify.c (do_invoke_method): fix error message.
4847 * verify.c (do_store_indirect
4849 * verify.c (check_is_valid_type_for_field_ops): proper verification
4850 of managed pointers to valuetypes and boxed valuetypes. proper verification
4853 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
4854 allow token to be a reference type.
4856 * verify.c (do_cast): proper handling of boxes valuetypes.
4858 * verify.c (do_stelem): proper handling of storing a boxed valuetype
4861 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
4862 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
4863 fixed the decoding of unbox_any
4865 2008-01-08 Zoltan Varga <vargaz@gmail.com>
4867 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
4869 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
4871 * verify.c (do_newobj): do delegate verification.
4873 * verify.c (verify_delegate_compatibility): perform delegate
4876 * verify.c (verify_ldftn_delegate): perform tests related to
4879 * verify.c (mono_delegate_signature_equal): perform the
4880 slightly diferent signature comparison required by delegates.
4882 * metadata.c (mono_metadata_type_equal_full): added and exported
4883 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
4884 allows signature only comparison.
4886 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
4889 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
4891 * verify.c: added a bunch of stack_slot_* functions to
4892 make access to stack slot type easier. This is required to
4893 allow optional flags, like null literal, boxed value and
4895 All access paths to IlStackDesc::stype have been changed
4896 to use these new funcions.
4897 Removed a bunch of unused functions and cleared all warnings.
4898 This patch introduces the usage of the this pointer and
4901 2008-01-07 Zoltan Varga <vargaz@gmail.com>
4903 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
4905 2008-01-06 Zoltan Varga <vargaz@gmail.com>
4907 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
4908 match managed version.
4910 * appdomain.c: Bump corlib version.
4912 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
4915 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
4917 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
4918 Set public key token to zero-length byte array if assembly is not
4921 2008-01-05 Zoltan Varga <vargaz@gmail.com>
4923 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
4924 writing a vtype array elem.
4926 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
4928 * assembly.c (build_assembly_name): return FALSE if length of token is
4929 not 16 (if not "null").
4930 (mono_assembly_name_parse_full): return FALSE if value of version,
4931 culture, token or key is 0.
4932 * icall.c (fill_reflection_assembly_name): add boolean arguments to
4933 specify whether public key and public key token must be set to default
4934 value (zero-length byte array) if not available. Set versioncompat to
4935 SameMachine. If public key is available or the default is set, then
4937 (ves_icall_System_Reflection_Assembly_FillName): if no public key
4938 is available, use empty byte array as default value. On the 2.0
4939 profile, use default value for public key token if not set.
4940 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
4941 profile, use default value for public key if not set. On the 2.0
4942 profile, use default value for public key token if not set.
4943 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
4944 default values for public key and public key token.
4946 2008-01-05 Zoltan Varga <vargaz@gmail.com>
4948 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
4949 field to keep it in synch with the managed object.
4951 * marshal.c (emit_marshal_object): Add support for byref marshalling of
4952 delegates. Fixes #351520.
4954 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
4955 contains defined memory.
4957 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
4959 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
4961 * sgen-gc.c (check_consistency): New helper function to do a consistency check
4962 of the GC data structures.
4964 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
4966 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
4968 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
4970 (mono_array_clone_in_domain): Ditto.
4971 (mono_array_clone_in_domain): Ditto.
4973 * threads.c (start_wrapper): Register the thread start argument as a GC root.
4974 (cache_culture): Use a write barrier.
4976 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
4977 (ves_icall_get_property_info): Ditto.
4979 * object.h (MONO_STRUCT_SETREF): New macro.
4981 * class-internals.h (MonoStats): Add some GC statistics.
4983 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
4985 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
4987 * exception.c (mono_exception_from_name_two_strings):
4988 Break from loop after method is found.
4990 2008-01-04 Dick Porter <dick@ximian.com>
4992 * process.c (process_module_string_read): Rename variable to
4993 reflect correct usage, after fixing bug 345972.
4995 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
4997 * verify.c (mono_type_create_fnptr_from_mono_method):
4998 created a MonoType function pointer instance to be used during
4999 verification. The verifier releases this memory at end.
5001 * verify.c (mono_method_is_constructor): extracted repeated
5002 checks for constructor into a single class.
5004 * verify.c (do_push_field): use new extracted method
5005 for constructor check.
5007 * verify.c (do_newobj): same.
5009 * verify.c (do_ldftn): renamed to do_load_function_ptr
5010 and make it verify ldvirtftn too.
5012 * verify.c (mono_method_verify: proper verification
5013 of ldvirtftn. release created MonoMethod instances.
5015 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
5017 * verify.c (token_bounds_check): added.
5019 * verify.c (do_ldftn): added.
5021 * verify.c (mono_method_verify): proper verificartion of ldftn.
5023 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
5025 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
5026 than the table row count. It's the resposibility of the caller to
5027 make the bounds check and raise the correct error.
5029 * metadata.c (mono_metadata_decode_row_col): Same.
5031 * loader.c (mono_get_method_from_token): perform bounds check
5032 on token for methoddef table.
5034 2007-12-29 Miguel de Icaza <miguel@novell.com>
5037 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
5038 assert into a negative result, the managed code already coped with
5041 Some folks on Windows reported this error.
5043 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
5045 * appdomain.c: Bump corlib version.
5047 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
5048 CultureInfo.CreateCulture to create CultureInfo for name.
5049 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
5050 create CultureInfo for name. Fixes bug #347174.
5052 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
5054 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
5057 * verify.c (is_valid_branch_instruction): allow branching to the
5058 first instruction of the protected block.
5060 * verify.c (is_valid_cmp_branch_instruction): same.
5062 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
5063 avoid double initialization.
5065 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
5066 detect which cases the eval stack should just be copied.
5068 * verify.c (mono_method_verify): check if the eval stack
5069 is empty when entering a protected block.
5071 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
5073 * verify.c: added is_clause_in_range, is_clause_inside_range,
5074 is_clause_nested and verify_clause_relationship. They perform
5075 the verifications stated in P1 12.4.2.7.
5077 * verify.c (mono_method_verify): remove some unused variables,
5078 add the new exception clause checks, add instruction border
5079 checks for protected block start/end, improved some error
5080 messages and fixed a bug in the way invalid instruction access
5083 2007-12-26 Zoltan Varga <vargaz@gmail.com>
5085 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
5086 from GC 7.0 if available.
5088 * object.c: Remove an unused define.
5090 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
5092 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
5094 * null-gc.c (mono_gc_make_descr_for_array): Implement.
5096 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
5098 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
5099 to take the same arguments as the other make_descr functions.
5101 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
5103 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
5106 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
5109 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
5112 * boehm-gc.c (mono_gc_register_root): Fix a warning.
5114 * null-gc.c (mono_gc_register_root): Fix a warning.
5116 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
5118 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
5119 (mono_gc_base_init): Call GC_init ().
5121 * null-gc.c: Define mono_gc_register_root () as a no-op.
5123 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5125 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
5127 * verify.c: add prototype for merge_stacks at top
5129 * verify.c (do_switch): added.
5131 * verify.c (merge_stacks): on some cases the stack merging
5132 was not happening properly. Unequal stack sizes at merge
5133 points should be invalid.
5135 * verify.c (mono_method_verify): added more debug info on stack state.
5136 verify switch properly.
5138 2007-12-24 Zoltan Varga <vargaz@gmail.com>
5140 * method-builder.h: New file, moved the mono_mb_ declarations here from
5143 * boehm-gc.c marshal.c: Include method-builder.h.
5145 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
5147 * marshal.c: Remove some code which is now in method-builder.c.
5149 2007-12-23 Zoltan Varga <vargaz@gmail.com>
5151 * method-builder.c: New file, extraction of the method builder functionality
5154 * marshal.c: Move the mb functions into method-builder.c.
5156 * marshal.h marshal.c: Export some mono_mb_... functions.
5158 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
5160 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
5163 * class.c (mono_class_get_full): Check the token type in the dynamic case.
5165 * loader.c (mono_field_from_token): Ditto.
5167 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
5170 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
5173 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
5174 a helper function for setting it.
5176 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
5179 * assembly.c: Significally simplify code now that referenced assemblies are
5180 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
5182 * threads.h: Don't include the internal threads-types.h header file. Fixes
5185 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
5187 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
5188 instructions that were target of branches or are at protected block boundaries.
5190 * verify.c (in_same_block): handle filter clauses.
5192 * verify.c (is_valid_branch_instruction): added. checks the target of
5193 instructions br or brtrue/false.
5195 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
5196 binary branch instructions such as beq and bge.
5198 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
5199 and made it pin the instruction as been part of the exception block.
5201 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
5204 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
5207 * verify.c (do_ret): ret from a protected block is unverifiable and
5210 * verify.c (do_static_branch): verify br and br.s instructions.
5212 * verify.c (merge_stacks): add extra param to support detection
5213 of branches in the middle of instructions.
5215 * verify.c (mono_method_verify): verify branches and exception blocks
5216 that target the middle of instructions. Proper verification of br and br.s.
5218 2007-12-21 Zoltan Varga <vargaz@gmail.com>
5220 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
5221 skip_visibility field.
5222 (reflection_methodbuilder_from_dynamic_method): Ditto.
5224 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
5225 registrations. Fixes #348193.
5227 * threads.h: Move the internal mono_thread_get_pending_exception () to
5228 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
5230 2007-12-20 Zoltan Varga <vargaz@gmail.com>
5232 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
5233 icall registration. Fixes #348193.
5235 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
5236 for corlib classes into object. Fixes #349621.
5238 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
5240 * icall.c (property_accessor_nonpublic): new function to determine
5241 whether an accessor allows a property to be considered non-public.
5242 Returns false for private accessor(s) from parent class, and internal
5243 accessor(s) from parent on 2.0 profile (and higher).
5244 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
5245 to determine whether property should be included if NonPublic flag
5246 is set. Fixes bug #349078.
5248 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
5250 * verify.c (init_stack_with_value): added.
5252 * verify.c (mono_method_verify): extracted common
5253 code for exception initialization into init_stack_with_value.
5255 * verify.c (mono_method_verify): initialize the exception
5256 for handler clauses as well.
5258 * verify.c (mono_method_verify): fix the exception clause
5259 ordering rules, it should use handler end offset and not
5262 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
5264 * rawbuffer.c: remove useless warning.
5266 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
5268 * threads.h, threads-types.h: move functions to the correct header
5271 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
5273 * verify.c (mono_method_verify): proper verification
5274 of exception handling clauses ranges and fallthru in
5275 and out of protected blocks.
5277 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
5279 * verify.c (mono_method_verify): fixed compilation issue.
5281 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
5283 * verify.c (mono_method_verify): a printf slipped in, changed
5284 to use verifier debug macro.
5286 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
5288 * verify.c (is_correct_leave): check for filter clauses.
5290 * verify.c (do_filter): added.
5292 * verify.c (mono_method_verify): property verification of leave.
5295 2007-12-18 Mark Probst <mark.probst@gmail.com>
5297 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
5298 Win32 build, until we figure out how to do the proper thing on
5301 2007-12-17 Zoltan Varga <vargaz@gmail.com>
5303 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
5304 by the previous patch.
5306 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
5307 the assembly resolve handler for refonly assemblies.
5309 2007-12-17 Mark Probst <mark.probst@gmail.com>
5311 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
5312 Make sure only one thread is allowed to commence shutdown, and
5313 don't allow new threads to be started once shutdown is in
5316 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
5318 * verify.c (is_correct_endfilter): added.
5320 * verify.c (is_unverifiable_endfilter): added.
5322 * verify.c (do_endfilter): added.
5324 * verify.c (mono_method_verify): property verification of endfilter
5325 and fixed a corner case or endfinally.
5327 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
5329 * verify.h: new flags to support fail fast of unverifiable code and
5330 do non-strict verification. Non-strict verification is required to
5331 have MS runtime compatibility. There are a huge amount of unverifiable
5332 code that it accepts as verifiable. The strict mode verifies the code
5334 Non-strict mode will be required in cases where code needs to be
5335 accepted as verifiable but fails under strict mode.
5337 * pedump.c: added support to fail fast and non-strict verification.
5339 * verify.c: added support for both fail fast and non-strict verification.
5341 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
5343 * verify.c (is_correct_endfinally): added.
5345 * verify.c (mono_method_verify): property verification of endfinally.
5347 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
5349 * verify.c (in_any_block): check for filter clauses.
5351 * verify.c (is_correct_rethrow): added.
5353 * verify.c (mono_method_verify): property verification of rethrow.
5355 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
5357 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
5359 * verify.c (do_throw): added.
5361 * verify.c (mono_method_verify): property verification of throw
5363 2007-12-11 Zoltan Varga <vargaz@gmail.com>
5365 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
5366 assemblies. Fixes #346425.
5368 2007-12-10 Zoltan Varga <vargaz@gmail.com>
5370 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
5373 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
5375 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
5376 prevent asserts when this is called with a token which might not be valid.
5378 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
5379 lookup_dynamic_token_class with valid_token == FALSE.
5381 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
5383 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
5385 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
5387 2007-12-10 Mark Probst <mark.probst@gmail.com>
5389 * gc.c: Don't delay threadpool thread finalization unless Mono is
5392 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5394 * threads.c: turn an assert into a non-fatal warning.
5396 2007-12-09 Robert Jordan <robertj@gmx.net>
5398 * icall.c (GetVirtualMethod): Add missing argument validation.
5400 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
5402 * verify.c (do_cast): added.
5404 * verify.c (mono_method_verify): property verification of castclass and isinst.
5407 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
5409 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
5411 * verify.c (do_stelem): added.
5413 * verify.c (mono_method_verify): property verification of stelem.X.
5415 2007-12-07 Mark Probst <mark.probst@gmail.com>
5417 * class.c, class-internals.h: Introduce an environment variable
5418 (MONO_GENERIC_SHARING) through which the extent of generic code
5419 sharing can be controlled (share all classes, share only corlib
5420 classes, or share nothing).
5422 * object.c: Only create runtime generic context for classes for
5423 which sharing is enabled.
5425 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
5427 * verify.c (do_ldelem): refactor it to work with ldelem.any.
5429 * verify.c (mono_method_verify): property verification of ldelem.any.
5431 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
5433 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
5434 added ldelem.X opcodes.
5436 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
5438 * verify.c: proper verification of ldelem.X
5440 2007-12-06 Zoltan Varga <vargaz@gmail.com>
5442 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
5444 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
5446 * verify.c (mono_method_verify): null literal requires special handling,
5447 the value pushed on stack need to be flagged as so.
5449 * verify.c (do_ldelema): Verify ldelema properly.
5451 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
5453 * verify.c: Verify ldlen properly.
5455 2007-12-05 Zoltan Varga <vargaz@gmail.com>
5457 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
5458 to the target object's type. Fixes #346160.
5460 2007-12-05 Dick Porter <dick@ximian.com>
5462 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
5463 Solaris needs the same workaround as BSD-derived systems. Fixes
5464 bug 323524, patch by Burkhard Linke
5465 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
5467 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
5469 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
5470 handle to use when error dialog is shown; otherwise, update mask
5471 to show no error dialog when an error occurs.
5473 2007-12-03 Zoltan Varga <vargaz@gmail.com>
5475 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
5477 * class.c (mono_class_get_field_default_value): New helper function to initialize
5478 field->def_type and field->data.
5480 2007-11-30 Zoltan Varga <vargaz@gmail.com>
5482 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
5485 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
5487 * marshal.c: Avoid depending on delegate->method_info being set.
5489 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
5491 * object.c (mono_delegate_ctor): Set delegate->method.
5493 * object-internals.h (struct _MonoDelegate): Add 'method' field.
5495 * appdomain.c: Bump corlib version.
5497 2007-11-27 Raja R Harinath <harinath@gmail.com>
5499 * metadata.c (mono_generic_inst_equal_full): Short-circuit
5500 equality check if we're comparing canonicalized MonoGenericInsts.
5502 2007-11-23 Zoltan Varga <vargaz@gmail.com>
5504 * class.c (generic_array_methods): Call mono_class_setup_methods () before
5505 accessing class->methods.
5507 2007-11-22 Dick Porter <dick@ximian.com>
5509 * threads.c: Ensure that the synch_cs is set before trying to use
5512 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
5514 * profiler.c: r89126 broke the statistial profiler, unbreak.
5516 2007-11-22 Martin Baulig <martin@ximian.com>
5518 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
5521 (mono_debug_debugger_version): Bump to 3.
5522 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
5523 -> mono_debugger_class_initialized().
5525 * mono-debug-debugger.c
5526 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
5529 (mono_debugger_start_class_init_func): Removed.
5530 (mono_debugger_class_loaded_methods_func): Added.
5531 (mono_class_setup_methods): Call it here.
5533 2007-11-22 Martin Baulig <martin@ximian.com>
5536 (mono_debug_add_delegate_trampoline): New public method.
5537 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
5540 (MonoSymbolTable): Added `global_data_table'.
5541 (MonoDebuggerTypeKind): Removed.
5543 2007-11-21 Zoltan Varga <vargaz@gmail.com>
5545 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
5548 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5550 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
5552 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
5554 2007-11-20 Martin Baulig <martin@ximian.com>
5556 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
5558 * mono-debug-debugger.c
5559 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
5560 (mono_debugger_remove_breakpoint): Likewise.
5561 (mono_debugger_check_breakpoints): Likewise.
5562 (mono_debugger_register_class_init_callback): New public method.
5563 (mono_debugger_remove_class_init_callback): Likewise.
5564 (mono_debugger_add_type): Likewise.
5566 * mono-debug-debugger.h
5567 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
5569 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
5571 * class.c: more interface implementations needed for the
5572 array enumerator (fixes bug #341112).
5574 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
5576 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
5577 fix ParamName of ArgumentNullExceptions.
5579 2007-11-17 Miguel de Icaza <miguel@novell.com>
5581 * reflection.c (mono_reflection_encode_sighelper): Generate the
5582 modopts and modreqs. I have a useless test that crashes monodis,
5583 but that shows the code working.
5585 2007-11-17 Zoltan Varga <vargaz@gmail.com>
5587 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
5588 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
5590 2007-11-15 Dick Porter <dick@ximian.com>
5592 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
5593 When joining a thread, it's the thread that's calling Join that
5594 gets WaitSleepJoin state not the target. Fixes the standalone
5595 test case in bug 334740, and hopefully the whole bug too.
5597 2007-11-15 Dick Porter <dick@ximian.com>
5599 * process.c: Read file version info from the files pointed at by
5600 process modules, not the current process. Fixes bug 315969.
5602 Use windows typedef names in some places to fix warnings on the
5605 2007-11-15 Mark Probst <mark.probst@gmail.com>
5607 * image.c, metadata-internals.h: Added a generic_class_cache hash
5608 to MonoImage for looking up generic classes when sharing generics.
5610 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5612 * sgen-gc.c: warning cleanups.
5614 2007-11-15 Zoltan Varga <vargaz@gmail.com>
5616 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
5617 inherited properties.
5619 2007-11-14 Mark Probst <mark.probst@gmail.com>
5621 * object.c, class-internals.h: Added more information to the
5622 runtime generic context.
5624 2007-11-13 Zoltan Varga <vargaz@gmail.com>
5626 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
5627 instead of just the target method. Generalize the abstract method handling to
5628 handle any non-static method.
5630 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
5631 mono_marshal_get_delegate_invoke () signature change.
5633 2007-11-13 Mark Probst <mark.probst@gmail.com>
5635 * class.c, class-internals.h: Made
5636 mono_type_get_basic_type_from_generic () public. Fixed member
5637 access check for shared generics.
5639 * loader.c: Don't insert field into field cache if it's part of a
5640 non-inflated generic class.
5642 * domain.c, domain-internals.h: The generic sharing context is now
5643 part of the jit info data structure. Added two accessor
5646 2007-11-12 Zoltan Varga <vargaz@gmail.com>
5648 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
5649 the array Get/Set/Address methods, since the JIT inlines them.
5651 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
5653 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
5654 (mono_image_init): Initialize runtime_invoke_direct_cache.
5656 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
5657 mono_marshal_get_delegate_invoke signature change.
5659 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
5660 an additional argument. Add support for invoking abstract methods.
5662 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
5664 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
5666 2007-11-09 Mark Probst <mark.probst@gmail.com>
5668 * class.c: Do field layout for open generic classes as well.
5670 2007-11-09 Mark Probst <mark.probst@gmail.com>
5672 * gc.c, gc-internal.h: Don't finalize threadpool threads with
5673 other objects, because the threadpool is still around. Put them
5674 in a list instead and after finalizing all other objects in the
5675 root domain shut down the thread pool and then finalize the
5676 threads. Fixes bug #337383.
5678 * threads.c, thread-types.h: New mono_thread_create_internal()
5679 function for marking a thread with the threadpool flag before it
5680 started. Set synch_cs to NULL after freeing it.
5682 * threadpool.c: Mark threadpool threads before they start.
5684 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5686 * reflection.h, reflection.c: don't export random functions
5687 and lazy load dbnull and missing objects.
5689 2007-11-07 Jonathan Chambers <joncham@gmail.com>
5691 * class.c: Initialize COM types if COM interfaces
5692 are present (not just COM classes).
5694 Code is contributed under MIT/X11 license.
5696 2007-11-07 Massimiliano Mantione <massi@ximian.com>
5698 create_dynamic_mono_image: hook module profiler events (dynamic case).
5699 mono_image_basic_init: hook assembly profiler events (dynamic case).
5701 2007-11-07 Massimiliano Mantione <massi@ximian.com>
5703 simple_appdomain_unload: completely terminate the profiler
5704 instead of only processing the statistical samples.
5705 simple_shutdown: make sure this is really called exactly once,
5706 even in multithreaded applications, and always listen to
5708 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
5709 here, the "[un]load" functions will do it.
5710 Fixes bugs #333791 and #325261.
5712 2007-11-07 Geoff Norton <gnorton@novell.com>
5714 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
5715 rather than depend on __APPLE__.
5717 2007-11-07 Mark Probst <mark.probst@gmail.com>
5719 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
5721 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
5723 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
5724 UTF16 MonoString. Fix the crash from bug #335488
5726 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
5728 * marshal.c: Correct (for non-Win32 OS) length != size in
5729 mono_string_from_bstr. Fix #339530.
5731 2007-11-06 Geoff Norton <gnorton@novell.com>
5733 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
5736 2007-11-05 Kornél Pál <kornelpal@gmail.com>
5738 * process.c: Added run-time GetProcessId API detection for Windows.
5740 2007-11-04 Miguel de Icaza <miguel@novell.com>
5742 * reflection.c (mono_param_get_objects): If a parameter has the
5743 attribute [System.Runtime.InteropServices.Optional] we should
5744 set the DefaultValue of the ParameterInfo to be
5745 System.Reflection.Missing instead of DBNull.
5749 (mono_get_reflection_missing_object): New method,
5750 returns the System.Reflection.Missing.Value singleton instance.
5752 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
5754 * culture-info-table.h : regenerated.
5756 2007-11-02 Jonathan Chambers <joncham@gmail.com>
5758 * icall.c: Use GetEnvironmentStrings on windows
5759 so we are using the same environment block as
5760 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
5763 Code is contributed under MIT/X11 license.
5765 2007-10-31 Martin Baulig <martin@ximian.com>
5767 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
5769 * mono-debug-debugger.h
5770 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
5772 2007-10-30 Zoltan Varga <vargaz@gmail.com>
5774 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
5777 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
5779 * culture-info-table.h : regenerated.
5781 2007-10-30 Robert Jordan <robertj@gmx.net>
5783 * icall-def.h, icall.c:
5784 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
5786 Code is contributed under MIT/X11 license.
5788 2007-10-29 Zoltan Varga <vargaz@gmail.com>
5790 * class.c (mono_class_setup_vtable): Find the inflated methods in the
5791 inflated class instead of inflating them again.
5793 * class.c (mono_class_setup_vtable): Inflate the override methods in the
5796 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
5797 Call setup_supertypes () after klass->parent is set.
5798 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
5800 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
5801 for inflated instances of not yet created dynamic generic classes.
5802 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
5803 times from inflated_method.
5804 (methodbuilder_to_mono_method): Ditto.
5806 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
5808 * gc.c: code cleanup and removed old untested option of not creating the
5811 2007-10-29 Zoltan Varga <vargaz@gmail.com>
5813 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
5814 creating a jump trampoline for dynamic methods.
5816 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
5818 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
5819 generic TypeBuilders when called from another method of the same type (bug #335131).
5822 2007-10-27 Zoltan Varga <vargaz@gmail.com>
5824 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
5825 doesn't seem to work perfectly.
5827 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
5828 called multiple times.
5829 (methodbuilder_to_mono_method): Ditto.
5830 (resolve_object): Inflate FieldBuilder's.
5832 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5834 * string-icalls.c, string-icalls.h, appdomain.c: patch from
5835 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
5836 RemoveEmptyEntries in the string.Split implementation (bug #322375).
5838 2007-10-26 Dick Porter <dick@ximian.com>
5840 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
5841 Thread initialisation changes
5843 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
5845 * verify.c: fix compatibility check between arrays and System.Array
5847 2007-10-26 Zoltan Varga <vargaz@gmail.com>
5849 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
5852 2007-10-25 Zoltan Varga <vargaz@gmail.com>
5854 * object.c (mono_value_box): Use typed allocation here.
5856 2007-10-23 Zoltan Varga <vargaz@gmail.com>
5858 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
5859 trampoline instead of compiling the method right away.
5861 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
5863 2007-10-21 Zoltan Varga <vargaz@gmail.com>
5865 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
5866 related fields for dynamic classes. Fixes #334493.
5868 2007-10-20 Zoltan Varga <vargaz@gmail.com>
5870 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
5872 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
5874 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
5875 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
5877 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
5879 * reflection.c (create_generic_typespec): Initialize klass->generic_container
5881 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
5883 2007-10-18 Jonathan Chambers <joncham@gmail.com>
5885 * marshal.c: Use correct key when removing item
5888 Code is contributed under MIT/X11 license.
5890 2007-10-17 William Holmes <billholmes54@gmail.com>
5892 *marshal.c: Adding a case to marshal booleans to U1
5894 Code is contributed under MIT/X11 license.
5896 2007-10-18 Zoltan Varga <vargaz@gmail.com>
5898 * class.c (mono_class_from_name): Search the modules compromising dynamic
5899 assemblies. Fixes #331601.
5901 2007-10-16 Zoltan Varga <vargaz@gmail.com>
5903 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
5904 exception if the type name contains an assembly component. Fixes #334203.
5906 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
5907 modules inside dynamic assemblies. Fixes #334200.
5909 * reflection.c: Set image->public_key and image->public_key_length;
5911 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
5914 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
5916 2007-10-16 Mark Probst <mark.probst@gmail.com>
5918 * metadata.c: Implemented correct comparing of generic classes.
5919 An inflated generic class can be equal to a non-inflated one if it
5920 is inflated with generic type variables as type arguments. Fixes
5923 2007-10-15 Dick Porter <dick@ximian.com>
5925 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
5926 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
5929 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
5930 instead of a monitor lock. This means that monitor_try_enter and
5931 co can set the thread state safely.
5932 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
5933 thread_interrupt_requested, so interrupt actually works.
5935 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
5936 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
5937 state accessor function
5939 2007-10-15 Martin Baulig <martin@ximian.com>
5942 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
5943 the debugger with the current runtime.
5945 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5947 * object.c, object-internals.h: added the ability to set a single
5948 trampoline for all the slots in a vtable.
5950 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5952 * marshal.c: deal with a possible race condition during multicast
5953 delegate invocation.
5955 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5957 * class.c: ensure value type methods don't have the synchronized
5960 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5962 * string-icalls.c, string-icalls.h: reverted unapproved patch that
5965 2007-10-11 Joel Reed <joelwreed@comcast.com>
5967 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
5968 to take an options parameter so that empty entries can be removed during
5969 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
5971 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5973 * marshal.c: make sure we don't store the signature from a dynamic
5974 method into the runtime invoke cache (bug #327189).
5976 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
5978 * marshal.c: make sure the wrapper methods are properly initialized.
5980 2007-10-11 Mark Probst <mark.probst@gmail.com>
5982 * metadata.c, metadata-internals.h: Generalized
5983 mono_type_stack_size() to mono_type_stack_size_internal() which
5984 takes an additional argument specifying whether it allows open
5987 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
5989 * verify.c (do_invoke_method): handle typedbyref params
5990 correctly and check for unverifiable return values.
5992 * verify.c (do_newobj): fix a warning.
5994 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
5996 * verify.c: don't tread typedbyref as allways unverifable,
5997 so uses, like (ld/st)loc.0 are valid. verify for the cases
5998 that it matters, like boxing related operations.
6000 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
6002 * verify.c: add verification of the newobj opcode. verification
6003 of delegate instantation still missing due ldftn and virldftn not
6004 pushing the function type on stack
6006 2007-10-08 Mark Probst <mark.probst@gmail.com>
6008 * class-internals.h: Runtime generic context data structure
6011 * object.c: Initialization of runtime generic context at runtime
6012 vtable creation time.
6014 2007-10-08 Massimiliano Mantione <massi@ximian.com>
6015 * class.c (mono_class_create_from_typedef,
6016 mono_class_from_generic_parameter, mono_ptr_class_get,
6017 mono_fnptr_class_get, mono_bounded_array_class_get)
6018 * domain.c (mono_domain_create, mono_domain_free)
6019 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
6020 * image.c (do_mono_image_load, mono_image_close):
6021 Hooked up load-unload profiler events.
6023 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6025 * domain.c: track statistics about the actual amount of native code
6028 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6030 * class.c: the valuetype enumerators don't have the additional
6031 supertypes interfaces.
6033 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
6035 * class.c: need more interfaces setup for the IEnumerator<T>
6036 object created for arrays (tests/ienumerator-interfaces.2.cs).
6038 2007-10-05 Zoltan Varga <vargaz@gmail.com>
6040 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
6042 2007-10-05 Alp Toker <alp@atoker.com>
6044 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
6045 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
6048 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
6050 * verify.c (verify_type_compatibility_full): verification of
6051 compatibility improved, validates correctly non-strict checks between
6052 native int and I4 types different than (unsigned)int32.
6054 * verify.c (do_store_indirect): added, do all verification of
6057 * verify.c (get_load_indirect_mono_type): renamed to
6058 get_indirect_op_mono_type, as it now returns the MonoType for
6059 ldind.X and stind.X opcodes.
6061 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
6063 * reflection.c: Fix the encoding of generic type definition for
6066 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
6067 mono_image_typedef_or_ref but allows to specify if typespec lookups should
6068 be made. Typespec check is done prior to typeref cache lookup.
6070 * reflection.c (mono_image_typedef_or_ref): now just delegate to
6071 mono_image_typedef_or_ref_full.
6073 * reflection.c (encode_generic_class): encode the generic class
6074 directly instead of calling encode_type.
6076 * reflection.c (encode_type): encode the generic type definition
6077 MonoClass as a generic instantiation.
6079 * reflection.c (create_typespec): cache typespec tokens in
6080 the assembly->typespec cache. Don't create typespec for a generic
6081 instance MonoClass. Create typespec for the generic type defintion.
6083 * reflection.c (create_generic_typespec): encode the generic
6084 class directly instead of calling encode_type.
6086 * reflection.c (mono_image_create_token): encode the generic
6087 type definition not using a typespec for MonoType instances.
6090 2007-10-04 Raja R Harinath <rharinath@novell.com>
6093 * class.c (mono_image_init_name_cache): Don't return nested
6094 'protected internal' classes.
6095 (mono_class_from_name_case): Likewise.
6097 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
6099 * icall-def.h, icall.c : get_bundled_machine_config() is now the
6100 common function used by both DefaultConfig in System.dll and
6101 InternalConfigurationHost in System.Configuration.dll.
6103 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6105 * class.c: automatically add to vectors only a few essential explicit
6106 generic interfaces. The rest of the interfaces that arrays should
6107 provide are currently implicitly added (but still not lazily, see the
6108 design in the discussion of bug#325495 for the details of what is
6109 needed for that). Additionally, implicit interfaces are assigned the
6110 same vtable slot as the explicit interfaces (as they are compatible):
6111 this enables huge memory savings since we don't need to instantiate
6112 as many memthods and as large vtables anymore. Also, Since
6113 GetEnumerator<T> returns an instance of a type that is required to
6114 support a similarly large set of interfaces as arrays, we add
6115 implicit interfaces and interface offset sharing support to those
6116 types, too. This change adds all the required interfaces so that
6117 the anonarray.cs test case in the bug report works (we don't add
6118 all the interfaces to arrays of arrays 3-level deep and more because
6119 of the memory requirements explained in the bug and since they are much
6120 less common: the lazy-loading support will enabled them to work, too).
6122 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
6124 * verify.c (merge_stacks): major clean up, all type compatibility
6125 checks are done by verify_type_compatibility. This fix my earlier lack
6126 of understanding of the CLR type system and merge_stacks no longer looks
6129 * verify.c: fixed some bad spelling.
6131 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
6133 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
6134 a given stack slock.
6136 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
6137 verify_type_compatibility_full. This removed a near indentical function and fixed
6138 handling of Int32 and IntPtr across all opcodes.
6140 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6142 * class.c: only vectors have the additional generic interfaces.
6144 2007-10-01 Jonathan Chambers <joncham@gmail.com>
6146 * mono-config.c: Use g_strcasecmp instead of
6147 strcasecmp like everywhere else to fix
6148 compilation with MSVC.
6150 Code is contributed under MIT/X11 license.
6152 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6154 * object.c, object-internals.h: refactored the IMT code to enable
6155 building a single slot at a time and lazily creating the IMT trampolines
6158 2007-09-29 Zoltan Varga <vargaz@gmail.com>
6160 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
6162 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
6165 2007-09-29 Raja R Harinath <harinath@gmail.com>
6167 * loader.c (method_from_methodspec): Rearrange to avoid
6168 un-necessary exposition. Don't assert out if the method's
6169 declaring type is a generic type definition.
6171 2007-09-28 Martin Baulig <martin@ximian.com>
6173 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
6175 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6177 * class-internals.h: optimize field layout of MonoClass to
6178 requires less cachelines at runtime and save a few bytes on 64 bit
6181 2007-09-28 Jb Evain <jbevain@novell.com>
6183 * reflection.c: when encoding type names in custom attributes,
6184 if the type is a closed generic type, its generic arguments
6185 have to be serialized as AssemblyQualifiedName, so that when
6186 they are deserialized, it's possible to re-create them properly.
6190 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6192 * object.c, class-internals.h: added delegate-creation counter.
6194 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6196 * class.c: cleanup of the code that synthetizes interfaces for
6197 arrays in 2.0: saves quit a bit of corlib mempool memory.
6198 Code to fix bug #325495 ifdeffed out for now until the issues
6199 with memory usage and O(n^2) behaviour are fixed.
6201 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6203 * marshal.c: when possible, do not duplicate the name of the methods
6204 in the method builder and in the generated MonoMethod.
6206 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
6207 * verify.c: added support for type checking ldind_* opcodes.
6209 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
6211 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
6212 which is used to distinguish the fully open instantiation of a TypeBuilder
6213 with the rest. This temporary hack is required to restore the property that
6214 the fully open instantiation is the same type of the generic type definition.
6216 * class-internals.h (mono_generic_class_is_generic_type_definition):
6217 new function as part of the internal API.
6219 * class.c (inflate_generic_type): return NULL when the generic inst is
6220 fully open. The fully open generic type is now the same as the generic type
6221 definition for non TypeBuilder types.
6223 * class.c (mono_generic_class_get_class): removed assert since it is
6224 no longer valid, gklass->cached_class can point to the generic type definition.
6226 * class.c (mono_generic_class_is_generic_type_definition): new.
6228 * metadata.c (mono_generic_class_hash): added is_tb_open field
6229 to the hash calculation.
6231 * metadata.c (free_generic_class): if the generic class is associated
6232 with the generic type definition, its field will come from the mempool and
6235 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
6236 new, this function identifies the corner case of a TypeBuilder fully open
6239 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
6240 for lookup. Set gclass->cached_class to be the container class in case of
6241 the fully open instantiation of non TypeBuilder types.
6243 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
6244 to compare generic classes.
6246 * reflection.c (method_encode_methodspec): remove assert that
6249 * reflection.c (mono_reflection_generic_class_initialize): add
6250 an aditional assert to ensure the proper type is used.
6252 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
6254 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
6257 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
6259 * verify.c (push_arg): Fixed support for ldarga
6260 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
6261 MonoType used as first arg in case of instance calls.
6263 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
6265 * verify.c: Support for verifying VAR and MVAR types,
6267 2007-09-25 Zoltan Varga <vargaz@gmail.com>
6269 * icall.c (ves_icall_get_property_info): Set the reflected type of the
6270 accessors correctly.
6272 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6274 * threads.c: support OSX and other systems in
6275 mono_thread_get_stack_bounds (bug #328026).
6277 2007-09-25 Martin Baulig <martin@ximian.com>
6280 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
6282 2007-09-24 Martin Baulig <martin@ximian.com>
6285 (MonoDebugClassEntry): Moved the definition of this struct into
6286 mono-debug.c to make it private.
6289 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
6290 type table per symbol file, we don't need to store the symfile id
6293 2007-09-24 Martin Baulig <martin@ximian.com>
6295 Create one type table per symbol file, since a `MonoClass *' gets
6296 invalid when its image is unloaded.
6298 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
6299 (MonoDebugHandle): Added `type_table'.
6301 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6303 * mempool.c, mempool.h: added mono_mempool_new_size () API
6304 to be able to specify a smaller initial size for the pool.
6305 Adjusted the code to slowly increase pool size before using
6306 the previous default size.
6307 * image.c: use a small initial size for image mempools.
6309 2007-09-23 Zoltan Varga <vargaz@gmail.com>
6311 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
6314 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
6315 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
6317 2007-09-22 Zoltan Varga <vargaz@gmail.com>
6319 * metadata.c (mono_type_create_from_typespec): Remove an invalid
6320 free. Fixes #327438.
6322 2007-09-21 Raja R Harinath <harinath@gmail.com>
6324 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
6325 generic instantiations, etc.
6326 <MONO_TYPE_ARRAY>: Likewise.
6328 2007-09-21 Martin Baulig <martin@ximian.com>
6330 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
6331 these structs were never defined.
6332 (MonoDebugHandle): Removed the `_priv' field, it was never used.
6334 2007-09-21 Martin Baulig <martin@ximian.com>
6336 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
6338 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
6340 * image.c: removed the guid hash tables: we can get the same info
6341 without the additional memory usage hit (partially fixes also bug #327052).
6343 2007-09-10 Massimiliano Mantione <massi@ximian.com>
6345 * profiler.h, profiler-private.h, profiler.c: add a new profiler
6346 event to handle unloading methods. After the event is called, the
6347 corresponding MonoMethod* must be considered invalid.
6348 * loader.c (mono_free_method): call the new mono_profiler_method_free
6351 2007-09-20 Mark Probst <mark.probst@gmail.com>
6353 * domain-internals.h: New flag in MonoJitInfo which marks shared
6354 generic methods. New hash table (shared_generics_hash) in
6355 MonoDomain to keep track of shared generic methods. Prototypes
6356 for functions to register and lookup shared generic methods.
6358 * domain.c: Support for registering and looking up shared generic
6359 methods via a hash table (shared_generics_hash) in MonoDomain.
6361 * class-internals.h: New exception to signal failure of shared
6362 compilation of a generic method. New counters for generics
6363 sharing in MonoStats.
6365 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6367 * image.c, metadata-internals.h: don't keep a file descriptor open
6368 for loaded assemblies (bug#325988).
6370 2007-09-19 Raja R Harinath <rharinath@novell.com>
6372 * metadata.c (signature_in_image): New. Carve out of type_in_image.
6373 (ginst_in_image, gclass_in_image): Simplify. Change signature to
6374 use the corresponding datatypes.
6375 (type_in_image): Update to changes.
6376 (CleanForImageUserData): Simplify.
6377 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
6378 Avoid quadratic behaviour in handling the "stolen" list by
6379 separating the filter predicate out, and by prepending the stolen
6380 items rather than appending them.
6381 (steal_ginst_in_image): Likewise.
6382 (mono_metadata_clean_for_image): Update to changes.
6384 2007-09-19 Martin Baulig <martin@ximian.com>
6386 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
6388 2007-09-19 Martin Baulig <martin@ximian.com>
6390 * mono-debug.c (mono_debug_cleanup): Don't call
6391 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
6393 2007-09-19 Raja R Harinath <harinath@gmail.com>
6395 Fix crash on 'make run-test' in mcs/errors
6396 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
6397 Avoid more potential allocations in mono_class_from_mono_type.
6398 (ginst_in_image): Update to changes.
6399 (gclass_in_image): Rearrange slightly.
6401 2007-09-18 Zoltan Varga <vargaz@gmail.com>
6403 * class.c (mono_class_init): Move the code that sets up class->methods to
6404 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
6406 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
6407 canonical instance of an inflated generic signature.
6408 (mono_type_create_from_typespec): Remove an invalid free.
6410 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
6412 2007-09-18 Marek Habersack <mhabersack@novell.com>
6414 * domain-internals.h: added a declaration of the
6415 mono_assembly_load_full_nosearch internal function.
6417 * assembly.c (mono_assembly_load_with_partial_name): use
6418 mono_try_assembly_resolve return value properly.
6419 (mono_assembly_load_full_nosearch): copied the function body from
6420 mono_assembly_load_full, without the code to invoke assembly
6422 (mono_assembly_load_full): calls the above new function and if the
6423 assembly is not resolved, invokes the search hooks.
6425 * appdomain.c (mono_runtime_init): restore the global postload
6426 assembly search handlers.
6428 2007-09-18 Zoltan Varga <vargaz@gmail.com>
6430 * class.c (mono_class_init): Make sure class->methods and class->properties
6431 are never NULL in the generics case.
6433 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
6435 2007-09-17 Zoltan Varga <vargaz@gmail.com>
6437 * metadata.c (free_generic_class): Disable some code to fix the build.
6439 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
6441 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
6442 from the image mempool.
6444 * metadata.c (free_generic_class): Free more data from the inflated class.
6446 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
6448 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
6450 (mono_type_create_from_typespec): Ditto.
6452 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
6453 MonoImage to the caller.
6454 (mono_init_internal): Save the opened image in a global variable.
6455 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
6457 * reflection.c (resolve_object): Fix a leak.
6459 * metadata.c: Fix the freeing of data in the generics caches.
6461 * metadata.c (free_generic_inst): Comment this out to fix the build.
6462 (free_generic_class): Ditto.
6464 * metadata.c: Free cached generic methods, instantinations and classes when
6465 they are removed from the caches.
6466 (mono_metadata_free_type): Free the type itself.
6468 * class.c: Free the result of mono_class_inflate_generic_type () in a few
6471 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
6473 * boehm-gc.c: restrict managed allocs to __thread supporting
6476 2007-09-16 Zoltan Varga <vargaz@gmail.com>
6478 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
6479 (mono_generic_class_get_class): Fix a leak.
6481 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
6482 mono_metadata_free_type ().
6483 (mono_metadata_inflate_generic_inst): Fix a leak.
6485 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6487 * mono-debug.c (free_header_data): Fix a leak missed earlier.
6489 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
6492 * mono-debug.c (mono_debug_close_image): Fix call to
6493 g_hash_table_remove ().
6495 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
6497 * icall-def.h: redirect all the string ctor to the managed
6498 CreateString () methods.
6499 * string-icalls.c, string-icalls.h: removed dead code for string
6502 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6504 * mono-debug.c: Fix memory leaks.
6506 2007-09-14 Jonathan Chambers <joncham@gmail.com>
6508 * threads-types.h: Implement mono_hazard_pointer_set and
6509 mono_hazard_pointer_clear macros using do/while(0) to fix
6510 compilation with MSVC.
6512 Code is contributed under MIT/X11 license.
6514 2007-09-14 Zoltan Varga <vargaz@gmail.com>
6516 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
6517 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
6519 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
6521 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
6524 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
6526 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
6527 managed-code allocated as well.
6529 2007-09-13 Zoltan Varga <vargaz@gmail.com>
6531 * class.c (mono_class_is_assignable_from): Add support for generic variance.
6533 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
6535 * boehm-gc.c: fixed the build after the AOT changes.
6537 2007-09-13 Zoltan Varga <vargaz@gmail.com>
6539 * wrapper-types.h: Add an ALLOC wrapper type.
6541 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
6542 reference managed allocator methods.
6544 2007-09-12 Marek Safar <marek.safar@gmail.com>
6546 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
6547 of Type array and not MonoType, a fix suggested by Hari.
6549 2007-09-12 Jonathan Chambers <joncham@gmail.com>
6551 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
6552 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
6554 Code is contributed under MIT/X11 license.
6556 2007-09-10 Massimiliano Mantione <massi@ximian.com>
6558 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
6560 2007-09-12 Marek Habersack <mhabersack@novell.com>
6562 * image.c (do_mono_image_open): if assembly file fails to open and
6563 MONO_IOMAP is in effect, try to find the path in a
6564 case-insensitive way.
6566 * appdomain.c (mono_runtime_init): do not install postload hooks -
6567 tests show that MS.NET doesn't use anything of that sort to
6568 trigger the AppDomain.AssemblyResolve event.
6569 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
6571 (mono_runtime_init): init portability helpers here.
6573 * assembly.c (mono_assembly_load_with_partial_name): if other
6574 attempts fail, trigger the AppDomain.AssemblyResolve event handler
6575 to resolve the assembly.
6577 * domain-internals.h: added mono_try_assembly_resolve and marked
6580 2007-09-11 Jb Evain <jbevain@novell.com>
6582 * object-internals.h (MonoReflectionDynamicMethod): add
6583 a `MonoReflectionType *owner` field. The owner is used
6585 (mono_reflection_create_dynamic_method): use the owner of the dynamic
6586 method as the class declaring the dynamic method.
6587 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
6588 dynamic method to the declaring type of the methodbuilder.
6590 2007-09-11 Mark Probst <mark.probst@gmail.com>
6592 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
6593 rules for calling methods via reflection.
6595 2007-09-11 Zoltan Varga <vargaz@gmail.com>
6597 * reflection.c (resolve_object): Add support for MonoGenericClass.
6600 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6602 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
6603 provide a managed method that does fast allocations without needing
6604 a managed->unmanaged transition. Boehm GC implementation currently
6605 enabled for ptrfree objects on sane architectures.
6607 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
6609 * marshal.c, marshal.h: exported a couple of useful functions and
6610 added mono_mb_get_label () to easily handle backward branches.
6612 2007-09-10 Zoltan Varga <vargaz@gmail.com>
6614 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
6616 2007-09-10 Massimiliano Mantione <massi@ximian.com>
6618 * loader.c (find_method): Fixed the regression introduced while
6621 2007-09-09 Zoltan Varga <vargaz@gmail.com>
6623 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
6626 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
6627 icall.c reflection.c: Pass a MonoGenericContext argument to
6628 mono_lookup_dynamic_token ().
6630 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
6633 2007-09-09 Robert Jordan <robertj@gmx.net>
6635 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
6636 for generic methods.
6638 * object.c (mono_object_get_virtual_method): Handle generic methods.
6641 Code is contributed under MIT/X11 license.
6643 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
6645 * image.c: fix locking in mono_image_load_file_for_image ().
6647 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
6649 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
6650 used only as a cache: added an icall to fill it.
6652 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
6654 * reflection.h: exposed mono_reflection_free_type_info
6655 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
6656 since mono_reflection_bind_generic_parameters makes a copy of it.
6657 * reflection.c (free_type_info): subinfos should be freed.
6658 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
6660 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
6661 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
6662 this fixes #82695 and #81726.
6665 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
6667 * process.h, process.c: added support for user profile/info in
6668 ProcessStartInfo. For now only Windows works.
6670 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6672 * metadata.c: consider the generic arguments when comparing
6673 signatures (bug #82614).
6675 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6677 * cil-coff.h, image.c: updated assembly loader to cope with the
6678 PE32+ 64 bit file format.
6680 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6682 * assembly.c, class.c, domain.c, loader.c: remove useless
6683 inclusion of cil-coff.h.
6685 2007-08-29 Jonathan Chambers <joncham@gmail.com>
6687 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
6688 if interface is marked with CoClassAttribute.
6690 Code is contributed under MIT/X11 license.
6692 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
6694 * sgen-gc.c: ensure no object from the to space is copied again or finalized
6695 if it's seen twice in major collections.
6697 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6699 * sgen-gc.c: big objects are not copied to the gray area, but they
6700 need to be considered for scanning, too, if they are brought alive
6701 by an object ready for finalizations or a survived one.
6703 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6705 * sgen-gc.c: properly account the number of disappearing links when
6708 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
6710 * sgen-gc.c: share the code to scan the registered roots between the
6711 different types of collections.
6713 2007-08-28 Zoltan Varga <vargaz@gmail.com>
6715 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
6717 2007-08-28 Zoltan Varga <vargaz@gmail.com>
6719 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
6720 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
6722 2007-08-28 Mark Probst <mark.probst@gmail.com>
6724 * security-manager.c (mono_security_manager_get_methods):
6725 LinkDemandSecurityException now has 2 arguments instead of 3.
6727 2007-08-27 Zoltan Varga <vargaz@gmail.com>
6729 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
6730 platforms which need it.
6732 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6734 * sgen-gc.c: unregister thread data structures with a pthread_key_t
6737 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
6739 * threads.c: free the thread static data on thread exit.
6741 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
6743 * class.c: walk the hierarchy to find the generic definition for
6744 a class (fixes runtime part of bug #82498).
6746 2007-08-24 Zoltan Varga <vargaz@gmail.com>
6748 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
6751 * image.c (mono_image_close): Here. Hopefully fixes #82510.
6753 2007-08-24 Mark Probst <mark.probst@gmail.com>
6755 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
6757 2007-08-24 Robert Jordan <robertj@gmx.net>
6759 * appdomain.c: don't perform the ':'->';' substitution on Win32.
6761 2007-08-24 Jb Evain <jbevain@novell.com>
6763 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
6766 2007-08-24 Mark Probst <mark.probst@gmail.com>
6768 * threads.c: Make sure a thread gets cleaned up only once. Fixes
6771 2007-08-24 Zoltan Varga <vargaz@gmail.com>
6773 * assembly.c: Fix a warning.
6775 2007-08-23 Marek Habersack <mhabersack@novell.com>
6777 * appdomain.c: parse the <runtime> section looking for the probing
6778 element with the 'privatePath' attribute, which sets additional
6779 directories in which the runtime should look for assemblies.
6781 2007-08-23 Robert Jordan <robertj@gmx.net>
6783 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
6786 2007-08-23 Martin Baulig <martin@ximian.com>
6788 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
6789 _mono_debug_init_corlib() and remove it from the header file.
6791 2007-08-23 Martin Baulig <martin@ximian.com>
6793 * mono-debug-debugger.c
6794 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
6795 don't notify the debugger about it.
6797 * mono-debug-debugger.h
6798 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
6800 2007-08-23 Robert Jordan <robertj@gmx.net>
6802 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
6803 Code is contributed under MIT/X11 license.
6805 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6807 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
6809 2007-08-22 Martin Baulig <martin@ximian.com>
6811 * mono-debug.c: Store debugging info on a per-domain basis and
6812 free it on domain unload. Add support for unloading symbol files.
6815 (MonoDebugList): New typedef.
6817 - add `data_tables and `type_table'.
6818 - replace 'symbol_files' and `num_symbol_files' with a
6820 (mono_debug_data_table): Removed.
6821 (mono_debug_list_add): New public function.
6822 (mono_debug_list_remove): New public function.
6823 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
6824 (mono_debug_init_2_memory): Renamed into
6825 mono_debug_open_image_from_memory().
6826 (mono_debug_close_image): New public function.
6827 (mono_debug_domain_create): Likewise.
6828 (mono_debug_domain_unload): Likewise.
6829 (MONO_DEBUGGER_VERSION): Bump to 60.
6831 * mono-debug-debugger.h
6832 (MonoDebuggerEvent):
6833 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
6834 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
6835 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
6836 - rename `THREAD_CREATED' and `THREAD_EXITED' into
6837 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
6838 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
6840 (mono_debugger_add_symbol_file): Removed.
6841 (mono_debugger_add_type): Removed.
6842 (mono_debugger_lookup_type): Removed.
6843 (mono_debugger_lookup_assembly): Removed.
6846 (mono_domain_create): Call mono_debug_domain_create().
6847 (mono_init_internal): Call mono_debug_init_corlib().
6850 (mono_assembly_close): Call mono_debug_close_image().
6852 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6854 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
6857 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
6859 * sgen-gc.c: ensure section->pin_queue_end is initialized
6860 correctly when non pinning objects in the section have been found.
6862 2007-08-22 Marek Habersack <mhabersack@novell.com>
6864 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
6865 containing a list of directories separated by ':'. MSDN docs say
6866 the directories should be separated with ';'. Part of a bugfix for
6869 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
6871 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
6872 it should MonoType and not MonoClass.
6874 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
6876 * culture-info-table.h : regenerated.
6878 2007-08-20 William Holmes <billholmes54@gmail.com>
6880 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
6881 to call ReplaceFile Kernel32 on windows or in io-layer.
6882 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
6883 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
6884 as an internal call.
6886 Code is contributed under MIT/X11 license.
6888 2007-08-20 Jb Evain <jbevain@novell.com>
6890 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
6891 and MONO_EXCEPTION_FIELD_ACCESS.
6893 * debug-helpers.[c|h]: new mono_field_full_name function.
6895 2007-08-20 Mark Probst <mark.probst@gmail.com>
6897 * class.c: Removed class_security_level() and moved it to
6898 security-core-clr.c.
6900 * security-core-clr.c, security-core-clr.h: class_security_level()
6901 is now public and renamed to mono_security_core_clr_class_level().
6902 It also looks for security attributes in the classes a class is
6905 2007-08-20 Mark Probst <mark.probst@gmail.com>
6907 * security-core-clr.c, security-core-clr.h: CoreCLR security
6910 * Makefile.am: Added security-core-clr.[ch].
6912 * security-manager.c, security-manager.h: Functions and enum for
6913 setting and getting the security mode.
6915 * class.c: CoreCLR security checks.
6917 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6919 * icall-def.h, process.c, process.h: implemented icall to get
6920 user/system processor times.
6922 2007-08-17 Mark Probst <mark.probst@gmail.com>
6924 * domain.c, threads.c, class-internals.h, domain-internals.h: New
6925 reader-lock-free jit_info_table.
6927 2007-08-17 Zoltan Varga <vargaz@gmail.com>
6929 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
6931 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
6933 * object-internals.h (MonoException): Add missing _data member.
6935 2007-08-08 Massimiliano Mantione <massi@ximian.com>
6937 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
6938 checking that only methods with matching qname or fqname are picked
6939 from implemented interfaces.
6941 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
6943 * verify.c (do_newarr):added, do type verification of
6944 newarr ops, push the right value on the eval stack.
6945 * verify.c (mono_method_verify): use do_newarr
6948 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
6950 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
6951 factored the common code into get_boxable_mono_type, which
6952 is now using mono_type_get_full, this fixed byref related tests.
6954 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
6956 * class.c: added mono_type_get_full, this function has the same
6957 behavior of mono_class_get_full but the returned MonoType has
6958 all metadata of the associated token in case of a typespec token.
6959 * class.c: added mono_type_retrieve_from_typespec, used by
6960 mono_type_get_full to retrieve the token type.
6961 * class.c (mono_class_create_from_typespec): changed to use
6962 mono_type_retrieve_from_typespec.
6963 * class.c (mono_ldtoken): changed to use mono_type_get_full
6964 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
6965 * class-internals.h: exported mono_type_get_full for internal use.
6967 2007-08-16 Jb Evain <jbevain@novell.com>
6969 * domain.c (supported_runtimes): add entry for
6970 the 'moonlight' runtime version.
6972 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
6974 * verify.c (mono_method_verify): small typo sliped in.
6976 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
6978 * verify.c (do_unbox_value): added, do type verification of
6980 * verify.c (mono_method_verify): use do_unbox_value
6983 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
6985 * verify.c (dump_stack_value): fixed typo, was printing string
6986 instead of object on stack.
6987 * verify.c (do_box_value): moved the byref check up as it leads
6988 to invalid code and should be done earlier.
6989 * verify.c: improved error messages for and ldobj
6991 2007-08-15 William Holmes <billholmes54@gmail.com>
6993 * marshal.c (emit_marshal_custom): Omit the call to
6994 marshal_native_to_managed when calling native to managed
6995 and the argument is specified as an out argument.
6997 Code is contributed under MIT/X11 license.
6999 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
7001 * verify.c: fixed the type checks for generics, function pointers and vectors.
7002 Added type verification for ldobj and ldtoken. The verifier
7003 would segfault if header or signature of a method contained references
7004 to non-existant types.
7006 2007-08-15 Jonathan Chambers <joncham@gmail.com>
7008 * marshal.c (cominterop_get_ccw): Patch from
7009 Bill Holmes to no walk up interface hierarchy.
7010 All parent methods should be present in the interface for COM.
7012 Code is contributed under MIT/X11 license.
7014 2007-08-15 Jonathan Chambers <joncham@gmail.com>
7016 * marshal.c (emit_marshal_com_interface): Patch from
7017 Bill Holmes to handle COM Interfaces as return values
7018 for native->managed calls.
7020 Code is contributed under MIT/X11 license.
7022 2007-08-14 Jonathan Chambers <joncham@gmail.com>
7024 * marshal.c (cominterop_get_idispatch_for_object): Implement
7025 for runtime callable wrappers.
7027 Code is contributed under MIT/X11 license.
7029 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
7031 * pedump.c (main): changed from mono_init to mono_init_from_assembly
7032 so 2.0 types are accessible
7035 2007-08-13 Miguel de Icaza <miguel@novell.com>
7037 * domain.c (mono_init_internal): Call mono_assembly_load_friends
7038 once we load mscorlib. Due to the order in which we initialize,
7039 the mono_assembly_load_full routine that loads mscorlib did not
7040 load friends. We now load it once we load the
7041 mono_defaults.internals_visible_class class.
7043 * assembly.c: Expose the mono_load_friend_assemblies method.
7045 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
7047 * verify.c: improved the handling of boxing, better
7048 type checking for unary ops and conversion. Fix bug
7049 regarding managed pointer compatibility checking
7051 2007-08-11 Zoltan Varga <vargaz@gmail.com>
7053 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
7055 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
7057 2007-08-09 Raja R Harinath <rharinath@novell.com>
7059 * reflection.c (dup_type): Remove.
7060 * class.c (dup_type): Remove.
7061 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
7062 instead of the dodgy 'dup_type'.
7063 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
7064 handle the case where 'dup_type' needed the second argument.
7066 2007-08-08 Zoltan Varga <vargaz@gmail.com>
7068 * domain.c: Fix a warning.
7070 2007-08-08 Massimiliano Mantione <massi@ximian.com>
7072 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
7073 checking that methods with the same fqname are not overridden
7074 with a method from an ancestor.
7076 2007-08-07 Zoltan Varga <vargaz@gmail.com>
7078 * threads.c (free_thread_static_data_helper): Avoid a crash if
7079 thread->static_data is not yet set.
7081 2007-08-07 Jonathan Chambers <joncham@gmail.com>
7083 * marshal.c: Use correct image when emitting
7084 native wrapper for COM calls.
7086 Code is contributed under MIT/X11 license.
7088 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
7090 * icall-def.h, security.c, security.h :
7091 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
7093 2007-08-07 Martin Baulig <martin@ximian.com>
7095 * mono-debug-debugger.h
7096 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
7098 * domain.c (mono_domain_free): Call
7099 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
7101 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
7103 * verify.c (check_underflow, check_overflow): error message now returns IL offset
7104 * verify.c (in_same_block): code should test if either offset is inside the clauses
7105 * verify.c (mono_method_verify): push the exception into the eval stack of exception
7108 2007-08-03 Zoltan Varga <vargaz@gmail.com>
7110 * image.c (mono_image_close): Fix a leak.
7112 * object.c (mono_runtime_invoke_array): Avoid using alloca.
7114 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
7116 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
7118 * domain.c, threads.c, threads-types.h: fix memory retention issue
7119 with thread static variables not being cleared on domain unload.
7120 Reuse thread static slots after domain unload.
7122 2007-08-03 Zoltan Varga <vargaz@gmail.com>
7124 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
7127 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
7128 now done in mono_runtime_invoke_array.
7130 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
7131 receiver is a nullable type.
7133 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
7136 2007-08-03 Jonathan Chambers <joncham@gmail.com>
7138 * marshal.c: Implement COM Objects as return type for
7139 managed->unmanaged calls. Added Release calls for COM Object
7140 out/return values in managed->unmanaged calls.
7142 Code is contributed under MIT/X11 license.
7144 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7146 * threads.h, threads-type.h: move the hazard pointer declarations
7147 to the private header.
7149 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7151 * file-io.c, appdomain.c: memory leak fixes.
7153 2007-08-02 Dick Porter <dick@ximian.com>
7156 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
7157 SO_REUSEADDR setting into io-layer/sockets.c.
7159 2007-08-01 Zoltan Varga <vargaz@gmail.com>
7161 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
7162 from Object when called on a generic parameter. Fixes #82211.
7164 2007-08-01 Dick Porter <dick@ximian.com>
7166 * file-io.c (convert_share): Test FileShare values bit-by-bit.
7167 Fixes bug 79250 yet again.
7169 2007-07-30 Martin Baulig <martin@ximian.com>
7171 Merged the `debugger-dublin' branch.
7174 (MonoDebugDataTable): New typedef.
7175 (MonoDebugMethodAddressList): New typedef.
7176 (MonoDebugWrapperData): Removed.
7177 (MonoDebugSymbolTable): Removed `current_data_table',
7178 `current_data_table_size', `current_data_table_offset'.
7179 (MonoDebugDataItemType): Moved into mono-debug.c.
7180 (MonoDebugMethodJitInfo): Remove `address'.
7181 (mono_debug_data_table): New global variable.
7182 (mono_debug_lookup_method_addresses): New public function.
7183 (mono_debug_find_method): Take a `MonoMethod *', not a
7184 `MonoDebugMethodInfo *'.
7186 * mono-debug.c: Drop support for the old symbol tables.
7188 2007-06-28 Martin Baulig <martin@ximian.com>
7190 * mono-debug.c (mono_debug_debugger_version): New public variable.
7192 2007-07-31 William Holmes <billholmes54@gmail.com>
7194 * metadata.c Changed mono_type_create_from_typespec to not insert
7195 the type into the hash map until after
7196 do_mono_metadata_parse_type has completed.
7198 Code is contributed under MIT/X11 license.
7200 2007-07-31 Zoltan Varga <vargaz@gmail.com>
7202 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
7203 generic parameter. Fixes #82211.
7205 2007-07-27 Jb Evain <jbevain@novell.com>
7207 * pedump.c (dump_metadata, dump_metadata_header): dump
7208 versions contained in the metadata header.
7210 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7212 * threads.c: register small_id_table with the GC.
7214 2007-07-27 Mark Probst <mark.probst@gmail.com>
7216 * threads.c, threads.h, class-internals.h, object-internals.h:
7217 Hazard pointers, to be used by lock-free parallel algorithms.
7219 2007-07-26 Dick Porter <dick@ximian.com>
7221 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
7222 routine on non-windows platforms, as I've not managed to think of
7223 a non-kludgy way of doing this. Finishes off bug 78739.
7225 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7227 * object.c: properly setup interface_bitmap in proxy vtables.
7229 2007-07-25 Marek Habersack <mhabersack@novell.com>
7231 * appdomain.c (get_shadow_assembly_location): do not use TickCount
7232 to create unique shadow copy target directories, use the domain's
7233 serial number instead. Each domain gets a unique target directory
7236 * domain.c (mono_domain_create): added code to increment domain
7237 shadow copy serial number and cache the value in the current
7240 * domain-internals.h (struct _MonoDomain): added a new field -
7241 shadow_serial to hold the serial number used in generation of
7242 shadow-copy directories. This is to make sure that the directory
7243 name is unique for each and every domain created. We avoid a race
7244 condition with overriding assemblies already in use by other app
7247 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
7249 * class.c (mono_bounded_array_class_get): fixed memory leak when
7250 binding generic parameters.
7252 2007-07-24 Raja R Harinath <rharinath@novell.com>
7254 * metadata.c (do_mono_metadata_parse_generic_class): Use
7255 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
7258 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7260 * loader.c, class-internals.h, reflection.c: removed the per-method
7261 generics hashtable: we use the global one through the call of
7262 mono_class_inflate_generic_method ().
7264 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
7266 * class.c, metadata.c, class-internals.h: introduce yet another
7267 generics global cache for inflated methods (fixes 98% of the perf
7268 issue in bug #81806).
7270 2007-07-23 Raja R Harinath <rharinath@novell.com>
7272 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
7273 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
7274 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
7275 return a MonoGenericInst containing (a copy) of those types.
7276 (mono_metadata_inflate_generic_inst): Update to changes.
7277 (mono_metadata_parse_generic_inst): Likewise.
7278 (mono_get_shared_generic_inst): Likewise.
7279 * reflection.c (mono_class_bind_generic_parameters): Likewise.
7280 (mono_reflection_bind_generic_method_parameters): Likewise.
7281 * metadata-internals.h: Likewise.
7282 * icall.c (free_generic_context): Kill.
7283 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
7285 * reflection.c (reflection_methodbuilder_to_mono_method): Use
7286 mono_metadata_type_dup.
7287 * marshal.c (mono_mb_create_method): Likewise.
7289 * metadata.c (mono_metadata_type_dup): Rename from
7290 mono_metadata_type_dup_mp. Take an optional mempool instead of a
7291 MonoImage. Handle a few more cases, esp. when no mempool is given.
7292 * marshal.c, metadata-internals.h: Update to changes.
7294 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
7296 * class.c: fixed a small leak for array classes and removed warning.
7298 2007-07-22 Zoltan Varga <vargaz@gmail.com>
7300 * loader.c (mono_method_get_param_token): Make this work on generic methods.
7301 Return 0x8000000 for return parameters. Fixes #82161.
7303 2007-07-21 Marek Habersack <grendello@gmail.com>
7305 * appdomain.c (get_shadow_assembly_location): append the current
7306 ticks value to the path. Avoids overwriting the same assemblies by
7307 several threads at the same time.
7309 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
7310 and Raja R Harinath <rharinath@novell.com>
7312 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
7314 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
7315 property for testing if a method is a generic method definition.
7317 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
7319 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
7321 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
7323 * verify.c: used function from private branch, reverted to the one in class.h
7325 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
7327 * verify.c: a typo slipped in and the code wont compile
7329 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
7331 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
7332 disabled box instruction as it is doing the wrong thing
7333 improved stack dump messages, now it is easier to debug type related issues
7336 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
7338 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
7340 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
7342 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
7343 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
7344 grouped with class and valuetype. This change will simply
7345 the code as it should be handled just like unmanaged pointers.
7347 2007-07-19 Mark Probst <mark.probst@gmail.com>
7349 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
7351 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
7353 * verify.c: several stack merge issues fixed, reference comparisons now
7354 check the type size. strict type check now works correctly.
7355 added more uses of IS_MANAGED_POINTER macro.
7356 fixed issues pointed by running the test suite against .net.
7359 2007-07-19 Mark Probst <mark.probst@gmail.com>
7361 * class.c, loader.c, class-internals.h: Removed the
7362 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
7365 * icall.c: Better error checking in some internal reflection
7368 2007-07-18 William Holmes <billholmes54@gmail.com>
7370 * filewatcher.c : removed unused variable 'filename' in
7371 ves_icall_System_IO_FSW_SupportsFSW
7373 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7375 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
7378 2007-07-15 Zoltan Varga <vargaz@gmail.com>
7380 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
7382 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
7384 2007-07-14 Zoltan Varga <vargaz@gmail.com>
7386 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
7387 Implement generics support.
7388 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
7390 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
7391 type_args and method_args arguments.
7392 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
7393 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
7394 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
7396 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
7398 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
7399 It adds a rootimage parameter to mono_reflection_get_type_internal,
7400 adds new function mono_reflection_get_type_with_rootimage and use
7401 the rootimage to resolve the types instead of the current image
7403 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
7405 * culture-info-table.h: Forgot to update after r78304.
7407 2007-07-13 Raja R Harinath <rharinath@novell.com>
7409 * class.c (mono_class_is_open_constructed_type)
7410 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
7412 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
7414 * class.c (mono_bounded_array_class_get): method fails if used with
7415 an incomplete TypeBuilder enum (no basetype field), fixed it by
7416 avoiding calculating the size for such array as it cannot be instantiated.
7419 2007-07-12 Raja R Harinath <rharinath@novell.com>
7421 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
7423 * metadata.c, reflection.c: Update to changes.
7425 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
7427 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
7428 mono_class_is_valid_enum, they are used to valide a enum when loading.
7429 * reflection.c: used new functions to throw TypeLoadException when and
7430 invalid enum is build with TypeBuilder. Fixes #82018
7432 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
7434 * object.c: forgot commit of mono_class_setup_methods () to access
7436 * object-internals.h: added a few more handy fields to
7439 2007-07-11 Zoltan Varga <vargaz@gmail.com>
7441 * object.c (build_imt): Call mono_class_setup_methods () before accessing
7444 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
7446 * class-internals.h, object-internals.h, object.c: IMT-based
7447 interface invocation core from Massimiliano Mantione
7448 (massi@ximian.com) with a reworked arch-specific interface,
7449 bsearch implementation and a few bugfixes and memory savings by me.
7451 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
7453 * class.c (mono_class_create_from_typedef): mono would segfault if
7454 an enum did not have a __value field. It now throws a TypeLoadException
7455 for such cases. Fix bug #82022
7457 2007-07-10 Zoltan Varga <vargaz@gmail.com>
7459 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
7461 2007-07-09 Mark Probst <mark.probst@gmail.com>
7463 * class.c (mono_class_init): If a class is already inited but has
7464 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
7466 2007-07-09 Mark Probst <mark.probst@gmail.com>
7468 * class.c: Properly handle the case of an unimplemented interface
7469 method. Fixes: 81673.
7471 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
7473 * class-internals.h, object.c: cleanup patch from massi: use
7474 MonoVTable->interface_bitmap since the vtable interfaces offset array
7477 2007-07-10 Zoltan Varga <vargaz@gmail.com>
7479 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
7480 GetMDStreamVersion icall instead.
7482 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
7484 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
7485 not use mono_dl_build_path() with a full library name: makes
7486 fallbacks to libgaim and libfam work.
7488 2007-07-06 William Holmes <billholmes54@gmail.com>
7490 * assembly.c: Added a continue statement in probe_for_partial_name when
7491 parse_assembly_directory_name fails. Fixes : 82002
7493 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
7495 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
7496 and added a verification for TYPEDBYREF.
7497 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
7498 make native int interchangeable with int32 and some small cleanup and formating.
7499 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
7500 handle byref of byref.
7501 * verify.c (push_local): handle byref of byref.
7502 * verify.c (do_binop): invalid mix of values is unverifiable
7503 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
7504 added visibility checks
7505 * verify.c (field related method): added visibility checks
7506 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
7508 2007-07-06 Zoltan Varga <vargaz@gmail.com>
7510 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
7513 2007-07-05 Zoltan Varga <vargaz@gmail.com>
7515 * profiler.c (mono_profiler_load): Fix an off-by-one error.
7517 * marshal.c (emit_marshal_string): When returning a string from managed code,
7518 allways make a copy even for unicode strings. Fixes #81990.
7520 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
7522 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
7523 of byref generic inst types (bug #81997).
7525 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
7527 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
7528 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
7530 2007-07-02 Zoltan Varga <vargaz@gmail.com>
7532 * marshal.c (emit_marshal_string): Add support for unicode strings in
7533 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
7535 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
7537 * verify.c: field load/store are now verified, missing only access checks now
7539 2007-06-28 Martin Baulig <martin@ximian.com>
7541 * mono-debug.c (mono_debug_debugger_version): New public variable.
7543 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
7545 * locales.c: When constructing DateTimeFormat or NumberFormat for
7546 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
7547 MonoCultureInfo contructed from the current locale is always
7548 read-only and has UseUserOverride set to true. All MonoCultureInfo
7549 instances returned for GetCultures have both IsReadOnly and
7550 UseUserOverride set to true. Fixes part of bug #81930.
7552 2007-06-22 Jonathan Chambers <joncham@gmail.com>
7554 * icall-def.h: Update System.__ComObject icalls
7555 * marshal.c: Avoid managed transition (and object creation)
7556 when looking up COM interface in RCW.
7559 Code is contributed under MIT/X11 license.
7561 2007-06-22 Zoltan Varga <vargaz@gmail.com>
7563 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
7564 to avoid crashes during assembly unloading.
7566 2007-06-22 Raja R Harinath <rharinath@novell.com>
7568 Fix MethodInfo.IsGenericMethodDefinition
7569 * reflection.c (mono_reflection_bind_generic_method_parameters):
7570 Rearrange code to ensure we always uses a generic method definition.
7571 * class.c (mono_class_inflate_generic_method_full): Set
7572 'generic_container' field only for generic method definitions.
7573 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
7574 Use presense of 'generic_container' field as indication of being a
7575 generic method definition.
7577 2007-06-21 Zoltan Varga <vargaz@gmail.com>
7579 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7581 * object-internals.h: Reflect changes in the layout of the managed Delegate
7584 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
7585 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
7586 runtime memory used by the dynamic method. Fixes #77146.
7588 2007-06-21 Dick Porter <dick@ximian.com>
7591 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
7592 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
7595 2007-06-21 Raja R Harinath <rharinath@novell.com>
7597 * reflection.c (method_encode_methodspec): Add a tripwire.
7598 * class.c (inflate_generic_type): The fully open generic type is
7599 not the same as the generic type definition.
7601 2007-06-21 Martin Baulig <martin@ximian.com>
7603 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
7605 * mono-debug-debugger.h
7606 (MonoDebuggerBreakpointInfo): Removed.
7607 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
7608 (mono_debugger_remove_breakpoint): Likewise.
7609 (mono_debugger_breakpoint_callback): Likewise.
7610 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
7612 2007-06-21 Raja R Harinath <rharinath@novell.com>
7614 * metadata.c (mono_metadata_lookup_generic_class): The fully open
7615 generic type is not the same as the generic type definition.
7616 * class.c (mono_generic_class_get_class): Likewise.
7618 2007-06-20 Geoff Norton <gnorton@customerdna.com>
7620 * icall.c: The second argument to
7621 System.Reflection.MethodBase.GetMethodFromHandleInternalType
7622 is a MonoType not a MonoClass.
7624 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
7626 * verify.c: support for function pointers in the verifier
7628 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
7630 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
7632 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7634 * assembly.c: removed Mono.Data.SqliteClient from the list of
7635 forward-compatible assemblies as it breaks the ABI (bug #81899).
7637 2007-06-19 Raja R Harinath <rharinath@novell.com>
7639 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
7640 lookup/update with the loader lock.
7641 * reflection.c (mono_class_bind_generic_parameters): No need to
7642 protect mono_metadata_lookup_* with the loader lock.
7643 * class.c (inflate_generic_type): Likewise.
7645 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
7646 on a generic instantiated type.
7648 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
7650 *verify.c: produce meanfull error messages on verification error
7651 *verify.c: fixed some cases of verification errors reported as validation errors
7652 *pedump.c: fixed the error name array, now it shows validation errors properly
7653 *verify.h: fixed the contant that should be used for verification errors
7655 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
7657 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
7658 for bug #77596, 81858 and 80743 (generics data structures on domain
7661 2007-06-15 Raja R Harinath <rharinath@novell.com>
7663 Avoid allocating 'MonoGenericContext' on the heap.
7664 * class-internals (_MonoMethodInflated::context): Make field
7665 inline, not a pointer.
7666 * loader.c (method_from_methodspec): Allocate 'new_context' on the
7667 stack. Use the context embedded within the inflated method as the
7668 hash key, rather than 'new_context'.
7669 * class.c (inflate_generic_context): Simplify. Return a struct
7670 rather than allocating on the heap.
7671 (mono_class_inflate_generic_method_full): Update to changes. Now,
7672 doesn't salt away a copy of the context -- simplifying the
7673 lifetime rules of a 'MonoGenericContext *'.
7674 (mono_method_get_context): Return pointer to embedded context.
7675 (setup_generic_array_ifaces): Allocate temporary context on stack.
7676 * reflection.c (inflate_mono_method): Likewise.
7677 (mono_reflection_bind_generic_method_parameters): Likewise.
7678 Use the context embedded within the inflated method as the hash key.
7680 Avoid a source of allocation of 'MonoGenericContext'.
7681 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
7682 and 'cached_context' fields into embedded 'MonoGenericContext' field.
7683 * class.c: Update to changes.
7684 (mono_generic_class_get_context): Simplify drastically. Now just
7685 returns a pointer to the field.
7686 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
7687 argument as a const pointer.
7688 (mono_metadata_generic_context_equal): Likewise.
7689 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
7692 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
7694 * verify.c improved the handling of brtrue/brfalse, factored out common code
7696 2007-06-14 Raja R Harinath <rharinath@novell.com>
7698 Kill MonoGenericMethod.
7699 * class-internals.h (MonoGenericContext::method_inst): Rename from
7700 'gmethod' and convert to a MonoGenericInst.
7701 (MonoGenericMethod): Remove.
7702 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
7703 * loader.c (method_from_methodspec): Update to changes. Use a
7704 MonoGenericContext as the key to the hashtable.
7705 * metadata.c (mono_metadata_generic_context_equal): Rename from
7706 'mono_metadata_generic_method_equal' and take MonoGenericContext.
7707 (mono_metadata_generic_context_hash): Likewise from
7708 'mono_metadata_generic_method_hash'. Change hash function.
7709 (mono_metadata_load_generic_params): Update to changes.
7710 (mono_get_shared_generic_method): Remove.
7711 * metadata-internals.h (mono_get_shared_generic_method): Remove.
7712 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
7713 (inflate_generic_context): Likewise.
7714 (mono_class_inflate_generic_method_full): Likewise.
7715 (setup_generic_array_ifaces): Likewise.
7716 (mono_class_create_from_typespec): Likewise.
7717 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
7718 (method_encode_methodspec): Update callsite.
7719 (reflection_methodbuilder_to_mono_method): Update to changes.
7720 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
7721 MonoGenericContext as the key to the hashtable.
7722 (inflate_mono_method): Update to changes.
7724 * class-internals.h (MonoGenericMethod::container): Remove.
7725 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
7727 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7729 * profiler-private.h, profiler.c, profiler.h: added API to profile
7732 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
7734 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
7736 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
7738 * verify.c: method invocation is now validated, now we verify parameter types on stack.
7739 Fixed overflow and underflow not aborting the verification process.
7741 2007-06-13 Mark Probst <mark.probst@gmail.com>
7743 * class-internals.h (MonoStats): Added stats entries for dynamic
7746 2007-06-12 Zoltan Varga <vargaz@gmail.com>
7748 * loader.c (mono_free_method): Free header->locals and header->clauses.
7750 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
7753 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
7755 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
7757 2007-06-12 Raja R Harinath <rharinath@novell.com>
7759 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
7762 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
7764 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
7766 2007-06-11 Raja R Harinath <harinath@gmail.com>
7768 MonoGenericMethod on a diet
7769 * class-internals.h (_MonoMethodInflated::reflection_info): Move
7771 (_MonoGenericMethod::reflection_info): ... from here.
7772 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
7774 * reflection.c (inflate_mono_method): Likewise.
7775 (mono_reflection_bind_generic_method_parameters): Likewise.
7777 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
7779 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
7780 *verify.c: factored long ldarg forms to share code with short forms
7782 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
7784 *verify.c: fixed code formating factored some duplicate code
7787 *verify.h: fixed binary incompatibility introduced earlier
7789 *pedump.c: fixed formating
7791 2007-06-11 Raja R Harinath <harinath@gmail.com>
7793 Fix assertion when disassembling Mono.C5.dll
7794 * loader.c (method_from_methodspec): Avoid inflating a method
7795 twice with the same context. If the methodref is inflated, use
7796 the declaring method instead.
7798 * class.c (mono_class_from_generic_parameter): Fix case similar to
7799 bug #81830 handled below, but for method containers.
7801 2007-06-10 Raja R Harinath <harinath@gmail.com>
7803 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
7804 get_shared_generic_class. Directly inflate the instance.
7805 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
7806 (inflate_generic_class): Delete.
7807 (get_shared_generic_class): Delete. Move setting of
7808 'cached_class' and 'cached_context' ...
7809 * metadata.c (mono_metadata_lookup_generic_class): ... here.
7811 * metadata.c (mono_metadata_lookup_generic_class): Change
7812 signature to take the components of a MonoGenericClass rather than
7813 an allocated MonoGenericClass. Change semantics to be intern-like.
7814 * reflection.c (mono_class_bind_generic_parameters): Update to
7815 changes. Make locking region tighter.
7816 * class.c (inflate_generic_class): Update to changes.
7817 (get_shared_generic_class): Likewise.
7818 * metadata-internals.h: Likewise.
7820 * reflection.c (mono_class_bind_generic_parameters): Take and
7821 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
7822 (mono_reflection_bind_generic_parameters): Use
7823 'mono_class_bind_generic_parameters' rather than duplicate the code.
7824 * class.c (mono_bounded_array_class_get): Update to changes.
7825 * object-internals.h: Likewise.
7827 * reflection.c (mono_class_bind_generic_parameters): Only support
7828 parameterizing generic type definitions. Remove support for other
7831 2007-06-08 Zoltan Varga <vargaz@gmail.com>
7833 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
7835 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
7836 in the dynamic case.
7838 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
7840 * threads.c: When cleaning up thread, reset the Background bit.
7843 2007-06-08 Jonathan Chambers <joncham@gmail.com>
7845 * metadata.c: Move variable declarations to top of scope.
7846 * verify.c: Move variable declarations to top of scope.
7848 Code is contributed under MIT/X11 license.
7850 2007-06-08 Raja R Harinath <rharinath@novell.com>
7852 * reflection.c (mono_class_bind_generic_parameters): Replace
7853 open-coded loop with mono_metadata_inflate_generic_inst.
7855 * class.c (get_shared_generic_class): Don't call
7856 mono_get_shared_generic_inst. Use the container's own
7859 * metadata.c (mono_metadata_load_generic_params): Move
7860 initialization of 'context' field here from ...
7861 * class.c (mono_class_create_from_typedef): ... here, and ...
7862 * loader.c (mono_get_method_from_token): ... here.
7864 * class.c (get_shared_generic_class): Rename from
7865 mono_get_shared_generic_class and make static.
7866 (mono_get_shared_generic_inst): Move to metadata.c.
7867 * loader.c (mono_get_shared_generic_method): Likewise.
7868 * class-internals.h, metadata-internals.h: Update to changes.
7871 * class.c (mono_class_from_generic_parameter): Don't assume a
7872 generic container owner exists. Generic containers from monodis
7875 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
7877 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
7878 * verify.h: new typedefs to returns the non-verifiable status
7879 * verify.c: initial implementation of generics, stack merging and object compatibility check
7881 2007-06-06 Mark Probst <mark.probst@gmail.com>
7883 * class.c, image.c, class-internals.h (MonoImage): class_cache is
7884 a MonoInternalHashTable again (fixed bug in internal hash table
7887 2007-06-06 Mark Probst <mark.probst@gmail.com>
7889 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
7890 MonoInternalHashTable again (fixed bug in internal hash table
7893 2007-06-06 Mark Probst <mark.probst@gmail.com>
7895 * class.c, image.c, class-internals.h, domain.c,
7896 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
7897 changes. Have to figure out what makes them break the SWF
7900 2007-06-04 Mark Probst <mark.probst@gmail.com>
7902 * class.c, image.c, class-internals.h (MonoImage): class_cache is
7903 a MonoInternalHashTable now.
7905 2007-06-04 Mark Probst <mark.probst@gmail.com>
7907 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
7908 MonoInternalHashTable now.
7910 2007-05-31 Zoltan Varga <vargaz@gmail.com>
7912 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
7915 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
7917 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
7918 dependent trampoline.
7920 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7922 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
7924 2007-05-29 Robert Jordan <robertj@gmx.net>
7926 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
7928 2007-05-28 Zoltan Varga <vargaz@gmail.com>
7930 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
7932 2007-05-25 Jonathan Chambers <joncham@gmail.com>
7934 * marshal.c: Fix interface lookup loops for
7935 cominterop_get_com_slot_for_method and
7936 cominterop_get_method_interface. Only need to lookup
7937 if type is a class, else use interface type method is on.
7939 Code is contributed under MIT/X11 license.
7941 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
7943 * reflection.c: HasSecurity can be present even if no specially
7944 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
7945 SecurityAttribute). Fix CAS regression tests on buildbot.
7947 2007-05-24 Jonathan Chambers <joncham@gmail.com>
7949 * appdomain.c: Add configure checks for header files.
7950 * image.c: Add configure checks for header files.
7951 * file-io.c: Add configure checks for header files.
7952 * debug-mono-symfile.c: Add configure checks for header files.
7953 * threadpool.c: Add configure checks for header files.
7954 * console-io.c: Add configure checks for header files.
7955 * profiler.c: Add configure checks for header files.
7956 * rawbuffer.c: Add configure checks for header files.
7957 * icall.c: Add configure checks for header files.
7958 * rand.c: Add configure checks for header files.
7959 * socket-io.c: Add configure checks for header files.
7961 Code is contributed under MIT/X11 license.
7963 2007-05-24 Zoltan Varga <vargaz@gmail.com>
7965 * reflection.c (mono_custom_attrs_from_builders): Remove the
7966 assertion as it breaks the build.
7968 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
7970 * reflection.c (lookup_custom_attr): Make a copy here too.
7972 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
7975 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
7978 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
7981 2007-05-22 Zoltan Varga <vargaz@gmail.com>
7983 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
7984 (load_cattr_value): Ditto.
7986 2007-05-20 Zoltan Varga <vargaz@gmail.com>
7988 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
7990 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
7992 * threads.c: In "start_wrapper", set apartment_state to MTA if
7993 apartment_state is Unknown and we're running on 2.0 profile or
7995 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
7996 to main method, then set apartment_state to Unknown on 1.0 profile,
7997 and MTA on 2.0 profile.
7999 2007-05-16 Jb Evain <jb@nurv.fr>
8001 * class-internals.h (MonoDefaults): Add an attribute_class and
8002 customattribute_data_class.
8003 * domain.c (mono_init_internal): Populate them.
8004 * reflection.c: Use them to remove duplicates. Make a vew
8005 MonoClass variables `static'.
8007 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8009 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
8010 step in implementing IMT, so that all isinst checks now can go
8012 This was needed because vtables for TransparentProxy need to look
8013 like the vtable of the "target" class, so they need to point to
8014 its interface bitmap directly.
8016 * object.c: inside "mono_class_create_runtime_vtable" and
8017 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
8019 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
8021 * object-internals.h
8022 culture-info.h : added territory field in MonoCulture and
8023 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
8024 * locales.c : fill territory field above too.
8025 * culture-info-table.h : regenerated.
8027 2007-05-12 Zoltan Varga <vargaz@gmail.com>
8029 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
8032 2007-05-11 Jonathan Chambers <joncham@gmail.com>
8034 * object.c: Always initialize apartment, even if
8035 there is no custom attributes on entry point.
8037 Code is contributed under MIT/X11 license.
8039 2007-05-10 Jonathan Chambers <joncham@gmail.com>
8041 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
8042 * metadata.c: If no encoding is set, check for unicode
8045 Code is contributed under MIT/X11 license.
8047 2007-05-09 Jonathan Chambers <joncham@gmail.com>
8049 * threads.c: Handle if mono_thread_current returns NULL
8051 Code is contributed under MIT/X11 license.
8053 2007-05-09 Jonathan Chambers <joncham@gmail.com>
8055 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
8056 in start_wrapper. Added mono_thread_init_apartment_state and
8057 mono_thread_cleanup_apartment_state.
8058 * object.c: Initialize thread apartment state on main thread
8059 by checking for STAThreadAttribute on entry point.
8060 * object-internals.h: Add apartment_state field to MonoThread.
8061 * threads-types.h: Add unmanaged definition of
8062 System.Threading.ApartmentState, MonoThreadApartmentState.
8064 Code is contributed under MIT/X11 license.
8066 2007-05-08 Jonathan Chambers <joncham@gmail.com>
8068 * class.c: Fix windows build.
8069 * class-internals.h: Fix windows build.
8071 Code is contributed under MIT/X11 license.
8073 2007-05-08 Robert Jordan <robertj@gmx.net>
8075 * process.c (CreateProcess_internal):
8076 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
8077 .CreateNoWindow was specified. Fixes #81496.
8079 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8081 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
8082 step in implementing IMT, replaced it with two compact arrays
8083 (interfaces_packed and interface_offsets_packed) and a bitmap that
8084 is used for isinst checks (interface_bitmap).
8086 * class.c: (compare_interface_ids): compare function to pass to
8087 bsearch when looking for an interface with a given id.
8088 (mono_class_interface_offset): reimplemented using bsearch on
8089 interfaces_packed, getting the offset from interface_offsets_packed.
8090 (print_implemented_interfaces): utility debugging function.
8091 (setup_interface_offsets): reworked to initialize interfaces_packed,
8092 interface_offsets_packed and interface_bitmap.
8094 * object.c: replaced all accesses to "MonoClass.interface_offsets"
8095 with uses of interfaces_packed and interface_offsets_packed.
8097 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8099 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
8100 mono_class_interface_offset prototype to wrap all accesses to
8101 "MonoClass.interface_offsets".
8103 * class.c: Implemented mono_class_interface_offset, and wrapped all
8104 accesses to "MonoClass.interface_offsets".
8106 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
8107 "MonoClass.interface_offsets".
8109 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
8111 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
8112 GetMethodFromHandle overloads (bug #78637).
8114 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8116 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
8117 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
8119 2007-05-01 Zoltan Varga <vargaz@gmail.com>
8121 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
8124 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
8126 (mono_custom_attrs_from_index): Ditto.
8128 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
8131 2007-04-30 Zoltan Varga <vargaz@gmail.com>
8133 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
8134 is now allocated from a mempool.
8136 2007-04-28 Zoltan Varga <vargaz@gmail.com>
8138 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
8139 caller holds threads_lock, leading to deadlocks. Fixes #81476.
8141 2007-04-26 Zoltan Varga <vargaz@gmail.com>
8143 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
8144 mono_loader_clear_error () too late. Fixes #81463.
8146 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
8148 * culture-info-table.h : regenerated.
8150 2007-04-25 Zoltan Varga <vargaz@gmail.com>
8152 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
8155 2007-04-25 Dick Porter <dick@ximian.com>
8157 * Makefile.am: Put the mingw enforced-optimisation back into the
8158 PLATFORM_WIN32 section.
8160 2007-04-24 Zoltan Varga <vargaz@gmail.com>
8162 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
8165 * image.c (mono_image_load_module): New API function to load a module reference.
8167 * image.c (load_modules): Load modules lazily. Fixes #80812.
8169 * class.c (mono_class_from_typeref): Use mono_image_load_module.
8171 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
8173 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
8174 to mono_image_load_module_dynamic.
8176 2007-04-23 Jonathan Chambers <joncham@gmail.com>
8178 * marshal.c: Fix calling convention for CCW on non-windows
8179 platforms. STDCALL on windows, CDECL everywhere else to work
8180 with XPCOM and MainWin COM.
8182 Code is contributed under MIT/X11 license.
8184 2007-04-23 Martin Baulig <martin@ximian.com>
8189 (method_from_memberref): Added `gboolean *used_context' argument.
8190 (mono_get_method_from_token): Likewise.
8191 (mono_get_method_full): Don't insert the method in the cache when
8192 `used_context' is true.
8194 2007-04-23 Raja R Harinath <rharinath@novell.com>
8196 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
8198 * reflection.c (mono_reflection_bind_generic_parameters): Don't
8199 create new MonoTypes for returned types.
8200 * class.c (mono_generic_class_get_class): Export mono-internal.
8201 * class-internals.h: Update to changes.
8203 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
8205 * threadpool.c, threadpool.h, icall-def.h: patch from
8206 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
8208 2007-04-18 Zoltan Varga <vargaz@gmail.com>
8210 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
8212 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
8214 * threads.c (mono_thread_get_stack_bounds): New helper function.
8216 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
8217 Correctly compute stack bounds when attaching. Fixes #81394.
8219 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
8221 * reflection.c: fix handling of doubles in custom attributes
8222 for the arm-fpa format (bug #81368).
8224 2007-04-18 Raja R Harinath <rharinath@novell.com>
8226 * reflection.c (assembly_add_win32_resources): Mildly relax an
8227 bounds check to let the end pointer point just past the end of the
8228 allocated buffer. (may fix #81384)
8230 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
8232 * culture-info-table.h : regenerated.
8234 2007-04-07 Zoltan Varga <vargaz@gmail.com>
8236 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
8237 the thread is aborted early.
8239 2007-04-05 Dick Porter <dick@ximian.com>
8241 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
8242 FindFirstFile()/FindNextFile() to find entries. This lets the
8243 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
8246 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
8248 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
8250 2007-04-04 Martin Baulig <martin@ximian.com>
8253 (mono_method_desc_full_match): Add support for nested classes.
8255 2007-04-02 Zoltan Varga <vargaz@gmail.com>
8257 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
8259 2007-04-01 Zoltan Varga <vargaz@gmail.com>
8261 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
8262 waiting for too many threads.
8264 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
8266 * environment.c: Fix return value check on uname so we can get the
8267 executing version on Solaris operating systems.
8269 2007-03-28 Jb Evain <jbevain@gmail.com>
8271 * class.c (mono_type_get_name_recurse): Complete the
8272 fix for the creation of assembly qualified names for
8273 pointer types. Fixes #81208.
8275 2007-03-27 Dick Porter <dick@ximian.com>
8277 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
8278 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
8282 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
8283 the value of ReleaseMutex().
8285 2007-03-27 Dick Porter <dick@ximian.com>
8287 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
8288 in little-endian order, not network endian, so must be converted
8289 to host endian here. Fixes bug 80593.
8291 2007-03-22 Jb Evain <jbevain@gmail.com>
8293 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
8294 qualified names for pointer types. Fixes #81208.
8296 2007-03-21 Jonathan Chambers <joncham@gmail.com>
8298 * marshal.c: Add support for PreserveSigAttribute.
8300 Code is contributed under MIT/X11 license.
8302 2007-03-14 Zoltan Varga <vargaz@gmail.com>
8304 * process.c: Fix endianness issues. Fixes #81126.
8306 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
8307 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
8309 * image.c (mono_image_lookup_resource): Make this work on big-endian
8310 machines.Change API contract so the caller needs to free the return value.
8312 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
8315 2007-03-14 Martin Baulig <martin@ximian.com>
8317 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
8318 mono_type_get_desc() as well.
8320 2007-03-13 Jonathan Chambers <joncham@gmail.com>
8322 * icall.c: Fix environ access in VS.
8324 2007-03-13 Alp Toker <alp@atoker.com>
8326 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
8327 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
8330 2007-03-12 Zoltan Varga <vargaz@gmail.com>
8332 * reflection.c (mono_reflection_create_dynamic_method): Add support for
8333 circular references among dynamic methods. Fixes #81091.
8335 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
8337 2007-03-09 Martin Baulig <martin@ximian.com>
8339 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
8341 2007-03-09 Jonathan Chambers <joncham@gmail.com>
8343 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
8344 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
8346 Code is contributed under MIT/X11 license.
8348 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
8350 * loader.c: Reapply patch for bug #79424.
8352 2007-03-06 Zoltan Varga <vargaz@gmail.com>
8354 * metadata.c (mono_type_to_unmanaged): Only convert object to
8355 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
8357 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
8359 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
8360 (and incorrectly set) is_reference field from MonoGenericInst.
8362 2007-03-06 Zoltan Varga <vargaz@gmail.com>
8364 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
8367 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
8369 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
8371 2007-03-05 Miguel de Icaza <miguel@novell.com>
8373 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
8374 FileOptions.1 value to mean "temporary", map that to
8375 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
8379 2007-03-03 Marek Habersack <mhabersack@novell.com>
8381 * appdomain.c: implement MS .Net style shadow copying. Copies of
8382 the assemblies are made in a subdirectory of the dynamic base
8383 directory, the assembly names are preserved.
8384 Copy .mdb and .config files along with the assemblies being shadowed.
8386 2007-02-28 Zoltan Varga <vargaz@gmail.com>
8388 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
8389 (emit_marshal_handleref): Ditto.
8391 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
8392 on Visual C++. Fixes #80671.
8394 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
8396 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
8397 for clone operations.
8399 2007-02-28 Zoltan Varga <vargaz@gmail.com>
8401 * marshal.c: Fix warnings.
8403 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
8405 * loader.c: allow case-insensitive matching of the dll name
8406 in dllmap handling when prefixed with "i:".
8408 2007-02-20 Jonathan Chambers <joncham@gmail.com>
8410 * threads.c: Fix #ifdef for dummy_apc function for VS.
8412 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
8414 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
8416 2007-02-19 Massimiliano Mantione <massi@ximian.com>
8417 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
8418 giving precedence to the methods with a fully qualified name
8419 (InterfaceName.MethodName) when building the interface sections
8422 2007-02-16 Dick Porter <dick@ximian.com>
8424 * threadpool.c (append_job): Fix fast-path array handling, so it's
8425 less likely the array will grow exponentially when the load is
8428 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
8430 * metadata-internals.h, loader.c: fix dllmap lookup order
8431 for non-function maps, too, and prepare for fallback code.
8433 2007-02-12 Robert Jordan <robertj@gmx.net>
8435 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
8436 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
8437 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
8438 GlobalFree. Fixes a part of bug #77075.
8440 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
8442 * loader.c: implemented typedef parent in field memberref.
8444 2007-02-11 Jonathan Chambers <joncham@gmail.com>
8446 * marshal.c: Fix warnings and remember to call Release on
8449 Code is contributed under MIT/X11 license.
8451 2007-02-10 Miguel de Icaza <miguel@novell.com>
8453 * class-internals.h: Add MonoHandleRef definition, and
8454 handleref_class to mono_defaults.
8456 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
8457 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
8459 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
8460 (do nothing on this stage)
8461 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
8462 (emit_marshal_handleref): New method, used for argument handling
8465 2007-02-08 Jonathan Chambers <joncham@gmail.com>
8467 * class.c (mono_class_setup_parent): Lazily init com types.
8468 * domain.c (mono_init_internal, mono_init_com_types): Lazily
8470 * object.c (mono_remote_class_vtable): Lazily init com types.
8471 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
8472 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
8473 * domain-internals.h: Expose mono_init_com_types.
8474 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
8475 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
8476 Add support for COM Callable Wrapper marshalling.
8477 * marshal.h: Add icall definitions.
8478 * gc.c: Handle freeing of CCWs in finalizer code.
8480 Code is contributed under MIT/X11 license.
8482 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
8484 * reflection.c: changed all the signature encoding code to use
8485 a variable-sized buffer.
8487 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8489 * marshal.c: locking fixes: never take the loader lock
8490 or other runtime locks when holding the marshal lock
8493 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
8495 * marshal.c: make the delegate function pointer mapping
8496 work for the moving GC.
8498 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
8500 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
8503 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8505 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
8508 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
8510 * threadpool.c: made the code moving-GC safe.
8512 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
8514 * assembly.c, boehm-gc.c, class-internals.h, class.c,
8515 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
8516 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
8518 * reflection.c: warning cleanup, some threading and moving GC fixes.
8520 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
8522 * class.c, loader.c: create the needed Set/Get/Address array methods
8523 as well as the .ctors in mono_class_init (), fixes bug #80567.
8525 2007-01-24 Zoltan Varga <vargaz@gmail.com>
8527 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
8528 we doesn't decrease its alignment. Should fix the sparc build.
8530 2007-01-24 Dick Porter <dick@ximian.com>
8533 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8534 Create the returned object if we need to ignore an unsupported
8535 socket option. Fixes a segfault reported by Atsushi.
8537 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
8539 * class.c, object.c: restrict GC-tracked fields to
8540 UIntPtr fields used inside corlib, so we provide better
8541 type info to the GC and also allow broken packing as in
8544 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
8546 * sgen-gc.c: removed duplicated function.
8548 2007-01-19 Miguel de Icaza <miguel@novell.com>
8550 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
8551 value that means that the value is not supported, but that we
8552 should not return a failure, but instead report this as a
8553 successful operation.
8555 2007-01-19 Raja R Harinath <rharinath@novell.com>
8557 Fix tests/bug79956.2.il
8558 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
8559 (mono_generic_class_get_class): If the generic definition in an
8560 enum, copy over other fields related to it.
8562 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8564 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
8565 genericinst enums (bug #79215).
8567 2007-01-17 Massimiliano Mantione <massi@ximian.com>
8568 * class.c: Fix bug 80307.
8570 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
8572 * image.c: if the file table is not present, try to load
8573 all the modules, since we don't have info about them
8574 having or not metadata (bug #80517).
8575 * assembly.c: allow mono_assembly_load_references () to
8576 work for netmodules.
8578 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
8580 * image.c, metadata-internals.h, object.c: execute module
8581 cctors when running on the 2 runtime if present (bug #80487).
8583 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
8585 * icall.c: optimized InitializeArray() on bigendian.
8587 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
8589 * icall.c: fix for the broken ARM FPA double format.
8591 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
8593 * icall.c: handle endian issues for r4 and r8 types, too, in
8594 the InitializeArray() icall.
8596 2007-01-15 Miguel de Icaza <miguel@novell.com>
8598 * loader.c (mono_loader_error_prepare_exception): Clear the error
8599 once we have extracted the information from it, do this before we
8600 call into the JIT's class loading mechanisms.
8602 * object.c (mono_class_create_runtime_vtable): Do not clear the
8603 loader error before calling mono_class_get_exception_for_failure
8604 as the loader error is needed inside
8605 mono_class_get_exception_for_failure to throw the error (thinko).
8609 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8611 * reflection.c: align fields rva data so it's faster to load at
8614 2007-01-12 Raja R Harinath <rharinath@novell.com>
8616 Prepare to simplify GenericMethod handling.
8617 * class-internals.h (mono_method_get_context): New accessor function.
8618 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
8619 rather than directly accessing '->context' field.
8621 * class-internals.h (_MonoGenericParam.method): Move ...
8622 (_MonoGenericContainer): ... here. Add into union with klass field.
8623 * class.c, icall.c, loader.c, metadata.c, reflection.c:
8626 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
8628 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
8629 the wrapper type enum and reduce relocations.
8631 2007-01-12 Raja R Harinath <rharinath@novell.com>
8633 * reflection.c (inflate_mono_method): Reuse method instantiation
8634 from the generic method, if available.
8636 2007-01-11 Jonathan Chambers <joncham@gmail.com>
8638 * marshal.c (emit_marshal_variant): Fix conv_arg
8639 type in last commit, based on whether parameter is byref.
8641 2007-01-11 Jonathan Chambers <joncham@gmail.com>
8643 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
8645 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
8646 MONO_TYPE_OBJECT back for VARIANT support.
8648 2007-01-11 Jonathan Chambers <joncham@gmail.com>
8650 * marshal.c, marshal.h, icall-def.h: Implement
8651 Marshal.ReAllocCoTaskMem.
8653 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
8655 * marshal.c: memory retention fixes: use the proper
8656 image cache for runtime_invoke method lookups.
8658 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8660 * mempool.c: added code to help debug mempool allocations.
8662 2007-01-11 Dick Porter <dick@ximian.com>
8664 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
8665 support (experimenting with faking it with IP_MTU_DISCOVER for
8666 systems that don't have IP_DONTFRAGMENT.)
8667 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
8670 * icall-def.h: new System.Net.Sockets.Disconnect icall.
8672 * socket-io.h: Add new fields to MonoSocketAsyncResult
8673 corresponding to the new ones in Socket.cs.
8675 2007-01-11 Raja R Harinath <rharinath@novell.com>
8677 Fix IronPython regression mentioned in #80249
8678 * metadata.c (do_mono_metadata_parse_generic_class): Clear
8679 'cached_context' field, since it may have been initialized as a
8680 side-effect of metadata parsing.
8682 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
8683 (_MonoGenericClass.cached_class): Move here and rename from lone
8684 remaining field of ...
8685 (_MonoInflatedGenericClass): ... this. Remove.
8686 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
8689 Fix mcs/tests/test-128.cs regression.
8690 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
8691 2007-01-10 change below.
8692 [MONO_TYPE_OBJECT]: Recurse into array case.
8694 2007-01-11 Raja R Harinath <harinath@gmail.com>
8696 * class-internals.h (mono_get_inflated_generic_class): Remove.
8697 * class.c (mono_get_inflated_generic_class): Remove.
8698 (mono_generic_class_get_class): Rename from
8699 mono_class_create_generic.
8700 (mono_class_from_mono_type) [GENERICINST]: Use it.
8701 * reflection.c, metadata.c: Update to changes. Use
8702 'mono_class_from_mono_type'.
8704 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8706 * reflection.c: use passed type when encoding an array element
8707 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
8709 2007-01-09 Robert Jordan <robertj@gmx.net>
8711 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
8712 result arguments (someDelegate.EndInvoke (unrelatedAres)).
8715 2007-01-09 Raja R Harinath <rharinath@novell.com>
8717 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
8719 * object.c (set_value): Avoid aliasing between type->data.klass
8720 and type->data.generic_class.
8722 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
8724 2007-01-08 Raja R Harinath <rharinath@novell.com>
8726 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
8727 between type->data.klass and type->data.generic_class.
8729 2007-01-08 Lluis Sanchez <lluis@ximian.com>
8731 * marshal.c: In MS.NET, StringBuilder objects are not copied by
8732 value in out parameters.
8734 2007-01-08 Raja R Harinath <rharinath@novell.com>
8736 Simplify invariant for MonoGenericClass::klass field.
8737 * class.c (mono_class_create_generic): Verify 'klass' is null.
8738 * metadata.c (do_mono_metadata_parse_generic_class): Don't
8739 initialize 'klass' field.
8741 2007-01-05 Raja R Harinath <rharinath@novell.com>
8743 Ongoing work to avoid redundant data and simplify invariants.
8744 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
8745 'generic_class', and change type to a GenericInst.
8746 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
8747 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
8749 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
8751 * class.c : skip io-layer under PLATFORM_WIN32.
8753 2007-01-03 Tor Lillqvist <tml@novell.com>
8755 Fix #80305: In a bundled executable, look in the bundled exe
8756 assembly to determine the runtime version. Add the possibility to
8757 bundle also the machine.config file.
8759 * assembly.c (mono_assembly_open_from_bundle): Make
8760 non-static. Allow being called even if we have no bundled
8761 assemblies, and return NULL right away in that case.
8763 * domain-internals.h: Declare mono_assembly_open_from_bundle()
8766 * domain.c (app_config_parse): Take an assembly exe file name as
8767 parameter instead of a config file name. Check for a bundled
8768 config file for that assembly by calling
8769 mono_config_string_for_assembly_file() (see below) before looking
8770 for one in the file system.
8771 (get_runtimes_from_exe): Corrsponding change to call of
8773 (get_runtimes_from_exe): Check for bundled assembly exe file first
8774 by calling mono_assembly_open_from_bundle(). If no bundled
8775 assembly exe file is found, call mono_image_open() as before to
8776 look it up in the file system.
8778 * mono-config.c: Add variable bundled_machinec_onfig.
8779 (mono_config_string_for_assembly_file): New function.
8780 (mono_config_for_assembly): Move code snippet that looks for a
8781 bundled assembly .config file into the above new function. Call
8783 (mono_register_machine_config, mono_get_machine_config): New
8784 functions to set and retrieve
8786 * assembly.h: Declare mono_register_machine_config().
8788 * mono-config.h: Declare mono_get_machine_config() and
8789 mono_config_string_for_assembly_file().
8791 * icall.c: No declaration of environ necessary on Win32. It is
8792 declared (as a macro expanding to a function call) in stdlib.h.
8793 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
8794 New internal mono function. Returns the value of
8795 mono_get_machine_config() as a Mono string.
8797 * icall-def.h: Add get_bundled_machine_config().
8799 2007-01-04 Raja R Harinath <rharinath@novell.com>
8801 Remove redundant field
8802 * class-internals.h (_MonoGenericContext.container): Remove field.
8803 * loader.c (mono_method_get_signature_full): Don't parse a
8804 "container" for a signature parse when the signature is inflated
8806 (method_from_methodspec): Likewise, for a generic_inst.
8807 * class.c, metadata.c, reflection.c: Update to changes.
8809 2006-01-04 Raja R Harinath <rharinath@novell.com>
8811 * class-internals.h (_MonoGenericClass): Rename 'context' field to
8812 'cached_context', and change semantics -- it starts off NULL, and
8813 is initialized on demand.
8814 * class.c (mono_generic_class_get_context): New accessor to
8815 replace 'context' field accesses.
8816 (mono_class_get_context): New helper.
8817 (*): Update to changes.
8818 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
8820 2007-01-03 Miguel de Icaza <miguel@novell.com>
8822 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
8823 before the memcpy. Fixes Marshal2 regression.
8825 2007-01-02 Jb Evain <jbevain@gmail.com>
8827 * blob.h: add a MONO_TYPE_ENUM definition
8828 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
8829 fix the encoding of arrays of enums in custom attributes.
8833 2007-01-01 Miguel de Icaza <miguel@novell.com>
8835 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
8836 string is null terminated, but only cut the string short if it
8837 overflows the buffer.
8839 (mono_string_to_byvalstr): Also fix this routine. The code here
8840 was not properly terminating a string (it was only terminated
8841 because of the previous catch-all memset).
8843 I left the memset, because I do not know if applications expect
8844 the runtime to clear this region.
8848 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
8849 Clear the error before returning to unmanaged code to prevent the
8850 runtime from being confused later on (fixes 80420).
8851 (ves_icall_type_from_name): Always call mono_loader_clear_error
8852 after parsing a type that could have failed.
8853 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
8855 * loader.c (mono_loader_clear_error): Fix indentation.
8857 2006-12-28 Martin Baulig <martin@ximian.com>
8859 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
8861 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8863 * reflection.c: patch from Rolf Bjarne Kvinge to fix
8864 getting a token for an EnumBuilder.
8866 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
8868 * reflection.c: be more careful in case resource generation
8869 fails to create the data array.
8871 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8873 * sgen-gc.c: write barrier for clone and fix unregister handles.
8875 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8877 * reflection.c: some fixes needed in the generics code for the moving GC.
8879 2006-12-22 Robert Jordan <robertj@gmx.net>
8881 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
8882 account. Fixes bug #80299.
8884 2006-12-21 Raja R Harinath <rharinath@novell.com>
8886 Fix WaitHandle usage in delegates.
8887 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
8888 * object.c (mono_wait_handle_new): Use the property set method to
8889 initialize the handle.
8890 (mono_wait_handle_get_handle): New.
8891 * threadpool.c (mono_async_invoke): Use it.
8892 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
8894 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
8896 2006-12-21 Jonathan Chambers <joncham@gmail.com>
8898 * marshal.c (emit_marshal): Call emit_marshal_variant and
8899 emit_marshal_com_interface when applicable.
8900 (emit_marshal_variant, emit_marshal_com_interface): Add
8901 methods for this case and remove if's from emit_marshal_object.
8903 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
8905 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
8907 2006-12-19 Jonathan Chambers <joncham@gmail.com>
8909 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
8910 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
8911 and GlobalFree on Windows. Remove FIXME.
8913 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8915 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
8916 implementation for managed objects.
8918 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8920 * object.c: implemented code to be used for checking
8921 that no reference field overlaps with non-references.
8923 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8925 * threadpool.c: fix queue code to be compatible with the
8928 2006-12-18 Miguel de Icaza <miguel@novell.com>
8930 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
8931 in structures by throwing ArgumentNullException.
8933 (emit_marshal_safehandle): Also when they are null parameters.
8935 (emit_marshal_safehandle): Add support for ref
8936 SafeHandles parameters
8938 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8940 * profiler.c: updated to use the mono-dl API instead of
8943 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8945 * profiler.c: updated to use the mono-dl dynamic loading
8946 API instead of gmodule.
8948 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8950 * profiler.c: use readlink, older versions of glib don't have
8951 g_file_read_link ().
8953 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
8955 * profiler.c: try to detect the path to mono if libc fails to provide
8956 a useful name (bug #80286).
8958 2006-12-16 Raja R Harinath <rharinath@novell.com>
8961 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
8962 instance, use the generic type definition instead.
8963 (ves_icall_Type_GetNestedTypes): Likewise.
8964 * class.c (mono_class_create_generic): Always set the
8965 nested_classes of a generic instance to NULL, even if the generic
8966 type definition has nested types.
8968 2006-12-15 Jonathan Chambers <joncham@gmail.com>
8970 * marshal.c (mono_string_from_bstr): Revert previous Windows change
8973 2006-12-15 Miguel de Icaza <miguel@novell.com>
8975 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
8976 my arguments were in the wrong order. I also fixed the Windows
8977 version which seems to have had the same issue.
8979 (mono_free_bstr): On Unix, this is g_free.
8980 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
8981 conversions (for the tests in corlib to pass).
8983 2006-12-14 Miguel de Icaza <miguel@novell.com>
8985 * marshal.c (emit_ptr_to_object_conv): For now, ignore
8986 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
8987 exception if a ref SafeHandle in a struct has changed).
8989 (emit_struct_conv): Do not perform layout checks for classes
8990 derived from SafeHandle, as those are specially handled.
8992 (emit_object_to_ptr_conv): Add support for
8993 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
8995 (emit_marshal_safehandle): Implement conversion of return values
8996 of safehandles (MARSHAL_ACTION_CONV_RESULT).
8998 * threads.c: WaitHandle now is compiled with two different handles
8999 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
9002 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
9003 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
9004 these routines to cope with both kinds of fields.
9006 2006-12-12 Miguel de Icaza <miguel@novell.com>
9008 * metadata.c (mono_type_to_unmanaged): Handle the case where
9009 type->data.klass is a SafeHandle, and in that case, return the
9010 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
9011 MONO_MARSHAL_CONV_SAFEHANDLE.
9013 2006-12-11 Miguel de Icaza <miguel@novell.com>
9015 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
9016 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
9017 calling emit_marshal_object.
9019 (emit_marshal_safehandle): Implement marshalling of
9020 SafeHandle parameters (no ref support yet).
9022 (MarshalAction): Document the defines as I implement
9023 them for SafeHandle.
9025 (emit_marshal_object): indentation police.
9027 * class-internals.h: Define MonoSafeHandle.
9028 Add safehandle_class to MonoDefaults type.
9030 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
9031 list of classes to check for fields.
9033 * domain.c (mono_init_internal): Add SafeHandle to the list of
9034 mono_defaults loaded.
9036 2006-12-15 Raja R Harinath <rharinath@novell.com>
9039 * reflection.c (mono_reflection_bind_generic_parameters): If the
9040 generic type definition is a type builder, ensure that it is fully
9041 initialized before instantiating it. Kill some dead code.
9043 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9045 * object.c: clear the loader_error () before loading
9046 more metadata stuff (bug #80258).
9048 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
9050 * icall.c, icall-defs.h: type modifiers icalls for
9051 parameters and properties.
9053 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9055 * object.c, icall.c: fixed warnings.
9057 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9059 * marshal.c: fixed a couple of leaks and coding style in a few places.
9061 2006-12-08 Dick Porter <dick@ximian.com>
9063 * process.c: Cope with NULL ProcessStartInfo arguments on windows
9064 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
9067 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9069 * process.c: ProcessStartInfo may have only filename set and
9070 arguments can be NULL.
9072 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
9074 * icall.c: fix leak found by Robert Jordan.
9076 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9078 * marshal.c, marshal.h: generate managed method to access an element
9079 of a multi-dimensional array.
9081 2006-11-30 Paolo Molaro (lupus@ximian.com)
9083 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
9085 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9087 * icall.c: back out GetFields () fix until the serialization code is
9088 fixed to not depend on the incorrect behaviour.
9090 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9092 * profiler.c: provide defaults if none are set.
9094 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9096 * Makefile.am, attrdefs.h: new public header file with
9097 constants for attributes for use by embedders.
9099 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9101 * icall.c: GetFields () fix for bug #80064.
9103 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
9105 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
9106 removed long unused icalls.
9108 2006-11-27 Jonathan Chambers <joncham@gmail.com>
9111 (mono_marshal_emit_managed_wrapper): Level of indirection for
9112 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
9113 can be generated without a delegate class.
9114 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
9116 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
9118 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9120 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
9123 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9125 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
9126 icall-def.h: added icalls needed by System.GC.
9128 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
9130 * loader.c: ensure the class in catch clauses is handled
9131 correctly for generics methods (fixes bug#79980).
9133 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9135 * monitor.h, monitor.c: added mono_locks_dump () function
9136 to help debug deadlocks involving managed locks.
9138 2006-11-13 Dick Porter <dick@ximian.com>
9140 * file-io.c (get_file_attributes): If the file is a symlink try
9141 and get the stat data for the target, but also add the
9142 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
9143 the specs for the windows symlink support, but will probably have
9144 to be reworked when I have test data from a vista machine. Fixes
9147 2006-11-13 Dick Porter <dick@ximian.com>
9149 * gc.c (mono_domain_finalize):
9150 * marshal.c (mono_delegate_begin_invoke):
9151 * threadpool.c (socket_io_init, mono_thread_pool_init)
9152 (mono_thread_pool_finish):
9153 * monitor.c (mono_monitor_try_enter_internal):
9154 * threads.c (mono_thread_resume, mono_thread_init)
9155 (mono_thread_suspend_all_other_threads)
9156 (mono_thread_execute_interruption):
9157 * appdomain.c (mono_domain_unload): Check for NULL error returns
9158 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
9161 2006-11-11 Miguel de Icaza <miguel@novell.com>
9164 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
9165 Only close the handle if the value of the handle is not
9166 INVALID_HANDLE_VALUE. This just makes the process a bit more
9169 Improvement for #75733, so that we do not run into this problem.
9172 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
9173 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
9174 internal variables. Fixes #79462
9177 2006-11-09 Dick Porter <dick@ximian.com>
9179 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
9180 Use poll() not select(). Fixes bug 79397.
9182 2006-11-09 Raja R Harinath <rharinath@novell.com>
9185 * assembly.c (mono_assembly_load_from_full): Check that the given
9186 image has an assembly manifest.
9188 2006-11-09 Ankit Jain <jankit@novell.com>
9190 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
9191 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
9192 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
9194 2006-11-07 Dick Porter <dick@ximian.com>
9196 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
9197 Put the old resolver behaviour back for pre-2.0 profiles.
9199 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
9201 * threadpool.c: precise GC and locking fixes.
9203 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9205 * class.c: don't load types that have an explicit unaligned
9206 managed reference. Provide better info in the TypeLoad exception.
9207 Part of the fix for bug #79744.
9208 * object.c: use the correct check for class type load issues.
9210 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9212 * class.c: enforce alignment of fields with managed references
9213 even when Pack=1 is forced by the user (bug #77788).
9215 2006-11-03 Dick Porter <dick@ximian.com>
9217 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
9218 If the address reverse lookup fails, return it as the hostname
9219 anyway. Fixes bug 79721.
9221 2006-11-03 Dick Porter <dick@ximian.com>
9223 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
9224 Fix build on Windows.
9226 2006-11-02 Dick Porter <dick@ximian.com>
9229 * object-internals.h:
9230 * exception.c (mono_get_exception_thread_interrupted):
9231 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
9234 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
9235 Check for pending Thread.Interrupt.
9237 2006-10-27 Massimiliano Mantione <massi@ximian.com>
9238 * loader.c: Fixed bug 79684.
9240 2006-10-27 Dick Porter <dick@ximian.com>
9242 * file-io.c (get_file_attributes): Force symlinks to directories
9243 to be returned as a regular file. Fixes bug 79733.
9244 2006-10-26 Dick Porter <dick@ximian.com>
9246 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
9247 CreateFile to open a directory then we need to set the
9248 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
9250 2006-10-23 Zoltan Varga <vargaz@gmail.com>
9252 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
9255 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
9257 * sgengc.c: small cleanup of timer code.
9259 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9261 * sgen-gc.c: fix some warnings and start adding support for
9262 complete object removal on domain unload.
9264 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
9266 * assembly.c: build_assembly_name should not consider a version
9267 number without build or revision number invalid. Fixes bug #79715.
9269 2006-10-18 Jonathan Chambers <joncham@gmail.com>
9271 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
9272 call kernel32 function OutputDebugString directly.
9274 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
9276 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
9278 * reflection.c: small cleanup, using a function to insert a MonoString
9281 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
9283 * reflection.c: moving GC fixes.
9285 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9287 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
9288 all the objects with finalizers belonging to an unloading appdomain.
9290 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9292 * sgen-gc.c: added ability to allocate even when the nursery is fully
9293 pinned and fixed a couple of bugs.
9295 2006-10-15 Zoltan Varga <vargaz@gmail.com>
9297 * threads.h: Revert the last change for now.
9299 * threads.h (mono_thread_get_pending_exception): Rename this to
9300 mono_thread_get_undeniable_exception ().
9302 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
9304 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
9305 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
9306 when fname does not refer to valid assembly. This result in a more
9307 meaningful error message.
9308 * exception.c: added mono_get_exception_bad_image_format2 which
9309 constructs a BadImageFormatException using the ctor taking a custom
9310 message and the file name. Passing in a NULL msg results in a default
9312 * exception.h: define mono_get_exception_bad_image_format2 function.
9313 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
9314 when file name pointed to an invalid IL image. Use
9315 mono_get_exception_file_not_found2 to construct FileNotFoundException,
9316 as this results in a more meaningful error message.
9318 2006-10-15 Zoltan Varga <vargaz@gmail.com>
9320 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
9323 2006-10-12 Zoltan Varga <vargaz@gmail.com>
9325 * metadata.c (mono_type_size): Change the align parameter to guint32 for
9326 consistency with the other _size functions.
9327 (mono_type_stack_size): Ditto.
9329 * class.c object.c icall.c: Fix warnings caused by the above change.
9331 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
9333 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
9335 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
9337 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
9339 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
9340 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
9341 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
9342 threadpool.h, threads-types.h: mark more internal functions.
9344 2006-10-11 Dick Porter <dick@ximian.com>
9346 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
9347 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
9348 reproduce the bug even before applying the fix.)
9350 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
9352 * reflection.c: allow retrieving attributes for arguments in generic
9353 methods (bug #79241).
9355 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
9357 * debug-mono-symfile.c: properly check fopen () result (found by
9360 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
9362 * reflection.c: make error message clearer and fixed two
9363 issuelets found by Coverity.
9365 2006-10-10 Zoltan Varga <vargaz@gmail.com>
9367 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
9369 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
9371 * object-internals.h, gc-internal.h, profiler-private.h:
9372 mark internal functions.
9374 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9376 * reflection.c: put data in the text section.
9377 * icall.c: recognize more types in type_from_typename ().
9378 * process.c, marshal.c: added some GC FIXMEs.
9380 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9382 * loader.c: check for NULL before initializing.
9384 2006-10-09 Zoltan Varga <vargaz@gmail.com>
9386 * gc.c (finalizer_thread): Use a non-alertable wait here.
9388 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
9389 until the correct solution is found.
9391 2006-10-06 Zoltan Varga <vargaz@gmail.com>
9393 * reflection.c (mono_module_get_object): Avoid an assert when operating on
9394 modules with no metadata. Fixes #79596.
9396 * image.c (load_metadata_ptrs): Put back the error message when
9397 the #- heap is encountered since the support is not complete yet.
9399 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9401 * gc.c: do not allow the user to SuppressFinalize () a
9402 delegate because it would leak the trampoline if present.
9404 2006-10-06 Zoltan Varga <vargaz@gmail.com>
9406 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
9409 2006-10-05 Zoltan Varga <vargaz@gmail.com>
9411 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
9413 * metadata.c (mono_metadata_get_param_attrs): Ditto.
9415 * row-indexes.h: Add definitions for *Ptr tables.
9417 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
9419 * metadata.c (mono_metadata_translate_token_index): New helper function to
9420 translate table indexes used in uncompressed metadata.
9421 (mono_metadata_decode_table_row): Ditto.
9422 (mono_metadata_decode_table_row_col): Ditto.
9424 * metadata.c: Add table schema for *Ptr tables.
9426 * class.c loader.c: Use the new helper function to access the affected metadata
9429 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
9432 2006-10-04 Zoltan Varga <vargaz@gmail.com>
9434 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
9435 sequences which can be unbounded in size. Fixes #79583.
9437 2006-10-02 Zoltan Varga <vargaz@gmail.com>
9439 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
9440 static initialization.
9442 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
9444 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
9446 * domain.c (mono_domain_free): Free up type_init_exception_hash.
9448 * object.c (mono_runtime_class_init): Implement correct semantics when a static
9449 ctor fails, i.e. throw the same exception on subsequent accesses.
9451 2006-09-0 Jonathan Chambers <joncham@gmail.com>
9453 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
9454 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
9455 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
9456 Handle marshalling of interfaces and VARIANTs contained in structs.
9458 Code is contributed under MIT/X11 license.
9460 2006-09-30 Zoltan Varga <vargaz@gmail.com>
9462 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
9464 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
9467 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9469 * console-io.c: ignore previous SIGINT handler.
9471 2006-09-27 Zoltan Varga <vargaz@gmail.com>
9473 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
9474 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
9475 #79460, #79461, #79485.
9477 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
9479 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
9482 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9484 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
9485 could be generated from it.
9487 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
9489 * rand.c: fix read loop to correctly handle EINTR.
9491 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
9493 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
9494 internal calls are defined to keep methods closer to the declaring
9495 type and allow a significant reduction in runtime relocations and
9498 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
9500 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
9501 exception message to have FileNotFoundException use the default
9502 assembly load error message. Fixes bug #79426.
9503 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
9505 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9507 * threadpool.c: (start_thread_or_queue) use the root domain when
9508 creating the thread instead of the async object one.
9510 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
9512 * class.c, object.c, class-internals.h, reflection.c:
9513 for arrays, store element_size inside MonoClass (speedup
9514 for array object creation).
9516 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
9518 * icall.c: fixed CodeBase to use the file name and not the module
9521 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
9523 * mono-debug.c, mono-debug.h: export find_method as
9524 mono_debug_find_method ().
9526 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
9528 * debug-helpers.c, class-internals.h: added a few functions useful
9529 when debugging under gdb.
9531 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9533 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
9534 characters that need special handling.
9536 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9538 * mono-config.c: make the os/cpu specification more flexible,
9539 allowing lists and negation.
9541 2006-09-18 Jonathan Chambers <joncham@gmail.com>
9543 * marshal.c: COM Interop fixes. Handle case where method->klass.
9544 is interface. Handle BSTR/MonoString when null. Use CDECL as
9545 calling convention on non-windows platforms. This is for
9546 compatibility with XPCOM and MainWin COM.
9548 Code is contributed under MIT/X11 license.
9551 2006-09-18 Zoltan Varga <vargaz@gmail.com>
9553 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
9554 correctly. Fixes #79217.
9556 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
9558 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
9560 * mono-config.c: allow both an os and cpu attribute for dllmap
9561 and dllentry elemnets to enable a single config file to be used
9562 for multiple architectures.
9564 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
9566 * loader.c: MonoLoaderError was cleared too soon on load failure.
9569 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
9571 * icall.c: use the defining class vtable when accessing a
9572 static field, not a pobblibly derived class.
9574 2006-09-17 Zoltan Varga <vargaz@gmail.com>
9576 * icall.c string-icalls.c: Remove references to unicode.h.
9578 * unicode.h unicode.c Makefile.am: Remove these unused source files.
9580 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
9582 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
9583 indicating the image where custom marshaller types should be looked up.
9584 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
9585 custom marshallers, instead of corlib. Fixes #79425.
9587 2006-09-14 Zoltan Varga <vargaz@gmail.com>
9589 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
9591 2006-09-14 Jonathan Chambers <joncham@gmail.com>
9593 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
9594 Implement Environment.ProcessorCount.
9596 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
9597 Implement Environment.ProcessorCount.
9600 Add Environment.ProcessorCount icall.
9602 Patch by Jason McFall.
9604 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9606 * assembly.c: don't append .exe/.dll when the filename already contains
9607 one of those extensions.
9609 2006-09-12 Martin Baulig <martin@ximian.com>
9611 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
9612 to array interfaces.
9614 2006-09-11 Martin Baulig <martin@ximian.com>
9616 * reflection.c (mono_image_build_metadata): Create the
9617 MethodImpl's after emitting all types and methods, so we don't
9618 need another fixup pass for them.
9620 2006-09-11 Zoltan Varga <vargaz@gmail.com>
9622 * class.c (mono_class_from_name_case): Fix regression introduced by the last
9625 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
9627 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
9630 2006-09-10 Zoltan Varga <vargaz@gmail.com>
9632 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
9633 args is not set. Fixes #78926.
9635 2006-09-08 Zoltan Varga <vargaz@gmail.com>
9637 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
9639 * image.c (load_class_names): Move this to class.c, and rename it to
9640 'mono_image_init_name_cache'.
9641 (load_modules): Fix a warning.
9643 * class.c icall.c image.c: Initialize image->name_cache lazily.
9645 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
9646 on its name using information in the AOT file.
9648 * class.c (mono_class_from_name): Use the new hook function.
9650 2006-09-06 Zoltan Varga <vargaz@gmail.com>
9652 * reflection.c (mono_param_get_objects): Handle enum default parameter values
9655 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
9658 2006-09-06 Martin Baulig <martin@ximian.com>
9660 * icall.c (mono_lookup_internal_call): Small fix.
9662 2006-09-05 Raja R Harinath <rharinath@novell.com>
9664 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
9667 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
9669 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
9670 when --debug is specified.
9672 2006-09-04 Zoltan Varga <vargaz@gmail.com>
9674 * class.c (setup_generic_array_ifaces): Fix a warning.
9676 2006-09-04 Miguel de Icaza <miguel@novell.com>
9678 * Temporarily remove the patch to assemly.c that checks the
9679 assembly versions as it breaks our gacutil.
9681 2006-09-03 Zoltan Varga <vargaz@gmail.com>
9683 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
9685 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
9688 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
9689 created using the default ctor. Fixes #79152.
9690 (mono_string_builder_to_utf16): Ditto.
9692 2006-09-01 Martin Baulig <martin@ximian.com>
9694 Fix handling of the generic array interfaces.
9697 (MonoDefaults): Removed `generic_array_class' and added
9698 `generic_ilist' class.
9701 (mono_bounded_array_class_get): Add the new generic array interfaces.
9702 (setup_generic_array_ifaces): New static method; create vtable
9703 entries for each method in the generic array interfaces.
9706 (select_container): Allow "parent-less" generic methods.
9709 (mono_marshal_get_generic_array_helper): New public method.
9712 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
9713 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
9714 moved the interncall into System.Array.
9716 2006-09-01 Raja R Harinath <rharinath@novell.com>
9718 A few more cases of avoiding work on types with ->byref set.
9719 Has the real fix for #79238
9720 * icall.c (is_generic_parameter): New helper.
9721 (ves_icall_Type_GetGenericParameterPosition): Use it.
9722 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
9723 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
9724 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
9725 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
9727 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
9729 (ves_icall_Type_get_IsGenericInstance): Likewise.
9730 (ves_icall_Type_get_IsGenericType): Likewise.
9732 2006-09-01 Zoltan Varga <vargaz@gmail.com>
9734 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
9737 * mempool.h (mono_mempool_get_allocated): New helper function.
9739 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
9742 * mempool.c: Fix warnings and the calculation of stats.
9744 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
9746 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
9748 * loader.c (mono_get_method_from_token): Update method_count stat.
9750 * class-internals.h (MonoStats): Add some stats.
9752 2006-08-31 Robert Jordan <robertj@gmx.net>
9754 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
9755 with managed variants.
9756 All code is contributed under the MIT/X11 license.
9758 2006-08-31 Zoltan Varga <vargaz@gmail.com>
9760 * reflection.c (reflection_methodbuilder_to_mono_method): Set
9761 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
9763 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
9765 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
9766 with cycles in classes.
9768 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
9770 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
9771 missing a [MarshalAs] directive. Fixes #79203.
9773 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
9774 klass->marshal_info. Fixes #79217.
9776 2006-08-30 Martin Baulig <martin@ximian.com>
9778 Committing a patch from Joachim Ante <joe@otee.dk>:
9779 Add support for binary data symbol stores.
9781 * debug-mono-symfile.c
9782 (mono_debug_open_mono_symbol_file): Renamed into
9783 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
9787 (mono_debug_open_image): Added `raw_contents' and `size' args.
9788 (mono_debug_init_2_memory): New public function.
9790 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
9792 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
9794 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9796 * appdomain.c: implement support for ShadowCopyFiles.
9798 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
9800 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
9801 when value is NULL (and should remove CID #51).
9803 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9805 * image.c: moved 2 functions to ../utils.
9807 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
9809 * gc.c: cope with the target object of a GC handle being NULL
9812 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9814 * class.c: recursively check parent's explicit implementations
9815 of interface methods (fixes bug #79125).
9817 2006-08-19 Miguel de Icaza <miguel@novell.com>
9819 * filewatcher.c: Avoid warnings when building, do not redefine
9820 constants that are defined.
9824 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9826 * image.c: don't fail when the link points to an absolute path.
9828 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
9830 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
9833 2006-08-17 Miguel de Icaza <miguel@novell.com>
9835 * image.c (full_path): A new method used to obtain the actual path
9836 of an assembly even in the presence of symbolic links.
9838 This is necessary for the case where we are running a binary that
9839 has been GACed, but we are using the "published" path name
9840 ($prefix/mono/1.0/blah.exe) which happens to point to the real
9843 This was the source of the failure for the `xsp' command with the
9844 recent AppDomain changes, as far as the runtime was concerned,
9845 there were two different assemblies: $prefix/mono/1.0/blah.exe and
9846 $prefix/mono/gac/blah/version/blah.exe.
9848 (do_mono_image_open): use full path
9850 2006-08-17 Zoltan Varga <vargaz@gmail.com>
9852 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
9854 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
9856 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
9857 domain_id is supplied. Fix CID #241 and corlib's unit tests.
9859 2006-08-17 Zoltan Varga <vargaz@gmail.com>
9861 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
9862 small structures. Fixes #78990.
9864 2006-08-17 Zoltan Varga <vargaz@gmail.com>
9866 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
9868 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
9870 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9873 * marshal.c: don't load all the assemblies from a domain into newly
9874 created ones. The new domains might have different rules and load
9875 assemblies from different locations. Fixes bug #76757.
9877 Patch by Lluis. Conflicts resolved by Brian Crowell.
9879 2006-08-16 Alp Toker <alp@atoker.com>
9881 * socket-io.c: First half of the fix for #79084.
9882 Set sa_size to the length of the content, not that of the struct.
9883 Don't add NULL suffix to the content, this should be done in
9884 managed code if needed.
9886 2006-08-14 Raja R Harinath <rharinath@novell.com>
9889 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
9890 mono_metadata_parse_type returns NULL.
9892 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
9894 * normalization-tables.h : new file for string normalization data.
9895 * locales.c, locales.h, icall.c :
9896 added load_normalization_resource() for string normalization,
9898 * Makefile.am : added normalization-tables.h to the sources.
9900 2006-08-13 Zoltan Varga <vargaz@gmail.com>
9902 * marshal.c: Add more helper functions to reduce code duplication and use them
9905 2006-08-12 Zoltan Varga <vargaz@gmail.com>
9907 * marshal.c: Fix non-x86 stdcall warnings.
9909 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
9912 2006-08-11 Jonathan Chambers <joncham@gmail.com>
9914 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
9915 type check on multi-dimensional arrays. Fixes #79000.
9917 2006-08-10 Jonathan Chambers <joncham@gmail.com>
9919 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
9920 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
9921 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
9922 * class-internals.h: add is_com_object to class structure.
9923 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
9924 null checks to COM object marshalling. Fix .ctor call on RCW.
9925 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
9927 All code is contributed under the MIT/X11 license.
9929 2006-08-09 Dick Porter <dick@ximian.com>
9931 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
9932 racing mono_monitor_allocator_lock() somewhere, so don't delete
9933 the critical section for now. Found by running and exiting
9936 2006-08-10 Zoltan Varga <vargaz@gmail.com>
9938 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
9939 (ves_icall_System_ComObject_FindInterface): Ditto.
9940 (ves_icall_System_ComObject_CacheInterface): Ditto.
9942 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
9943 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
9945 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9947 * threadpool.c: treat pipes from process asynchronous reads as sockets
9948 when reading from them, so we get select/poll or epoll to wait for
9951 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
9953 * loader.c: Fix a typo (CID #233) in the null check.
9955 2006-08-07 Zoltan Varga <vargaz@gmail.com>
9957 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
9958 Hopefully fixes #78949.
9960 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
9961 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
9962 bytes. Fixes #78972.
9964 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9966 * filewatcher.c: we need to set errno here.
9968 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9970 * filewatcher.c: let Win32Exception get the error value.
9972 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9974 * filewatcher.c: translate errno into win32 errors for Win32Exception
9975 to know what happened.
9977 2006-08-01 Zoltan Varga <vargaz@gmail.com>
9979 * threadpool.c: Fix more warnings.
9981 * assembly.c (search_loaded): Fix warnings.
9983 * threadpool.c (mono_thread_pool_finish): Fix warnings.
9984 (mono_async_invoke): Ditto.
9986 2006-07-28 Jonathan Chambers <joncham@gmail.com>
9988 * object.c (mono_remote_class_vtable): Need to create proxy vtable
9989 entries for __ComObject type in addition to ComImport types.
9990 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
9993 All code is contributed under the MIT/X11 license.
9995 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
9997 * image.c: avoid tentative loading of modulerefs that contain
9998 no metadata (P/Invoke library names).
10000 2006-07-28 Dick Porter <dick@ximian.com>
10002 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
10003 mono_loader_lock() somewhere, so don't delete the critical section
10004 for now. Found by running and exiting monodevelop.
10006 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10008 * filewatcher.c: define the inotify syscalls when we're building on
10009 linux and have sys/syscall.h. The build system might not have support
10010 for inotify but the target system might have it.
10012 2006-07-26 Miguel de Icaza <miguel@novell.com>
10014 * domain.c: Documentation updates.
10016 * loader.c (mono_free_method): Do not release the method
10017 information if we are being profiled, as profilers will use this
10018 information at shut down to present some data to the user.
10020 This is needed so that the profiler does not crash, as the
10021 profiler tends to keep MonoMethods around, and they might become
10022 invalid if we free these.
10024 (mono_get_method_constrained): Return the original CIL stream
10025 method as well, so verification can be performed against it.
10027 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10029 * filewatcher.[ch]: support for inotify file system watcher.
10030 * icall.c: add new internal calls for the inotify file system watcher.
10032 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10034 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
10037 2006-07-20 Dick Porter <dick@ximian.com>
10039 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
10042 2006-07-20 Dick Porter <dick@ximian.com>
10044 * threads.c (start_wrapper): Do the thread cleanup while we still
10045 hold a reference to its object. Fixes bug 78123.
10047 2006-07-18 Kornél Pál <kornelpal@gmail.com>
10049 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
10050 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
10051 "managed-to-managed".
10052 * icall.c: Redirect string constructors that take sbyte* to
10053 ves_icall_System_String_ctor_RedirectToCreateString.
10054 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
10055 to CreateString () methods with matching signature.
10056 * reflection.c: Use original security informations for
10057 MONO_WRAPPER_MANAGED_TO_MANAGED.
10058 * security-manager.c: Use original security informations for
10059 MONO_WRAPPER_MANAGED_TO_MANAGED.
10060 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
10061 that is a placeholder and only its address should be used.
10062 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
10063 that is a placeholder and only its address should be used.
10065 2006-07-15 Jonathan Chambers <joncham@gmail.com>
10067 Begin implementing COM Interop.
10068 * appdomain.c: Increment corlib version.
10069 * class.c: Set ComImport classes' parent to __ComObject.
10070 * loader.c: Mark cominterop methods as such.
10071 * domain.c: Add __ComObject class to MonoDefaults structure.
10072 * image.c: Add 2 hashtables to the image for COM Interop related methods
10073 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
10074 using the mempool allocator
10076 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
10077 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
10078 declaration for mono_metadata_type_dup_mp.
10080 * debug-helpers.c: Added strings for two additional wrapper types
10081 * object.c: Create proxy objects for ComImport classes
10082 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
10083 and added __ComObject class to MonoDefaults structure.
10085 * object-internals.h: Finish MonoRealProxy definition, and add definition of
10086 MonoComInteropProxy and MonoComObject.
10088 * marshal.c: Added support for COM Interop
10089 (signature_cominterop): Converts managed signature to corresponding
10090 unmanaged COM signature.
10091 (cominterop_get_function_pointer): gets unmanaged function pointer via
10093 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
10094 (cominterop_get_method_interface): returns interface type that method is defined on
10095 (mono_mb_emit_cominterop_call): emits native call to function pointer
10097 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
10098 that matches signature of unmanaged function.
10099 (cominterop_get_native_wrapper): wrapper around adjusted method call.
10100 (cominterop_get_invoke): forwards call from proxy to __ComObject
10101 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
10102 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
10103 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
10105 * marshal.h: Added Marshal icall declarations.
10106 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
10107 so we can access them in finalizer
10109 2006-07-14 Dick Porter <dick@ximian.com>
10111 * object.c (mono_type_initialization_cleanup): Fix a race
10112 condition by temporarily commenting out the critical section
10115 2006-07-14 Zoltan Varga <vargaz@gmail.com>
10117 * reflection.c (create_custom_attr): Fix some warnings.
10118 (create_custom_attr_data): Ditto.
10119 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
10120 types. Fixes #78855.
10122 2006-07-11 Zoltan Varga <vargaz@gmail.com>
10124 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
10126 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
10128 2006-07-08 Zoltan Varga <vargaz@gmail.com>
10130 * reflection.c (resolve_object): Add support for DynamicMethod.
10132 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
10133 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
10135 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
10137 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
10138 don't leak GPtrArray's pdata has we have no use (nor free) for it.
10140 2006-07-01 Zoltan Varga <vargaz@gmail.com>
10142 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
10145 2006-06-30 Raja R Harinath <rharinath@novell.com>
10147 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
10148 slightly: remove a shadow local variable.
10150 2006-06-29 Raja R Harinath <rharinath@novell.com>
10152 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
10153 definition that introduces the virtual function slot.
10154 Also fix Coverity #105.
10156 2006-06-29 Zoltan Varga <vargaz@gmail.com>
10158 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
10159 for dynamic assemblies. Fixes #78724.
10161 2006-06-28 Zoltan Varga <vargaz@gmail.com>
10163 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
10166 2006-06-21 Martin Baulig <martin@ximian.com>
10169 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
10172 2006-06-21 Zoltan Varga <vargaz@gmail.com>
10174 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
10176 2006-06-20 Raja R Harinath <rharinath@novell.com>
10178 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
10180 * class.c (mono_class_create_from_typespec): Add 'context' argument.
10181 Inflate result if necessary.
10182 (mono_class_get_full): Remove old version. Rename from
10183 'mono_class_get' and add 'context' argument. Pass it to
10184 ..._create_from_typespec.
10185 (mono_class_get): New. Simple wrapper to mono_class_get_full.
10186 (mono_ldtoken): Revert change below.
10188 2006-06-20 Martin Baulig <martin@ximian.com>
10190 * class.c (mono_ldtoken): Don't pass the generic context to
10191 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
10193 2006-06-15 Zoltan Varga <vargaz@gmail.com>
10195 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
10196 and later freeing it. Fixes #78638.
10198 2006-06-15 Miguel de Icaza <miguel@novell.com>
10200 * icall.c (mono_class_get_throw): Revert over-zealous error
10201 throwing, the caller for mono_class_get_throw will cope with
10202 errors when classes are not properly initialized already.
10204 The code still copes with loader exceptions though.
10206 Fixes the regression in reftype1 and reftype3 from the CAS tests.
10208 2006-06-14 Miguel de Icaza <miguel@novell.com>
10210 Fixes the `make run1' version of RuntimeAbort (to be commited,
10211 source is in Bugzilla).
10213 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
10214 FALSE on class loading failure instead of returning true.
10216 * class.c (mono_class_create_from_typedef): It is possible for
10217 mono_metadata_interfaces_from_typedef_full to fail if a class is
10218 not found, cope with this.
10221 2006-06-14 Dick Porter <dick@ximian.com>
10224 * process.c: Fix a bunch of signed/unsigned warnings from gcc
10227 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
10229 * culture-info-table.h : oops, forgot to make it nsync with r61548.
10231 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
10233 * icall.c: Another fix for building mono in Visual Studio.
10235 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
10237 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
10239 2006-06-09 Martin Baulig <martin@ximian.com>
10241 * debug-mono-symfile.c: Put this back and really fix it this
10242 time. Sorry for all the trouble.
10244 2006-06-08 Zoltan Varga <vargaz@gmail.com>
10246 * icall.c (mono_class_get_throw): Fix a warning.
10247 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
10248 ReflectionTypeLoadException if needed. Fixes #78606.
10250 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
10251 (mono_class_init): Ditto.
10253 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
10254 ref_only exceptions.
10255 (mono_loader_clear_error): Make this work even if there is no error.
10257 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
10259 * object-internals.h marshal.c marshal.h icall.c: Implement method
10260 Marshal.GetComSlotForMethodInfo using internal call.
10262 2006-06-07 Zoltan Varga <vargaz@gmail.com>
10264 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
10265 a function for signalling it.
10267 * class.c (mono_class_from_typeref): Use the new kind of loader error when
10268 a referenced assembly is not found.
10270 * loader.c (mono_loader_error_prepare_exception): Add support for
10271 LOADER_ERROR_ASSEMBLY. Fix formatting.
10273 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
10275 * domain.c appdomain.c class-internals.h marshal.c: Add support
10276 for VARIANT marshalling on windows and increment corlib version
10277 since Variant struct was added.
10279 2006-06-03 Miguel de Icaza <miguel@novell.com>
10281 * debug-mono-symfile.c: Revert Martin's previous patch which broke
10282 stack trace line information:
10284 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
10285 (Martin) when looking up B which is between A and C, return A not C.
10289 Thanks to Alexander Olk for tracking this down.
10291 2006-06-02 Zoltan Varga <vargaz@gmail.com>
10293 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
10295 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
10296 avoid clobbering its value.
10297 (mono_string_to_lpstr): Fix a warning on windows.
10299 2006-05-31 Zoltan Varga <vargaz@gmail.com>
10301 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
10303 * reflection.c loader.c: Removed references to 'dummy' flag.
10305 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
10307 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
10308 it gets GC tracking.
10310 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
10313 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
10315 * marshal.c threadpool.c: Update callers of mono_async_result_new.
10317 * appdomain.c: Bump corlib version.
10319 2006-05-30 Zoltan Varga <vargaz@gmail.com>
10321 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
10322 CEE_STIND_REF when working with object references.
10324 2006-05-31 Zoltan Varga <vargaz@gmail.com>
10326 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
10329 2006-05-30 Miguel de Icaza <miguel@novell.com>
10331 * loader.c (method_from_memberref): Fix argument value for
10332 mono_loader_set_error_method_load (I was passing the MonoClass
10333 instead of the class name char *).
10335 2006-05-30 Zoltan Varga <vargaz@gmail.com>
10337 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
10338 CEE_STIND_REF when working with object references.
10340 2006-05-30 Martin Baulig <martin@ximian.com>
10342 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
10343 mono_method_full_name() change and replace the ':' with a '.'
10346 2006-05-30 Martin Baulig <martin@ximian.com>
10348 * debug-mono-symfile.c
10349 (mono_debug_symfile_lookup_location): Fix the algorithm:
10350 when looking up B which is between A and C, return A not C.
10352 2006-05-29 Martin Baulig <martin@ximian.com>
10355 (MonoDebugMethodInfo): Make the typedef public.
10356 (MonoDebugSourceLocation): New public struct.
10359 (mono_debug_source_location_from_address): Removed.
10360 (mono_debug_source_location_from_il_offset): Removed.
10361 (mono_debug_il_offset_from_address): Removed.
10362 (mono_debug_address_from_il_offset): Removed.
10363 (mono_debug_lookup_method): New public function.
10364 (mono_debug_lookup_source_location): New public function; replaces
10365 the old mono_debug_source_location_from_*() functions; see the
10366 inline documentation.
10367 (mono_debug_free_source_location): New public function.
10368 (mono_debug_print_stack_frame): New public function; see the
10369 inline documentation.
10371 * debug-mono-symfile.c
10372 (mono_debug_find_source_location): Renamed into
10373 mono_debug_symfile_lookup_location(); only take a
10374 `MonoDebugMethodInfo *' and an `offset' argument; added inline
10376 (mono_debug_find_method): Renamed into
10377 mono_debug_symfile_lookup_method().
10379 2006-05-27 Zoltan Varga <vargaz@gmail.com>
10381 * assembly.c (mono_assembly_open_full): Dont overwrite the status
10382 returned by mono_image_open_full ().
10384 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
10385 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
10388 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
10391 2006-05-27 Miguel de Icaza <miguel@novell.com>
10393 * class.c (mono_class_from_typeref): handle missing images
10394 earlier, deals with bug #78418. Refactor code;
10396 Fix a warning introduced in my previous commit (some stale code
10397 from before I revisited my patch).
10399 * class.c (mono_class_create_from_typedef): On failure, remove the
10400 class from the MonoImage->class_cache as the class is not
10401 initialized; Fixes the leak pointed out by Paolo.
10403 2006-05-25 Dick Porter <dick@ximian.com>
10405 * threads.c (mono_thread_cleanup): Build fix. Comment out the
10406 DeleteCriticalSections until I figure out which one may still be
10407 sometimes locked when mono_thread_cleanup is called.
10409 2006-05-24 Dick Porter <dick@ximian.com>
10411 * threads.c (mono_thread_cleanup): Move the threading cleanup out
10412 of mono_thread_manage and back into its own function, so it can be
10413 called after the finalizer thread has finished.
10415 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
10417 2006-05-24 Zoltan Varga <vargaz@gmail.com>
10419 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
10422 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
10423 with non-blittable elements.
10424 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
10426 2006-05-24 Martin Baulig <martin@ximian.com>
10428 * mono-debug-debugger.h (MonoDebuggerEvent): Added
10429 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
10431 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
10432 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
10433 `mono_debugger_event_handler' to NULL.
10435 2006-05-24 Martin Baulig <martin@ximian.com>
10437 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
10439 2006-05-24 Martin Baulig <martin@ximian.com>
10441 * mono-debug-debugger.h
10442 (mono_debugger_create_notification_function): Added
10443 `MonoCodeManager *' argument.
10445 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
10447 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
10449 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
10451 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
10452 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
10455 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
10457 * icall.c: precise GC support: objects can't be stored in unmanaged
10458 memory anymore, even if they are kept alive by other references: since
10459 they can move the GC needs to be able to always find them.
10461 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
10463 * object.c: precise GC support for static fields. Support
10464 for moving GCs: write barriers and pinned allocation for interned
10467 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
10469 * domain.c, domain-internals.h: precise GC support for the MonoDomain
10472 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10474 * class.c, gc.c: sgen and precise GC updates.
10476 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
10478 * marshal.h, marshal.c: added write barrier wrapper and precise type
10481 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
10483 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
10486 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10488 * reflection.c: precise and sgen GC updates.
10490 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10492 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
10494 2006-05-22 Zoltan Varga <vargaz@gmail.com>
10496 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
10498 2006-05-20 Zoltan Varga <vargaz@gmail.com>
10500 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
10501 MONO_TYPE_OBJECT. Fixes #78462.
10503 2006-05-18 Zoltan Varga <vargaz@gmail.com>
10505 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
10506 and blittable types.
10508 2006-05-17 Miguel de Icaza <miguel@novell.com>
10510 * class.c (mono_class_get_exception_for_failure): Implement parts
10511 of a TODO: if the loader error is set (instead of the class
10512 error), we return a Loader exception that can be properly thrown
10515 This was exposed by some Winforms 2.0 code that I tried to run
10516 (Atsushi pointed me to it).
10518 2006-05-17 Zoltan Varga <vargaz@gmail.com>
10520 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
10521 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
10523 * marshal.c (emit_marshal_vtype): Add limited support for
10524 UnmanagedType.LPStruct. Fixes #78427.
10526 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
10527 Applied a patch from kangaroo to fix #77523.
10529 2006-05-17 Martin Baulig <martin@ximian.com>
10532 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
10533 (debugger_thread_created): Removed.
10534 (debugger_thread_exited): Removed.
10536 2006-05-15 Zoltan Varga <vargaz@gmail.com>
10538 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10540 * object-internals.h (MonoReflectionResource): Sync with managed version.
10542 2006-05-12 Wade Berrier <wberrier@novell.com>
10544 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
10546 2006-05-12 Zoltan Varga <vargaz@gmail.com>
10548 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
10549 functions try to allocate from the image mempool.
10551 2006-05-12 Dick Porter <dick@ximian.com>
10553 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
10555 2006-05-12 Lluis Sanchez <lluis@ximian.com>
10557 * object.c: The FieldGetter and FieldSetter methods require the full
10558 name of the class, not only the name. Fixes bug #78277.
10560 2006-05-11 Miguel de Icaza <miguel@novell.com>
10562 * loader.c (method_from_memberref): Do not pass the NULL klass to
10563 mono_loader_set_error_() methods. Pass the non-NULL value
10566 2006-05-11 Zoltan Varga <vargaz@gmail.com>
10568 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
10569 (mono_assembly_close): Null out assembly->image->references after freeing it.
10571 * image.c (mono_image_close): Free image->references.
10573 * reflection.c (mono_image_basic_init): Fix a small memory leak.
10575 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
10577 * marshal.c: In function mono_mb_add_local don't use the mb pointer
10578 before checking if it's NULL (g_assert).
10580 2006-05-10 Martin Baulig <martin@ximian.com>
10582 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
10583 I thought I already killed that two months ago, but now it somehow reappeared.
10585 2006-05-10 Martin Baulig <martin@ximian.com>
10587 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
10589 2006-05-10 Zoltan Varga <vargaz@gmail.com>
10591 * reflection.c: Allocate memory for dynamically created methods in the image
10594 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
10596 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
10597 don't use the ad pointer before checking if it's NULL (g_assert).
10599 2006-05-09 Zoltan Varga <vargaz@gmail.com>
10601 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
10602 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
10604 * marshal.c: Allocate all signatures from mempools.
10606 * marshal.c: Allocate some more signatures from mempools.
10608 2006-05-09 Miguel de Icaza <miguel@novell.com>
10610 * object.c (mono_load_remote_field): The code used to provide a
10611 temporary variable for returning results if the user did not
10612 provide a result pointer. But our temporary variable was allocted
10615 Fix calling code to always pass a result area. Coverity ID 103.
10617 2006-05-06 Zoltan Varga <vargaz@gmail.com>
10619 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
10620 value, not the old. Fixes #78312.
10621 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
10623 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
10624 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
10627 * assembly.c (mono_assembly_close): Free image->references.
10629 * assembly.c (mono_assembly_names_equal): Fix a warning.
10630 (mono_assemblies_cleanup): Cleanup more global data.
10632 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
10634 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
10635 ptr_cache and image->modules.
10637 * image.c (mono_image_init): Allocate array_cache lazily.
10639 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10641 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
10642 behavior was changed recently and has bad side effects.
10644 2006-05-05 Zoltan Varga <vargaz@gmail.com>
10646 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
10648 * assembly.c (mono_assembly_close): Remove a debug printf.
10650 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
10652 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
10653 to also allow for temporary references between mono_image_open ()/close ().
10655 * domain.c (get_runtimes_from_exe): Add a FIXME.
10657 2006-05-04 Zoltan Varga <vargaz@gmail.com>
10659 * marshal.c: Fix support for dynamic methods.
10661 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
10663 * marshal.c (mono_marshal_cleanup): New cleanup function.
10665 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
10668 * class.c (mono_class_init): Fix leaking class->nested_classes.
10670 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
10672 * image.c (mono_image_init): Initialize the new cashes.
10674 * image.c (mono_image_close): Destroy the new cashes.
10676 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
10678 * mempool.c (mono_mempool_strdup): New helper function.
10680 * class-internals.h: Add prototype for mono_loader_unlock ().
10682 * domain.c (mono_jit_info_table_find): Fix a warning.
10683 (mono_debugger_check_runtime_version): Ditto.
10685 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
10686 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
10687 functions to these modules.
10689 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
10692 * marshal.c (mono_free_bstr): Fix a warning.
10694 * assembly.c (mono_assembly_open_full): Fix another small leak.
10696 * object.c: Fix some unload leaks in the remoting code.
10698 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
10701 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
10703 * reflection.c: Fix some unload leaks in dynamic assemblies.
10705 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
10707 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
10708 * marshal.h: Add BSTR support on Win32
10709 * icall.c: Add BSTR icalls
10710 * metadata.h: Add BSTR enums
10712 2006-04-28 Miguel de Icaza <miguel@novell.com>
10714 Work to catch the crash from #76795 and turn it into an
10715 exception. As I stubbed out pieces of the VisualBasic support,
10716 I found a number of places where the code was failing and I added
10717 checks to those places.
10719 * metadata.c (do_mono_metadata_parse_generic_class): Make this
10720 function return a status code. If we fail to parse the signature
10721 from mono_metadata_parse_generic_inst, return FALSE.
10723 * loader.c (mono_get_method_from_token): If we fail to load the
10724 method (mono_class_get) return NULL.
10726 * (method_from_memberref): Return NULL if we are unable to parse
10727 the method signature
10729 (mono_loader_error_prepare_exception): Since we now use the
10730 loader_error flag internally to stop processing, and obtaining
10731 exceptions that might be thrown will walk this code path the
10732 proper way of going from a MonoLoaderError into a
10733 MonoException was convoluted. This new routine encapsulates the
10734 process of turning the error into an exception and *clearing* the
10737 2006-04-27 Miguel de Icaza <miguel@novell.com>
10739 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
10740 with missing assemblies), and to cope with:
10742 * Missing fieldref from a non-existing assembly.
10743 * Missing methodref from a non-existing assembly.
10745 The first batch of work to address *some* of the issues from 76661.
10747 * object.c (mono_class_create_runtime_vtable): If we fail to
10748 initialize the class raise the exception here.
10750 * metadata.c (mono_class_get_overrides_full): If any methods fail
10751 to load return the failure to the caller.
10753 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
10754 flagging assemblies that failed to load.
10756 Do not crash if we are unable to load the assembly.
10758 (mono_assembly_close): Do nothing with REFERENCE_MISSING
10761 * loader.c (mono_loader_set_error_type_load): Change the
10762 convention to always pass unallocated strings, so we make our own
10763 copies (I know our own code had duplicated strings before, but
10764 this keeps the normal conventions).
10765 (method_from_memberref): Call mono_loader_set_error_method_load
10766 for all possible failures of loading the class.
10767 Remove assert, turn into a loader error.
10769 (mono_loader_error_to_exception): Move this routine from mini
10770 (mini_loader_error_to_exception) there was no need to have that in
10773 * class.c (mono_class_from_typeref): If we were not able to load
10774 the assembly with mono_assembly_load_reference, call the
10775 mono_loader_set_error_type_load to register the problem.
10777 (mono_class_setup_fields): If we fail to load the type from
10778 mono_metadata_parse_type_full, call mono_class_set_failure and
10779 break from the loop.
10781 If class->exception_type is set, we do not layout the fields as
10782 that might crash the runtime, and instead return (from breaking
10783 from the previous loop).
10785 (mono_class_setup_vtable): This now returns a boolean indicating
10786 whether the table was properly setup. The decision is driven by
10787 mono_class_get_overrides_full which might run into non-existing
10790 (mono_class_init): Returns TRUE on success or FALSE if there was a
10791 problem in loading the type (incorrect assemblies, missing
10792 assemblies, methods, etc).
10794 When we call mono_class_setup_fields we also check for a potential
10795 error inside this call (either a class exception or a general
10798 (mono_class_create_from_typedef): If the parent fails to load
10799 (calling mono_class_get_full) return NULL.
10803 calls to mono_metadata_parse_type_full should be checked
10804 everywhere and set the mono_class_set_failure
10805 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
10807 The current patch checks the places where my manually constructed
10808 tests show the errors are showing up, but we should do it
10813 mono_class_init return values should be tested everywhere, like
10814 the previous case this is something that we should audit
10815 everywhere and not only on the cases exposed by the tests I
10818 2006-04-26 Miguel de Icaza <miguel@novell.com>
10820 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
10821 boolean parameter and instead pass the information on `options'
10822 parameter (FileOptions).
10824 * icall.c: Register the new signature for MonoIO.Open.
10826 * debug-helpers.c (dis_one): Trying to understand how coverity
10827 works. Fix Run 5, item 78.
10829 2006-04-26 Dick Porter <dick@ximian.com>
10831 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
10834 2006-04-25 Martin Baulig <martin@ximian.com>
10836 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
10838 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
10839 debugger_thread_created().
10840 (debugger_gc_push_all_stacks): Don't handle the main thread in any
10842 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
10843 (mono_debugger_finalize_threads): New function; undo the effects
10844 of mono_debugger_init_threads().
10845 (mono_debugger_create_all_threads): Removed.
10847 2006-04-24 Zoltan Varga <vargaz@gmail.com>
10849 * image.c (mono_image_close): Tidy up trace messages.
10851 * assembly.c (mono_assembly_close): Ditto.
10853 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
10854 no longer references an already freed assembly. Fixes #78168.
10856 2006-04-21 Dick Porter <dick@ximian.com>
10858 * threads.c (mono_thread_detach): Fix reference counting when
10861 2006-04-21 Zoltan Varga <vargaz@gmail.com>
10863 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
10866 2006-04-19 Zoltan Varga <vargaz@gmail.com>
10868 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
10869 (mono_type_to_stind): Ditto.
10871 * marshal.c: Use the new helper functions to simplify code.
10873 * image.c (mono_image_close): Add some code for help debug assembly unloading
10876 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
10879 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
10880 assembly was already loaded in another appdomain. Fixes #78083.
10882 2006-04-13 Zoltan Varga <vargaz@gmail.com>
10884 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
10885 referenced assemblies.
10886 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
10888 * domain.c (mono_domain_free): Add a trace message.
10890 * appdomain.c (add_assemblies_to_domain): Ditto.
10892 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
10895 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10897 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
10899 2006-04-12 Martin Baulig <martin@ximian.com>
10901 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
10902 `USE_INCLUDED_LIBGC'.
10904 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10906 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
10907 the patch contains ../ and a small directory name later. Hopefully fixes
10910 2006-04-10 Martin Baulig <martin@ximian.com>
10912 Clean up the debugger's thread-handling code.
10914 The debugger's thread-handling code has been moved from
10915 ../mini/debug-debugger.c to threads.c. We now iterate directly
10916 over the `threads' hash, keep track of exiting threads and also
10917 use proper locking.
10919 We can now debug XSP and XSP based applications with the debugger.
10921 * object-internals.h (MonoThread): Added `gpointer end_stack'.
10924 (MonoThreadCallbacks): Removed; this was only used by the debugger.
10925 (mono_install_thread_callbacks): Likewise.
10927 * threads.c (mono_thread_callbacks): Removed.
10928 (debugger_thread_created, debugger_thread_exited): New static functions.
10929 (start_wrapper): Call debugger_thread_created().
10930 (thread_cleanup): Call debugger_thread_exited().
10931 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
10932 (mono_debugger_init_threads): New public function.
10933 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
10934 iterate directly over the `threads' hash and also use proper locking.
10936 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
10938 * mono-debug-debugger.h
10939 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
10941 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10943 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
10944 argument type=array. Fixes #78057.
10946 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
10948 * culture-info-table.h : regenerated. Fixed bug #69652.
10950 2006-04-07 Zoltan Varga <vargaz@gmail.com>
10952 * loader.c metadata.c: Reapply a variant r59116.
10954 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
10956 * class.c (mono_class_setup_interface_offsets): New internal function.
10958 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
10959 interfaces too. Fixes #77398.
10961 * reflection.c (encode_cattr_value): Add support for
10962 parameter type=object, argument type=array.
10963 (load_cattr_value): Ditto. Fixes #77916.
10965 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
10966 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
10968 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
10969 a byval char array and CharSet is Ansi.
10971 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
10973 2006-04-06 Zoltan Varga <vargaz@gmail.com>
10975 * metadata.c: Add some locking comments.
10977 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
10979 (mono_metadata_free_method_signature): Don't free the signature itself.
10981 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
10983 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
10984 reference the same MonoImage.
10985 (mono_assembly_load_from_full): Add an assert.
10987 2006-04-05 Zoltan Varga <vargaz@gmail.com>
10989 * image.c (mono_image_close): Don't put the image we are about to free into the
10990 loaded_images_guid_hash.
10992 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
10993 to reduce code duplication.
10995 * marshal.c: Register the native functions called by this module as icalls, to
10996 somewhat centralize the creation of MonoMethodSignature's.
10998 * loader.c (mono_method_signature): Add a cache for method signatures.
11000 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
11001 the parameter attributes of a method.
11002 (mono_metadata_parse_method_signature_full): Refactored the computation of
11003 parameter attributes into a separate function. Also avoid one allocation in
11006 * assembly.c (mono_assembly_close): Ditto.
11008 * image.c (mono_image_close): Log trace messages with INFO level.
11010 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
11012 * image.c reflection.c: Correct reference counting of image modules.
11014 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
11015 of this function from the image mempool.
11017 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
11018 to allow more cached types to be used.
11020 * mono-debug.c (mono_debug_add_method): Appled patch from
11021 David S. Miller <davem@sunset.davemloft.net>: Access
11022 minfo->lexical_blocks[] entry elements using read32().
11024 2006-04-04 Zoltan Varga <vargaz@gmail.com>
11026 * loader.c (mono_free_method): No longer free the method header for non-dynamic
11027 methods as it is allocated from the mempool.
11029 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
11032 * metadata-internals.h: Add comments describing the reference counting scheme
11033 used for MonoImage and MonoAssembly.
11035 * image.c assembly.c reflection.c: Rework reference counting of images and
11036 assemblies so they are freed when the runtime is shut down. Free some
11037 additional memory structures when an image is unloaded.
11039 2006-04-03 Zoltan Varga <vargaz@gmail.com>
11041 * class.c loader.c reflection.c: Allocate more data structures in
11044 2006-03-31 Miguel de Icaza <miguel@novell.com>
11047 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
11048 build on pre glib 2.4 systems.
11050 2006-03-31 Zoltan Varga <vargaz@gmail.com>
11052 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
11054 * icall.c: Fix some warnings.
11056 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
11058 * culture-info-table.h : regenerated.
11060 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
11062 * threads.c, object-internals.h, verify.c: changed the culture caching
11063 code to use a normal MonoArray for storage so the GC can keep track of
11064 them easily. Fixed bits of the cache logic, too and simplified the
11067 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
11069 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
11070 thread for non-Boehm GCs.
11072 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
11074 * domain.c, object.c, domain-internals.h: reduce the amount of memory
11075 needed to keep track of the data for static fields.
11077 2006-03-29 Raja R Harinath <rharinath@novell.com>
11080 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
11081 for interface classes. Use 'num_methods' instead.
11082 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
11083 before using '->vtable_size' field.
11085 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11087 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
11088 doesn't contain managed pointers, so use a normal hashtable.
11090 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
11092 * reflection.c, class-internals.h, domain.c: fixed handling of types
11093 used as values for objects in custom attributes (bug #77915):
11095 2006-03-24 Martin Baulig <martin@ximian.com>
11097 * class.c (mono_class_setup_fields): Added support for generic
11098 instances; fixes #77580.
11100 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11102 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
11104 2006-03-24 Dick Porter <dick@ximian.com>
11106 * file-io.c (get_file_attributes): More stat macro breakage.
11109 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
11111 * profiler.c: added the file=filename option in the default profiler
11112 to output the profile data to filename.
11114 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11116 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
11119 2006-03-22 Martin Baulig <martin@ximian.com>
11121 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
11122 allocated `MonoClassField *' in `fb->handle'.
11124 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11126 * class.c, image.c, metadata-internals.h: implemented new mechanism to
11127 allocate interface ID to save memory and allow better ID reuse on
11128 appdomain unload. setup_generic_vtable () removal from Martin.
11130 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
11132 * object.h, appdomain.c, domain.c, exception.c, icall.c,
11133 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
11134 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
11135 write barriers for reference stores with managed objects accessed with
11136 C structures in the runtime and in embedding programs.
11138 2006-03-20 Raja R Harinath <rharinath@novell.com>
11140 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
11141 'interface_id' and 'max_interface_id' fields of MonoClasses
11142 representing open generic types.
11144 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
11146 * object.h, object.c, icall.c: added functions to deal with
11147 storing valuetypes that contain references in managed objects.
11148 * reflection.c, string-icalls.c, threads.c, marshal.c: small
11149 fixes and comments around uses of mono_array_addr ().
11151 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
11153 * object.h, icall.c, monitor.c: object.GetHashCode ()
11154 implementation that supports the moving garbage collector.
11156 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
11158 * icall.c, threads-types.h, threads.c: implemented finalizer for
11159 LocalDataStoreSlot.
11161 2006-03-15 Zoltan Varga <vargaz@gmail.com>
11163 * metadata.c (mono_type_size): Add a fixme.
11164 (mono_type_stack_size): Ditto.
11166 * object-internals.h (MonoReflectionAssemblyBuilder): Added
11167 'type_forwarders' field.
11169 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
11170 attribute from net 2.0.
11172 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
11175 * class.c (mono_class_setup_fields): Fix a warning.
11177 * class.c (mono_class_from_name): Add support for assemblyref entries
11178 in the EXPORTEDTYPE table.
11180 * reflection.c: Add support for handling type forwarders under net 2.0.
11182 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11184 2006-03-14 Zoltan Varga <vargaz@gmail.com>
11186 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
11187 overwriting entries in ModuleBuild->types, also clean up the code
11188 a little. Fixes #77774.
11190 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
11192 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
11193 load friend assembly info when present.
11195 2006-03-14 Raja R Harinath <rharinath@novell.com>
11197 Fix crasher on gtest-158.cs.
11198 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
11199 the return value if the MonoClass we want is yet in an
11200 inconsistent state.
11201 * class.c (mono_class_create_from_typedef): Add an comment
11202 explaining an order dependency between mono_class_setup_parent and
11203 mono_class_setup_mono_type.
11205 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
11207 * class.c: documentation updates and events bug fix.
11209 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
11211 * class.c: some cleanup, locking fixes.
11213 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11215 * class.c: fix the generics code to setup nested
11216 type info to the instantiated type (bug #77770).
11218 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11220 * marshal.c: fixed a few type correctness issues.
11222 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11224 * loader.c: the Set/Get/Addrtess array methods should be public.
11226 2006-03-11 Zoltan Varga <vargaz@gmail.com>
11228 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
11230 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
11233 2006-03-10 Zoltan Varga <vargaz@gmail.com>
11235 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
11237 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
11239 * mempool.c (mono_mempool_alloc): Speed this up a bit.
11240 (mono_mempool_alloc0): Ditto.
11242 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11245 (create_object_from_sockaddr): it was allocating 4 extra bytes
11246 for the AF_UNIX data. Fixes bug #77747.
11248 2006-03-09 Zoltan Varga <vargaz@gmail.com>
11250 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
11252 2006-03-09 Dick Porter <dick@ximian.com>
11254 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
11255 Fixes bug 76966 again.
11257 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
11259 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
11261 * appdomain.c: Bumped corlib version to 48 (due to r57532)
11263 2006-03-07 Martin Baulig <martin@ximian.com>
11266 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
11268 2006-03-07 Martin Baulig <martin@ximian.com>
11271 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
11272 regression introduced in r56970; see gtest-252.cs.
11274 * loader.c (mono_get_method_constrained): Correctly handle generic
11275 methods; see gtest-253.cs.
11277 2006-03-04 Zoltan Varga <vargaz@gmail.com>
11279 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
11281 2006-03-04 Martin Baulig <martin@ximian.com>
11283 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
11284 compute the parent type at runtime, just like we're already doing
11288 (mono_reflection_bind_generic_parameters): Don't compute the
11289 parent type anymore.
11291 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
11293 2006-03-04 Martin Baulig <martin@ximian.com>
11295 * mono-debug-debugger.h
11296 (mono_debugger_create_notification_function): Allocate memory at
11297 runtime and return a pointer to it.
11299 2006-03-03 Zoltan Varga <vargaz@gmail.com>
11301 * assembly.c: Fix windows build.
11303 * assembly.c: Fix build.
11305 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
11307 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
11309 2006-03-03 Dick Porter <dick@ximian.com>
11312 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
11313 Check parameters before dereferencing them. Fixes Aaron's part of
11316 2006-03-03 Raja R Harinath <rharinath@novell.com>
11318 Fix performance regression.
11319 * loader.c (find_method_in_class): Add 'from_class' argument.
11320 Rename 'klass' argument to 'in_class'. The signature is compared
11321 against the method in 'in_class', and the corresponding method is
11322 returned from 'from_class'.
11323 (find_method): Walk both 'in_class' and 'from_class' in parallel.
11324 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
11325 type definition and generic instantiation in parallel.
11326 (mono_get_method_constrained): Update to changes.
11328 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
11330 * threads.c: make sure the domain is correct, too when doing
11331 mono_thread_attach ().
11333 2006-03-01 Zoltan Varga <vargaz@gmail.com>
11335 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
11336 windows. Fixes #77683.
11338 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11340 * object.h, *: introduced specific way to set elements of an array
11341 of references to be used as write barrier. Still need to audit the
11342 uses of mono_array_addr.
11344 2006-03-01 Miguel de Icaza <miguel@novell.com>
11346 * object-internals.h: New field to cache the assmebly name, patch
11347 from Tambet Ingo (tambet@ximian.com)
11349 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
11351 * decimal.h, class-internals.h, metadata-internals.h,
11352 file-io.h: mark a few function declarations as internal, to
11353 reduce the number of PLT entries.
11355 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11357 * file-io.c: fix typo in warning message.
11359 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
11361 * loader.c: on unix, lookup the "*A" version of a function
11362 if charset is auto as a second option before failing.
11364 2006-02-28 Raja R Harinath <rharinath@novell.com>
11366 * class.h (mono_class_inflate_generic_method): Revert to two
11368 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
11369 (mono_class_inflate_generic_method_full): Add.
11370 * class.c (mono_class_inflate_generic_method_full): Rename from
11371 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
11372 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
11373 * loader.c, reflection.c: Update to changes.
11375 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11377 * icall.c: const fixes and small improvements.
11379 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11381 * threadpool.c: for asynchronous connect(), enable the same workaround
11382 for BSD 6 as for the Mac. Fixes bug #77637.
11384 2006-02-24 Zoltan Varga <vargaz@gmail.com>
11386 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
11387 formatted classes. Fixes #77524.
11389 2006-02-24 Raja R Harinath <rharinath@novell.com>
11391 * class.c (inflate_generic_type): Add a couple more
11392 micro-optimizations.
11393 (inflate_generic_context): Don't use the 'gmethod' from
11395 (mono_class_inflate_generic_method): If the method has generic
11396 parameters, but the passed-in context doesn't have a 'gmethod',
11397 create one. Use the possibly simplified generic instantiation
11398 from the declaring class instead of the one passed in.
11400 2006-02-24 Raja R Harinath <harinath@gmail.com>
11402 Make generic method signature and method header handling lazy.
11403 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
11404 (inflate_generic_header): Likewise.
11405 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
11406 parameter to avoid inflating types.
11407 (mono_get_inflated_method): Empty out.
11408 * class.h (mono_class_inflate_generic_method): Update to changes.
11409 * loader.c (mono_get_method_from_token): Don't parse signature for
11410 generic methods, nor methods of generic classes.
11411 (mono_method_signature): Rename from 'mono_method_signature'.
11412 Inflate signature on demand.
11413 (mono_method_get_header): Inflate method header on demand.
11414 * reflection.c: Update to changes.
11416 2006-02-23 Raja R Harinath <rharinath@novell.com>
11418 * metadata.c (mono_metadata_inflate_generic_inst): If the
11419 instantiation is closed, don't bother expanding it in the new
11421 * class.c (inflate_generic_class): If the generic instantiation
11422 doesn't change after inflation, return the argument itself.
11423 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
11425 (inflate_generic_context): If neither the generic class nor the
11426 generic method instantiations change, return the original context.
11427 * reflection.c (mono_method_get_object): Do
11428 'mono_get_inflated_method' before accessing the ->klass field.
11429 (inflate_mono_method): Don't create a MonoGenericMethod unless
11431 (inflate_method): Don't pass a constructed type as the declaring
11432 type of a methodbuilder.
11434 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
11436 * object.c: fix memory overwrite.
11438 2006-02-22 Dick Porter <dick@ximian.com>
11440 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
11441 it doesn't work any more.
11442 (mono_threads_request_thread_dump): Fix unused variable warnings.
11444 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11446 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
11447 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
11448 the public header file.
11450 2006-02-21 Zoltan Varga <vargaz@gmail.com>
11452 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
11454 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
11456 * class-internals.h, object.c: reduce the size of MonoVTable
11457 and store the interface_offsets array at negative offsets.
11459 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
11461 * metadata.c: tweak table descriptors data structures to reduce
11462 size and runtime relocations.
11464 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11466 * marshal.c: fix some types and opcodes to be type-safe
11467 in marshaling wrappers.
11469 2006-02-21 Ankit Jain <jankit@novell.com>
11471 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
11473 2006-02-21 Raja R Harinath <rharinath@novell.com>
11475 * metadata.c (get_constraints): Relax debugging checks for monodis.
11477 2006-02-21 Ankit Jain <jankit@novell.com>
11479 * metadata.c (mono_metadata_load_generic_params): Move the code
11480 checking for ambiguous generic params from here to mono/dis/get.c
11481 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
11483 2006-02-21 Raja R Harinath <harinath@gmail.com>
11485 Fix assertion triggered when compiling nemerle.
11486 * class.c (mono_get_shared_generic_inst): Rename from
11487 get_shared_inst and make non-static.
11488 * loader.c (mono_get_shared_generic_method): New. Used to create
11489 the MonoGenericContext-equivalent of a MonoGenericContainer.
11490 (mono_get_method_from_token): Initialize the 'context' field of
11491 the created MonoGenericContainer.
11492 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
11493 * metadata.c (get_constraints): Add sanity check.
11494 * class-internals.h: Add new internal methods.
11496 * reflection.c (verify_safe_for_managed_space): New sanity check.
11497 Currently checks that owner-less generic parameters aren't allowed
11499 (mono_type_get_object): Use it.
11500 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
11501 that are now in mono_type_get_object.
11502 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
11504 2006-02-19 Raja R Harinath <harinath@gmail.com>
11506 * metadata.c (mono_type_create_from_typespec): Rename from
11507 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
11508 argument and caching of types in the generic container.
11509 (unwrap_arrays, find_generic_param): Remove.
11510 * metadata-internals.h: Update.
11511 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
11513 2006-02-18 Zoltan Varga <vargaz@gmail.com>
11515 * class.c (mono_class_get_exception_for_failure): Fix a warning.
11517 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
11518 return values. Fixes #77581.
11520 * class.c (mono_fnptr_class_get): Switch name and name_space.
11522 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
11523 classes and add support for [In, Out] attributes.
11524 (mono_marshal_free_asany): Ditto. Fixes #77524.
11526 2006-02-18 Raja R Harinath <harinath@gmail.com>
11528 * class.c (mono_class_from_generic_parameter): Make more robust to
11529 incomplete MonoGenericContainers from monodis.
11531 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
11533 * class-internals.h: added some more exception types.
11534 * class.c, metadata.c: added a few checks to handle missing
11537 2006-02-17 Raja R Harinath <rharinath@novell.com>
11539 Use owner-less generic-params some more.
11540 * class.c (my_mono_class_from_generic_parameter): Remove.
11541 (mono_class_from_generic_parameter): Handle null image,
11542 param->name and param->owner.
11543 (mono_class_from_mono_type): Update.
11544 (mono_class_create_from_typespec): Remove 'container' parameter.
11545 If that parameter is non-null, the result is always inflated by
11546 'mono_class_get_full' anyway.
11547 (mono_class_get): Rename from _mono_class_get. Remove 'container'
11549 (mono_class_get_full): Update.
11551 * class.c (inflate_generic_type) [GENERICINST]: If the generic
11552 instance is not open, don't bother inflating.
11553 (mono_class_setup_fields): Hoist some loop-invariants. Don't
11554 parse metadata for inflated classes.
11555 (_mono_class_get): Change GenericContext* parameter to
11557 (mono_class_create_from_typespec): Likewise. Simplify, and
11558 implement trivially. All the cases are handled in
11559 mono_class_from_mono_type. Don't inflate returned class.
11560 (mono_class_get_full): Delegate GENERICINST optimization to
11561 inflate_generic_type.
11562 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
11564 2006-02-16 Dick Porter <dick@ximian.com>
11566 * socket-io.c (create_object_from_sockaddr): Fix typo.
11567 (create_sockaddr_from_object): Check array lengths before
11568 potentially accessing items off the end.
11569 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
11570 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
11571 (ves_icall_System_Net_Sockets_Socket_Send_internal)
11572 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
11573 length checks to avoid wraparound overflows.
11574 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
11575 contents of the array of sockets
11576 (hostent_to_IPHostEntry2)
11577 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
11578 Check return value of inet_ntop ().
11579 (addrinfo_to_IPHostEntry): Fix typo
11581 2006-02-16 Raja R Harinath <rharinath@novell.com>
11583 Type metadata parsing doesn't use generic-instantiation information.
11584 * metadata.c (mono_metadata_parse_array_full): Change
11585 MonoGenericContext* parameter to MonoGenericContainer*.
11586 (mono_metadata_parse_type_full): Likewise.
11587 (mono_type_create_from_typespec_full): Likewise.
11588 (mono_metadata_parse_mh_full): Likewise.
11589 (mono_metadata_parse_generic_inst): Likewise.
11590 (do_mono_metadata_parse_generic_class): Likewise.
11591 (do_mono_metadata_parse_type): Likewise.
11592 * metadata-internals.h: Update to changes.
11593 * class.c (mono_class_find_enum_basetype): Likewise.
11594 (mono_class_setup_fields): Likewise.
11595 (mono_class_create_from_typespec): Likewise.
11596 * loader.c (method_from_methodspec): Likewise.
11597 (mono_get_method_from_token): Likewise.
11598 (mono_method_get_header): Likewise.
11600 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11602 * marshal.c: handle additional GENERICINST case (patch from
11603 Thong Nguyen <tum@veridicus.com>).
11604 Fix a few cases where LDIND_I/STIND_I was used for references.
11606 2006-02-16 Raja R Harinath <rharinath@novell.com>
11608 * reflection.c (mono_reflection_get_token): Remove unused variable.
11610 2006-02-16 Martin Baulig <martin@ximian.com>
11612 * reflection.c (mono_reflection_get_token): Add support for fields
11613 in instantiated generic types.
11616 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
11618 2006-02-15 Martin Baulig <martin@ximian.com>
11621 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
11622 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
11623 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
11624 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
11626 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
11628 * class.c, metadata.c, metadata.h, object.c, icall.c,
11629 marshal.c: changed mono_type_get_underlying_type () to do
11630 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
11631 Fixed handling of instantiated generic valuetypes (bug #75479).
11633 2006-02-15 Raja R Harinath <rharinath@novell.com>
11635 * metadata.c (mono_metadata_decode_signed_value): Simplify.
11636 Delegate to mono_metadata_decode_value, and work on the returned value.
11638 * icall.c (ves_icall_MonoType_GetGenericArguments):
11639 Add consistency check here too.
11641 2006-02-15 Ankit Jain <jankit@novell.com>
11643 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
11646 2006-02-15 Ankit Jain <jankit@novell.com>
11648 * metadata.c (mono_metadata_decode_signed_value): New function to decode
11649 signed values, used only for representing lower bounds of arrays.
11650 (mono_metadata_parse_array_full): Use new
11651 mono_metadata_decode_signed_value to decode lower bounds.
11653 2006-02-14 Martin Baulig <martin@ximian.com>
11656 (mono_reflection_get_token): Support "MonoGenericMethod" and
11657 "MonoGenericCMethod" and allow generic instances / methods.
11659 2006-02-11 Zoltan Varga <vargaz@gmail.com>
11661 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
11662 to obtain the terminal size using an ioctl.
11664 * object.c (mono_nullable_init): Revert this as nullable reference
11665 types are not valid.
11666 (mono_nullable_box): Ditto.
11668 2006-02-09 Dick Porter <dick@ximian.com>
11670 * threads.c (mono_thread_detach): Drop a reference to the thread
11673 2006-02-09 Zoltan Varga <vargaz@gmail.com>
11675 * object.c (mono_nullable_init): Handle nullable reference types.
11676 (mono_nullable_box): Ditto. Fixes #77446.
11678 2006-02-07 Martin Baulig <martin@ximian.com>
11680 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
11682 2006-02-07 Ankit Jain <jankit@novell.com>
11684 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
11685 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
11686 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
11687 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
11688 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
11689 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
11691 2006-02-02 Zoltan Varga <vargaz@gmail.com>
11693 * class.c (mono_class_create_generic): Set type_token as well.
11695 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
11696 compatible with MS.
11698 2006-02-02 Martin Baulig <martin@ximian.com>
11700 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
11701 has never been used so far.
11703 2006-02-02 Martin Baulig <martin@ximian.com>
11705 * mono-debug-debugger.h: Changed comment at the top of this file;
11706 the header is not installed, but it's safe to #include it from
11709 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
11710 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
11712 2006-02-02 Martin Baulig <martin@ximian.com>
11715 (MonoSymbolTable): Removed the `metadata_info' field.
11718 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
11720 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
11721 (mono_debugger_add_builtin_types): Removed.
11722 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
11723 (mono_debugger_create_notification_function): We now operate on a
11724 pre-allocated area; take a `gpointer' and return `void'.
11726 * mono-debug-debugger.c
11727 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
11728 (mono_debugger_add_builtin_types): Removed.
11730 2006-02-02 Martin Baulig <martin@ximian.com>
11732 * threads.c (mono_debugger_create_all_threads): New public method.
11734 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
11736 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
11737 breaks on several platforms.
11739 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
11741 * assembly.c: the VS.NET build doesn't supply default values for
11742 MONO_ASSEMBLIES and MONO_CFG_DIR.
11744 2006-02-01 Zoltan Varga <vargaz@gmail.com>
11746 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
11749 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
11751 * loader.c (method_from_memberref): Fix a warning.
11753 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
11755 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
11756 with explicit layout. Fixes #77433.
11758 2006-01-31 Zoltan Varga <vargaz@gmail.com>
11760 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
11761 max_interface_id is initialized before using it. Fixes #77398.
11762 (ves_icall_Type_GetInterfaces): Ditto.
11764 2006-01-30 Raja R Harinath <rharinath@novell.com>
11766 * metadata.c (mono_metadata_parse_method_signature_full): Don't
11767 allocate memory for parameter attributes when parsing memberref
11769 * loader.c (mono_loader_set_error_method_load): Don't warn.
11770 (method_from_memberref): Ensure MissingMethodException gets thrown
11771 if method is not found. Make warning more informative.
11773 2006-01-29 Raja R Harinath <harinath@gmail.com>
11776 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
11777 return true if is byref.
11778 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
11779 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
11780 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
11782 2006-01-27 Raja R Harinath <rharinath@novell.com>
11784 Fix tests/find-method.2.il
11785 * loader.c (find_method, find_method_in_class): Remove is_inflated
11786 argument. Revert 2006-01-18 change.
11787 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
11788 is generic, search for method in its generic definition.
11789 * class.c (mono_class_setup_vtable_general): Print generic
11790 arguments of generic types in debugging printf.
11792 2006-01-26 Zoltan Varga <vargaz@gmail.com>
11794 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
11796 * threads.c (mono_threads_request_thread_dump): New helper function.
11798 2006-01-25 Raja R Harinath <rharinath@novell.com>
11800 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
11802 2006-01-25 Ankit Jain <jankit@novell.com>
11804 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
11805 move definition to ..
11806 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
11808 2006-01-25 Ankit Jain <jankit@novell.com>
11809 Raja R Harinath <rharinath@novell.com>
11811 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
11812 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
11815 2006-01-25 Martin Baulig <martin@ximian.com>
11817 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
11818 `MonoDebuggerThread' into debug-debugger.c.
11820 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11822 * profiler.c: fix printing of data.
11824 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
11826 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
11827 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
11829 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11831 * object.c: fix deadlock related to string interning.
11833 2006-01-23 Martin Baulig <martin@ximian.com>
11835 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
11837 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
11839 2006-01-23 Martin Baulig <martin@ximian.com>
11841 * mono-debug.h: Moved the prototypes of some functions which are
11842 used by the JIT here from mono-debug-debugger.h.
11844 2006-01-21 Martin Baulig <martin@ximian.com>
11846 * Makefile.am: Don't install mono-debug-debugger.h.
11848 2006-01-21 Martin Baulig <martin@ximian.com>
11850 * mono-debug-debugger.h: Enforce the private status of this header
11851 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
11852 Moved some stuff from mono-debugger-jit-wrapper.h here.
11854 2006-01-20 Raja R Harinath <rharinath@novell.com>
11856 * class.c (mono_class_from_typeref): Add a sanity test to help
11857 catch lack of assembly load/search hooks.
11859 2006-01-19 Zoltan Varga <vargaz@gmail.com>
11861 * marshal.c (emit_struct_conv): Relax the fields with same offset
11862 check even more. Fixes #77230.
11864 2006-01-18 Martin Baulig <martin@ximian.com>
11866 * loader.c (find_method_in_class): Added `gboolean is_inflated'
11867 argument; if false, we compare the uninstantiated signatures.
11868 (method_from_memberref): Compare the uninstantiated signatures;
11871 2006-01-18 Robert Jordan <robertj@gmx.net>
11873 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
11874 Clear the weak link. Fixes bug #77170.
11876 * gc.c (mono_gchandle_free):
11877 Reflect *-gc.c changes (tiny optimization).
11879 2006-01-18 Zoltan Varga <vargaz@gmail.com>
11881 * metadata.c (mono_metadata_signature_dup): Applied patch from
11882 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
11885 2006-01-17 Zoltan Varga <vargaz@gmail.com>
11887 * marshal.c (emit_struct_conv): Allow fields with the same offset when
11888 marshalling from native to managed code. Fixes #77230.
11890 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11892 * threadpool.c: fix problem (Mac only) when more than one asynchronous
11893 connect. Fixes bug #77020.
11895 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
11897 * class.c: fixed id assignement for nested interfaces (bug #77275).
11898 Added also better info for --print-vtable debugging.
11900 2006-01-12 Martin Baulig <martin@ximian.com>
11902 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
11903 interfaces on-the-fly; fixes #76625.
11905 * class-internals.h
11906 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
11907 don't need that anymore.
11909 2006-01-12 Miguel de Icaza <miguel@novell.com>
11912 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
11913 To avoid initing the nested_classes when not needed I turned the
11914 PeerCredData as a toplevel internal class, as it has to be shared
11917 Fixes the CASA issue.
11919 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
11921 * domain.c: Accessors for MonoJitInfo
11923 * profiler-private.h: Add jitinfo to the end jit hook
11925 * profiler.[ch]: Define new hooks, called after jitting which give
11926 the MonoJitInfo that was compiled
11928 2006-01-10 Martin Baulig <martin@ximian.com>
11930 * class.c (mono_class_setup_events): Add support for generic
11931 classes; fixes #76440.
11933 2006-01-06 Raja R Harinath <rharinath@novell.com>
11936 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
11937 on passed-in method.
11939 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11941 * object.c (mono_runtime_invoke_array): Add Nullable support.
11943 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
11945 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
11947 * file-io.c: Don't consider sockets as directory and avoid an endless
11948 loop. Fix bug #76966.
11950 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11952 * object.c (mono_nullable_init): New helper function.
11953 (mono_nullable_box): Ditto.
11955 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
11957 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
11959 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
11961 2006-01-02 Zoltan Varga <vargaz@gmail.com>
11963 * class.c (mono_class_is_assignable_from): Make T assignable to
11966 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
11968 * appdomain.c: Bump corlib version to 46.
11969 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
11970 serialization purpose) and changed ves_icall_System_Reflection_
11971 Assembly_get_code_base signature to accept a boolean (to escape, or
11972 not, the assembly code base).
11974 2005-12-23 Dick Porter <dick@ximian.com>
11978 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
11979 CreateEvent icall now returns "created" boolean parameter.
11981 2005-12-22 Zoltan Varga <vargaz@gmail.com>
11983 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
11986 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
11987 when attr_klass is an interface. Fixes #77045.
11989 2005-12-20 Zoltan Varga <vargaz@gmail.com>
11991 * marshal.c (emit_struct_conv): Fix previous patch.
11993 * marshal.c (emit_struct_conv): Add a check for fields with the same
11996 2005-12-20 Raja R Harinath <rharinath@novell.com>
11998 Fix regression in Mono.C5.
11999 * class.c (mono_class_create_generic): If 'klass' is an interface
12000 set up the interface offsets.
12001 (mono_class_is_assignable_from): Don't throw away generic arguments.
12003 2005-12-19 Raja R Harinath <rharinath@novell.com>
12005 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
12008 2005-12-15 Raja R Harinath <rharinath@novell.com>
12010 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
12012 (do_mono_metadata_parse_generic_class): Don't pass the current
12013 generic context when parsing the type being instantiated: it
12014 cannot use it, anyway.
12016 * loader.c (method_from_memberref): Don't inflate a signature if
12017 it doesn't contain any type parameters.
12019 2005-12-15 Zoltan Varga <vargaz@gmail.com>
12021 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
12023 2005-12-14 Martin Baulig <martin@ximian.com>
12026 (mono_type_get_name_recurse): Don't return null for type
12027 parameters and open generic classes.
12028 (mono_class_setup_methods): Don't exclude generic instances.
12029 (mono_get_unique_iid): Use different IDs for different
12030 instantiations of the same generic type.
12031 (mono_class_setup_vtable): Only use setup_generic_vtable() for
12032 open generic instances; create a normal vtable for closed generic
12034 (mono_class_setup_vtable_general): We're now also called for
12035 closed generic instances.
12038 (mono_reflection_bind_generic_parameters): Correctly use
12039 mono_metadata_lookup_generic_inst() everywhere.
12041 2005-12-14 Zoltan Varga <vargaz@gmail.com>
12043 * object.c (mono_class_create_runtime_vtable): Call
12044 mono_class_setup_vtable ().
12046 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
12048 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
12051 * loader.c (mono_loader_set_error_type_load): Print the type load
12052 warnings to the console so they are more visible to the user.
12053 (mono_loader_set_error_method_load): Ditto.
12055 * reflection.c (ensure_runtime_vtable): Revert the last change as it
12058 * reflection.c (ensure_runtime_vtable): Fix build.
12060 * reflection.c (ensure_runtime_vtable): Disable an optimization which
12061 doesn't work in all cases.
12063 2005-12-13 Zoltan Varga <vargaz@gmail.com>
12065 * object.c (mono_array_new_full): Treat a single dimensional array
12066 with 0 lower bounds as an szarray. Fixes #76973.
12068 * reflection.c (custom_attr_visible): Really fix this.
12070 2005-12-12 Zoltan Varga <vargaz@gmail.com>
12072 * reflection.c (custom_attr_visible): Allow nested public attributes
12075 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
12078 2005-12-12 Raja R Harinath <harinath@gmail.com>
12080 * class.c (set_generic_param_owner): Delete.
12081 (mono_class_create_from_typedef): Don't set ->owner field of
12082 generic parameters to "param containers" of enclosing classes.
12083 * reflection.c (mono_reflection_initialize_generic_parameter):
12086 2005-12-11 Zoltan Varga <vargaz@gmail.com>
12088 * reflection.c (custom_attr_visible): Fix build.
12090 2005-12-10 Zoltan Varga <vargaz@gmail.com>
12092 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
12093 private attributes.
12095 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
12096 handling of null parameter defaults.
12098 2005-12-09 Raja R Harinath <rharinath@novell.com>
12100 * class.c (mono_class_from_generic_parameter): Don't set
12101 klass->generic_container.
12102 (my_mono_class_from_generic_parameter): Likewise.
12104 2005-12-07 Zoltan Varga <vargaz@gmail.com>
12106 * reflection.c (load_public_key): Fix a warning.
12107 (method_encode_code): Fix unaligned accesses.
12109 2005-12-07 Martin Baulig <martin@ximian.com>
12111 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
12114 (write_generic_param_entry): Encode our custom attrs.
12116 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
12118 2005-12-07 Martin Baulig <martin@ximian.com>
12120 * reflection.c (encode_new_constraint): Removed; we don't use the
12121 `NewConstraintAttribute' anymore.
12123 2005-12-06 Zoltan Varga <vargaz@gmail.com>
12125 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
12126 not fire a TypeResolve event when Assembly.GetType () is called.
12128 2005-12-05 Ben Maurer <bmaurer@ximian.com>
12130 Beginning of support for nullable types in the runtime. Parts of
12131 this patch are from Martin.
12133 * appdomain.c (MONO_CORLIB_VERSION): Bump
12135 * domain.c (mono_init_internal): get the nullable type
12137 * class.c (mono_class_is_nullable): New method
12138 (mono_class_get_nullable_param): New mehod
12139 (mono_class_create_generic): In types T? set cast_class to T
12141 * class-internals.h (MonoDefaults): new nullable default class
12142 (mono_class_get_nullable_param, mono_class_get_nullable_param):
12145 2005-12-05 Raja R Harinath <rharinath@novell.com>
12147 * metadata.c (select_container): New. Refactor code to select the
12148 appropriate GenericContainer given the type of generic parameter
12149 we are looking for.
12150 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
12151 not a MonoGenericContext. Use select_container. Update parameters.
12152 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
12153 and MONO_TYPE_MVAR.
12154 (unwrap_arrays): Remove duplicate tests.
12155 (find_generic_param): Rename from 'has_same_context'. Now walks a
12156 generic instantiated class to find any arguments that are generic
12158 (mono_type_create_from_typespec_full): Use find_generic_param to
12159 avoid evicting some generic instantiations from the typespec
12162 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
12164 * reflection.c: fixed writing of doubles on ARM FPA.
12166 2005-12-02 Robert Jordan <robertj@gmx.net>
12168 * icall.c: Fixed EventInfo.ReflectedType (#76829).
12170 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12172 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
12173 least on SUSE 10 they are not the same (on debian, they are just the
12176 2005-12-01 Raja R Harinath <rharinath@novell.com>
12178 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
12179 DeclaringType for VARs and MVARs.
12180 * class.c (set_generic_param_owner): Fix initialization of owner
12183 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
12185 * icall.c: fixed Enum.ToObject() to correctly convert the values.
12187 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12189 * threadpool.c: workaround for a bug that shows up on the Mac:
12190 select()+connect() on a blocking socket is not like it should
12191 be, so we proceed to connect() in that case, wasting the I/O
12192 threadpool thread until connect succeedes. Fixes bug #75436.
12194 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12196 * threadpool.c: fix typo when setting file descriptor states.
12198 2005-11-28 Raja R Harinath <rharinath@novell.com>
12200 * class-internals.h (MonoGenericContainer.is_signature): Remove.
12201 * metadata.c (mono_metadata_parse_method_signature_full): Don't
12202 create a temporary signature container.
12203 (mono_metadata_parse_generic_param): Update to changes.
12204 (mono_type_create_from_typespec_full): Update to changes.
12205 * loader.c (method_from_memberref): Don't use a
12206 MonoGenericContainer while parsing a memberref signature.
12207 (method_from_methodspec): Remove dead-store of the 'container'
12208 variable. It's overwritten before use.
12210 * metadata.c (mono_type_create_from_typespec_full): Make debugging
12212 (mono_metadata_parse_generic_param): Likewise.
12213 * loader.c (find_method_in_class): Does not need a
12214 MonoGenericContainer. Use 'mono_method_signature' rather than
12215 'mono_method_signature_full'.
12216 (find_method, mono_get_method_constrained, method_from_memberref):
12219 * metadata.c (mono_type_create_from_typespec_full): Ensure that
12220 owner-less generic-parameters are never evicted from the typespec
12223 * loader.c (method_from_memberref): Don't use the current context
12224 when parsing signatures.
12225 (method_from_methodspec, mono_get_method_from_token): Update to changes.
12227 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
12228 side-effects in g_assert.
12229 * loader.c (mono_get_method_from_token): Resolve klass earlier so
12230 that we don't potentially lose information.
12232 2005-11-26 Dick Porter <dick@ximian.com>
12235 * threads.c: icalls to implement basic (ie, not named)
12236 System.Threading.Semaphore.
12238 2005-11-24 Dick Porter <dick@ximian.com>
12241 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
12242 Use GetProcessId() if it's available.
12244 2005-11-23 Zoltan Varga <vargaz@gmail.com>
12246 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
12248 2005-11-23 Raja R Harinath <rharinath@novell.com>
12249 Ankit Jain <jankit@novell.com>
12251 * loader.c (mono_get_method_from_token): Initialize 'method' field
12252 of all generic parameters before parsing the signature. Remove
12253 code that "fixed"-up MVAR references.
12255 2005-11-23 Ankit Jain <jankit@novell.com>
12257 * metadata.c (mono_metadata_has_generic_params):
12258 (mono_metadata_load_generic_param_constraints):
12259 (mono_metadata_load_generic_params): Move duplicate code ...
12260 (mono_metadata_get_generic_param_row): ... here. Returns the
12261 first row-id in GenericParam table for a given owner (token).
12262 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
12265 2005-11-23 Raja R Harinath <rharinath@novell.com>
12266 Ankit Jain <jankit@novell.com>
12268 * metadata.c (mono_metadata_class_equal): Pass signature_only when
12269 comparing VARs too.
12270 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
12271 type->data.generic_param only if the type is an MVAR.
12272 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
12273 leak owner-less VARs and MVARs into managed space.
12275 2005-11-21 Martin Baulig <martin@ximian.com>
12277 * class-internals.h
12278 (MonoMethod): Moved the `generic_container' here from
12279 `MonoMethodNormal' since we now also need it for
12280 `MonoMethodPInvoke';
12281 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
12282 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
12283 an union containing both `MonoMethodNormal' and
12284 `MonoMethodPInvoke'.
12287 (mono_get_method_from_token): Allow implementing generic methods
12291 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
12294 2005-11-17 Dick Porter <dick@ximian.com>
12298 * process.c: Split the Process Start_internal icall into
12299 ShellExecuteEx_internal and CreateProcess_internal, which are
12300 called depending on whether UseShellExecute is true. Fixes bug
12303 * appdomain.c (MONO_CORLIB_VERSION): Incremented
12305 2005-11-17 Zoltan Varga <vargaz@gmail.com>
12307 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
12308 'msize' parameters, use the information in 'mspec' instead.
12309 (emit_object_to_ptr_conv): Ditto.
12311 * marshal.c (emit_struct_conv): Handle explicit layout structs with
12312 fields out of order. Fixes #76733.
12314 2005-11-17 Ankit Jain <jankit@novell.com>
12316 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
12318 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
12320 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
12323 2005-11-16 Zoltan Varga <vargaz@gmail.com>
12325 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
12326 for types with non-auto layout. Fixes #76717.
12328 2005-11-16 Ankit Jain <jankit@novell.com>
12330 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
12331 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
12332 if generic_context is null.
12333 (mono_metadata_generic_param_equal): param->owner can be null.
12334 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
12337 2005-11-16 Zoltan Varga <vargaz@gmail.com>
12339 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
12342 2005-11-15 Martin Baulig <martin@ximian.com>
12344 * object.c (set_value): Use mono_class_from_mono_type() instead of
12345 the hack for generic instances; fixes #76136.
12347 2005-11-15 Zoltan Varga <vargaz@gmail.com>
12349 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
12352 * image.c (load_metadata_ptrs): Initialize the new fields.
12354 * reflection.c (create_dynamic_mono_image): Ditto.
12356 * reflection.c (build_compressed_metadata): Use the new fields.
12358 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
12361 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
12364 2005-11-15 Ankit Jain <jankit@novell.com>
12365 Raja R Harinath <harinath@gmail.com>
12367 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
12368 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
12369 new per-generic_container cache if the cached MonoType's context matches
12370 the current context.
12371 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
12372 to the expected context.
12373 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
12375 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12377 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
12378 we changed the signature of an icall.
12379 * icall.c: Modify to mono_double_ParseImpl return true/false
12380 depending on the success, instead of throwing the exception. This will
12381 help us in Double.TryParse methods.
12383 2005-11-14 Zoltan Varga <vargaz@gmail.com>
12385 * marshal.c (emit_marshal_object): Throw an exception when
12386 marshalling 'object' instead of crashing. Fixes #76696.
12388 2005-11-11 Zoltan Varga <vargaz@gmail.com>
12390 * class-internals.h: Add prototype for mono_type_get_full_name ().
12392 2005-11-11 Dick Porter <dick@ximian.com>
12394 * threads.c (mono_thread_manage): Make sure the main thread has
12395 abandoned all its mutexes when cleaning up. Fixes bug 74680.
12397 2005-11-11 Zoltan Varga <vargaz@gmail.com>
12399 * loader.c (mono_loader_set_error_type_load): Log a warning to the
12400 console about the missing type.
12401 (mono_loader_set_error_method_load): Ditto.
12403 2005-11-09 Miguel de Icaza <miguel@novell.com>
12405 * mono-config.c (mono_get_config_dir): Set the system defaults if
12408 * assembly.c (mono_set_dirs): New API entry point to set the
12409 assembly and the config directory in one call
12411 2005-11-09 Zoltan Varga <vargaz@gmail.com>
12413 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
12414 the ftnptr was created from a delegate in a domain other than the
12415 current domain. Fixes #75377.
12417 * exception.h exception.c: Add mono_get_exception_not_supported ().
12419 2005-11-08 Martin Baulig <martin@ximian.com>
12421 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
12423 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
12425 * security-manager.h: Added definitions to deal with strongname key
12426 pairs bigger (and smaller) than 1024 bits.
12427 * reflection.c: Remove hardcoded strongname size (128 bytes) and
12428 adjust wrt the public key length being used.
12430 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
12432 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
12433 Windows build (r51396-51397).
12435 2005-11-03 Martin Baulig <martin@ximian.com>
12437 * class.c (mono_class_setup_vtable_general): Also add generic
12438 methods to the vtable; fixes #76581.
12440 2005-11-01 Miguel de Icaza <miguel@novell.com>
12442 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
12443 sure that we lookup GetString method from the System.Text.Encoding
12444 class, not the derived class or we get an empty method.
12446 Fixed class #76612.
12448 2005-10-25 Miguel de Icaza <miguel@novell.com>
12450 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
12451 if it has been previously set (embedders).
12453 Make mono_set_rootdir available also on Unix.
12455 005-10-24 Robert Jordan <robertj@gmx.net>
12457 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
12459 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
12461 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
12462 only calls which are made to native code use this flag.
12464 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
12466 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
12468 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
12469 Add support for FieldBuilders.
12471 2005-10-29 Martin Baulig <martin@ximian.com>
12474 (mono_debug_using_mono_debugger): New public method; returns
12475 whether we're running inside the debugger.
12477 2005-10-27 Zoltan Varga <vargaz@gmail.com>
12479 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
12480 for Method/Constructor/FieldBuilders.
12482 2005-10-26 Zoltan Varga <vargaz@gmail.com>
12484 * reflection.c (module_add_cattrs): Save custom attributes for global methods
12485 and fields as well.
12487 2005-10-26 Martin Baulig <martin@ximian.com>
12489 * mono-debug-debugger.c
12490 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
12492 2005-10-24 Raja R Harinath <harinath@gmail.com>
12494 * icall.c (base64_to_byte_array): Don't pass an out-of-range
12495 integer to isspace.
12497 2005-10-21 Zoltan Varga <vargaz@gmail.com>
12499 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
12500 when passing valuetypes byref. Fixes #76502.
12502 2005-10-19 Jackson Harper <jackson@ximian.com>
12504 * profiler.c: Don't put a . in front of types that are not in a
12507 2005-10-18 Zoltan Varga <vargaz@gmail.com>
12509 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
12511 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
12513 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
12515 (mono_marshal_get_ldflda_wrapper): Fix a warning.
12517 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12519 * assembly.c metadata-internals.h icall.c: Define an additional
12520 parameter for mono_assembly_name_parse_full, so we can avoid creating
12521 S.R.AssemblyName.Version when no version info wasn't passed.
12523 2005-10-09 Miguel de Icaza <miguel@novell.com>
12525 * class.c (mono_type_get_full_name): Reimplement method that was
12528 * image.c: Some docs
12530 2005-10-10 Zoltan Varga <vargaz@gmail.com>
12532 * profiler.c (output_newobj_profile): Fix printing of Total memory
12535 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
12537 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
12539 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
12541 * threads.c: remove debug output.
12543 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
12545 * threads.c (mono_thread_manage): Fix crashes if more than 64
12546 threads need to be aborted. Hopefully fixes #75899.
12548 * assembly.c (mono_stringify_assembly_name): New helper function.
12550 * class.c: Use mono_stringify_assembly_name instead of the similar
12553 * assembly.h assembly.c: Add support for calling a postload search
12554 hook if an assembly cannot be loaded.
12556 * appdomain.c: Register new search hooks which call the AssemblyResolve
12557 events in AppDomain. Fixes #75231
12559 2005-10-07 Martin Baulig <martin@ximian.com>
12561 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
12562 methods without debug info.
12564 2005-10-07 Zoltan Varga <vargaz@gmail.com>
12566 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
12569 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12571 * file-io.c: now that we return symlinks, use lstat and, when the file
12572 is a symbolic link, stat, to get the file attributes. Also avoid the
12573 conversion to/from utf16/external.
12575 2005-10-06 Zoltan Varga <vargaz@gmail.com>
12577 * class.c (mono_class_layout_fields): Compute klass->has_references
12578 correctly if an embedded valuetype is not yet initialized. Fixes
12581 2005-10-04 Martin Baulig <martin@ximian.com>
12584 (mono_metadata_load_generic_param_constraints): New public
12585 function; splitted the constraints loading out from
12586 mono_metadata_load_generic_params().
12588 * class.c (mono_class_create_from_typedef): Call
12589 mono_metadata_load_generic_param_constraints() after setting up
12590 the type and creating our parent; fixes #75329.
12592 2005-10-04 Martin Baulig <martin@ximian.com>
12594 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
12595 non-dynamic parent classes.
12597 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
12599 * file-io.c : win32 build fix (ETXTBSY seems not found).
12601 2005-10-04 Martin Baulig <martin@ximian.com>
12604 (mono_image_get_methodspec_token): Make the cache actually work;
12607 2005-10-04 Martin Baulig <martin@ximian.com>
12609 * class.c (mono_class_name_from_token): Removed the unneccessary
12610 `MonoGenericContext *' argument.
12612 2005-10-04 Martin Baulig <martin@ximian.com>
12615 (method_from_methodspec): Make the caching work again; fixes the
12616 performance regression from #76262.
12618 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12622 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
12623 GetFileSystemEntries that performs the same work but without going
12624 into io-layer, locking, etc.
12626 2005-09-30 Zoltan Varga <vargaz@gmail.com>
12628 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
12629 ThreadState_Stopped as well. Fixes #76047.
12631 2005-09-29 Martin Baulig <martin@ximian.com>
12634 (inflate_generic_context): If the new context has a `gmethod', set
12635 its `container' that that gmethod's `container'.
12638 (mono_metadata_parse_generic_param): Simplify things;
12639 `generic_container = generic_context->container;' is just fine.
12641 * loader.c (method_from_methodspec): Code cleanups.
12643 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
12645 * decimal.c: fix warning (and let gcc generate correct
12646 code on ARM with optimizations).
12648 2005-09-28 Martin Baulig <martin@ximian.com>
12651 (method_from_memberref): Added `MonoGenericContext *class_context'
12652 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
12653 (method_from_methodspec): If we're a memberref, use the enclosing
12654 context when parsing its parent. Fixes #76262; see gtest-206.cs.
12656 2005-09-28 Martin Baulig <martin@ximian.com>
12658 * object.c (mono_runtime_invoke_array): Added support for
12659 MONO_TYPE_GENERICINST; fixes #75917.
12661 2005-09-27 Martin Baulig <martin@ximian.com>
12663 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
12664 `k->byval_arg.type' to determine the actual type.
12666 * loader.c (method_from_methodspec): Removed some hacks.
12668 2005-09-27 Ben Maurer <bmaurer@ximian.com>
12670 * class-internals.h (mono_field_is_deleted): Do the test for
12671 rtspecialname before we check the actual name of the field. This
12672 prevents us from dereferencing a pointer into the string table,
12673 saving us from accessing a few pages
12675 * *.c: Replace the use of {Enter,Leave}CriticalSection with
12676 macros. This will allow a deadlock debugger to easily be plugged
12679 2005-09-27 Martin Baulig <martin@ximian.com>
12681 * loader.c (method_from_methodspec): Create a "signature"
12682 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
12684 2005-09-27 Martin Baulig <martin@ximian.com>
12687 (inflate_generic_class): Correctly set the new context's
12691 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
12692 instead of a `MonoGenericContext *'.
12693 (mono_method_signature_full): Take a `MonoGenericContainer *'
12694 instead of a `MonoGenericContext *'.
12697 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
12698 instead of a `MonoGenericContext *'.
12699 (mono_metadata_parse_method_signature_full): Likewise.
12701 2005-09-26 Martin Baulig <martin@ximian.com>
12704 (mono_class_from_generic_parameter): Set `klass->generic_container'
12705 (mono_class_from_generic_parameter): Likewise.
12706 (mono_bounded_array_class_get): We inherit the generic container
12707 from the element class.
12710 (find_method, find_method_in_class): Take a `MonoGenericContext *'
12711 argument rather than computing it here.
12712 (method_from_memberref): Correctly set the generic context before
12713 parsing the signature. Fixes #75681.
12715 2005-09-26 Zoltan Varga <vargaz@gmail.com>
12717 * object.c (mono_class_has_special_static_fields): Fix warnings.
12719 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12721 * assembly.c: Add parse_public_key function, to
12722 par the public keys. Also added mono_assembly_name_parse_full,
12723 to define it the parsed key should be freed or not.
12724 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
12725 to parse a long format assembly name.
12726 * metadata-internals.h: Keep mono_assembly_name_parse_full as
12727 private, since calling it to preserve the key requires
12728 freeing it manually.
12730 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
12732 * locales.c : removed HAVE_ICU part.
12734 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
12736 * object.c (mono_class_create_runtime_vtable): Avoid calling
12737 field_is_special_static if the klass has no special static fields.
12739 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
12740 (MonoCachedClassInfo): Likewise.
12742 * object.c (mono_class_has_special_static_fields): New helper function.
12744 2005-09-23 Zoltan Varga <vargaz@gmail.com>
12746 * class.c (mono_class_create_from_typedef): Don't call
12747 interfaces_from_typedef_full for enums.
12748 (mono_class_create_from_typedef): Compute the base types of enums directly
12749 without calling mono_class_setup_fields ().
12750 (mono_class_find_enum_basetype): New helper function.
12752 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
12753 one place inside the string heap.
12755 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
12757 * class.c: locking fixes, code cleanups, some docs added.
12758 Allocate some data structures in the image mempool.
12760 2005-09-23 Zoltan Varga <vargaz@gmail.com>
12762 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
12765 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
12767 * class-internals.h, class.c, reflection.c: reduce memory taken by
12770 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
12772 * metadata.c, metadata.h, loader.h: documentation updates, code and
12775 2005-09-23 Zoltan Varga <vargaz@gmail.com>
12777 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
12780 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
12781 page faults caused by the runtime while reading metadata.
12783 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12785 * socket-io.c: the field names were changed 3 months ago and no one
12786 realized until bug #76077 got filed!
12788 2005-09-20 Martin Baulig <martin@ximian.com>
12790 * icall.c (assembly_icalls): Removed some unused debugger icalls.
12792 2005-09-20 Martin Baulig <martin@ximian.com>
12794 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
12795 write the rank into the class entry.
12797 2005-09-20 Martin Baulig <martin@ximian.com>
12799 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
12801 2005-09-19 Zoltan Varga <vargaz@gmail.com>
12803 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12805 * icall.c (custom_attrs_defined_internal): New icall.
12807 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
12809 (mono_custom_attrs_construct_by_type): New helper function.
12811 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
12813 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
12814 terminate the resulting string. Fixes #76123.
12816 2005-09-16 Martin Baulig <martin@ximian.com>
12819 (mono_debug_add_method): Ignore inflated methods for the moment.
12821 2005-09-14 Martin Baulig <martin@ximian.com>
12823 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
12825 2005-09-13 Zoltan Varga <vargaz@gmail.com>
12827 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
12828 return a success/failure indication.
12829 (mono_metadata_interfaces_from_typedef_full): Ditto.
12830 (get_constraints): Ditto.
12832 2005-09-12 Zoltan Varga <vargaz@gmail.com>
12834 * marshal.c (emit_marshal_array): Fix handling of null arrays.
12836 * marshal.c (emit_marshal_array): Add support for returning string
12837 arrays from delegates. Fixes #76063.
12839 * marshal.c: Use the emit_ldloc/stloc macros where possible.
12841 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12843 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
12846 2005-09-09 Zoltan Varga <vargaz@gmail.com>
12848 * reflection.c icall.c: Fix after mono_get_exception_type_load
12851 * assembly.c (mono_assembly_get_assemblyref): New helper function.
12852 (mono_assembly_load_reference): Use the new helper.
12854 * class-internals.h (MonoLoaderError): New structure containing
12855 information about type loading errors.
12857 * class-internals.h loader.c: Add APIs to store per-thread loader
12860 * loader.c class.c: Set the loader error if needed.
12862 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
12864 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
12866 * decimal.c: fixed to handle the broken ARM fp format.
12868 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
12870 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
12873 2005-09-06 Martin Baulig <martin@ximian.com>
12875 * domain.c (supported_runtimes): Added v2.0.50727.
12877 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
12879 * culture-info.h: reduce the size of some structures.
12881 2005-09-05 Martin Baulig <martin@ximian.com>
12883 Reflect latest API changes in the August CTP.
12886 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
12887 ("MonoType.HasGenericArguments"): Removed.
12888 ("MonoMethod.BindGenericParameters"): Renamed to
12889 "MakeGenericMethod".
12890 ("MethodBuilder.BindGenericParameters"): Renamed to
12891 "MakeGenericMethod".
12893 2005-09-05 Martin Baulig <martin@ximian.com>
12895 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
12897 2005-09-05 Martin Baulig <martin@ximian.com>
12899 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12901 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
12902 generic_container is non-NULL.
12904 2005-09-05 Martin Baulig <martin@ximian.com>
12906 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12908 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
12910 2005-08-29 Michal Moskal <malekith@nemerle.org>
12912 * reflection.c (encode_locals,
12913 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
12914 for large generic types.
12916 2005-09-05 Martin Baulig <martin@ximian.com>
12918 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12920 * class.c (mono_dup_array_type): New public method.
12921 (mono_metadata_signature_deep_dup): New public method.
12922 (dup_type): Correctly duplicate array and function types.
12924 2005-09-05 Martin Baulig <martin@ximian.com>
12926 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12928 * reflection.c (get_default_param_value_blobs): Handle generic types
12929 and generic methods.
12931 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
12933 * class.c: Fixed error reporting (method/class were inversed) for
12934 inheritance demands.
12935 * security-manager.c|h: Added the AppDomain when calling the managed
12936 System.Security.SecurityManager.InheritanceDemand method.
12938 2005-09-01 Raja R Harinath <rharinath@novell.com>
12940 * reflection.c (encode_marshal_blob): 'marshaltype' and
12941 'marshaltyperef' are alternate sources for the custom marshaler
12944 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
12946 * class.c: fix creation of array classes with rank == 1
12947 (patch by Ankit Jain <jankit@novell.com>).
12949 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
12951 * object.c: fix check for creating the bound data for arrays vs
12954 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12956 * object.c: configuration file name is now based on the executable name,
12957 not the image name. Fixes bug #75931.
12959 2005-08-29 Zoltan Varga <vargaz@gmail.com>
12961 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
12962 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
12964 2005-08-25 Zoltan Varga <vargaz@gmail.com>
12966 * rand.c: Use wincrypt.h instead of WinCrypt.h.
12968 2005-08-24 Ankit Jain <jankit@novell.com>
12969 Raja R Harinath <rharinath@novell.com>
12971 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
12972 called by it recursively.
12973 (mono_class_init): Remove special case in pending_init handling, since it's
12974 superseded by the fix to mono_class_from_typeref.
12976 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12978 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
12979 BROKEN_THREAD_START stuff.
12981 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
12983 * class-internals.h object.c: Add a new kind of trampoline called a delegate
12986 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
12988 * object.c (mono_delegate_ctor): Replace the original function address with
12989 a delegate trampoline.
12991 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
12993 * icall.c: add boolean argument to base64_to_byte_array and
12994 InternalFromBase64String to control whether a whitespace-only string
12995 is allowed (or should casue a FormatException to be thrown). We need
12996 this as the behavior has changed between MS.NET 1.x and 2.0, and we
12997 to match the MS behaviour in both profiles.
12998 * appdomain.c: Bump corlib version.
13000 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13002 This patch implements a big portion of publisher policy
13003 support, used to bind assembly versions and redirect
13004 one assembly from version A to version B.
13007 New GSList loaded_assembly_bindings, for storing the cached
13009 (assembly_binding_maps_name): New static function for checking if a
13010 assembly binding information maps an assembly name.
13011 (mono_assembly_binding_info_free): New function for freeing
13012 assembly binding information resources.
13013 (get_publisher_policy_info): New static function for retrieving
13014 assembly binding information from a MonoImage.
13015 (compare_versions): New static function for comparing an assembly
13016 binding information data and the version of an assembly name.
13017 (check_policy_versions): New static function for checking if an
13018 assembly binding info mapping an assembly name is valid for it.
13019 (mono_assembly_load_publisher_policy): New static function for
13020 loading the 'policy.major.minor.MyAssembly' image for an assembly
13021 with an assembly name 'aname'.
13022 (mono_assembly_bind_version): New static function for updating
13023 assembly redirection.
13024 (mono_assembly_apply_binding): New static function for applying
13026 (search_binding_loaded): New static function for searching
13027 loaded assembly binding infos in the cache domain.
13028 (mono_assembly_load_full): Don't apply assembly binding for
13029 reflection only assemblies.
13031 * metadata-internals.h: Add MonoAssemblyBindingInfo,
13032 which contains information about assembly binding. Also
13033 declare signature for mono_config_parse_publisher_policy ()
13034 function, used to retrieve pub policy info.
13037 (publisher_policy_start): New static function used to parse publisher
13038 policy config files.
13039 (publisher_policy_parser): New static MonoParseHandler containing
13040 the functions used when parsing config files.
13041 (mono_config_parse_publisher_policy): New function for parsing
13042 publisher policy files.
13044 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
13046 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
13048 * marshal.c (mono_delegate_free_ftnptr): Ditto.
13050 * object.c (mono_get_addr_from_ftnptr): New helper function.
13052 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
13054 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13056 2005-08-19 Dick Porter <dick@ximian.com>
13058 * threads.c, threads.h, appdomain.c, appdomain.h,
13059 profiler-private.h, monitor.c, object.c, object-internals.h,
13060 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
13061 store the thread ID, so it can hold a 64 bit value if needed.
13063 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
13065 * reflection.c (mono_reflection_create_dynamic_method): Store the
13066 handle class into the method references as well so ldtoken works in
13069 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
13072 2005-08-19 Ankit Jain <jankit@novell.com>
13075 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
13076 here rather than using the method signature of a arbitrary function
13077 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
13079 Hack done with Harinath.
13081 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13083 * threadpool.c: disable printing stack traces when we get a exception
13084 in a threadpool thread. I need to do more testing to figure out which
13085 cases actually print this. Fixes bug #75828.
13087 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13089 * icall.c: there might be ignored whitespace after the last '='. This
13090 fixes length computation and bug #75840.
13092 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
13094 * assembly.c (mono_assembly_load_full): Consider .exe extension as
13095 well. Fixes #75809.
13097 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
13100 * reflection.c (create_custom_attr_data): Ditto.
13102 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
13104 * locales.c, culture-info.h : removed RegionLCIDMap.
13105 * culture-info-tables.h : regenerated.
13107 2005-08-16 Martin Baulig <martin@ximian.com>
13109 * class.c (mono_type_get_name_recurse): Small fix.
13111 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
13113 * locales.c : indentation fixie.
13115 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
13117 * object-internals.h,
13121 icall.c : added RegionInfo table support.
13122 * culture-info-table.h : regenerated for region support.
13124 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
13126 * reflection.c (resolve_object): handle all kinds of MonoMethod
13127 including generic ones
13129 2005-08-12 Ankit Jain <jankit@novell.com>
13131 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
13132 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
13134 2005-09-12 Lluis Sanchez <lluis@ximian.com>
13136 * process.c: Don't close a thread handle when it's NULL. This is a
13137 workaround for bug #75733.
13139 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
13141 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
13143 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
13145 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
13147 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13149 * threadpool.c: if a work item in the thread pool has a callback that
13150 catches a exception, don't propagate it after invoking the callback.
13153 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
13155 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
13157 * class-internals.h (MonoCachedClassInfo): Add some new fields.
13159 * class.c (mono_class_init): Load field info lazily in the AOT case.
13161 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
13163 2005-08-03 Ankit Jain <jankit@novell.com>
13166 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
13167 PInvoke calling convention is 0.
13169 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
13171 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
13172 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
13174 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
13176 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
13177 to handle threads not started by the GC (patch by Michael Meeks
13178 <michael.meeks@novell.com>).
13180 2005-07-31 Kamil Skalski <nazgul@omega.pl>
13182 * reflection.c: Make buffer used in emitting types larger for some
13183 big generic types (patch by Michal Moskal).
13185 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
13187 * mono-debug.c: Fix some (not all) alignment problems.
13189 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13191 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
13192 Invoke mono_image_load_from_data_full passing the refonly
13196 (mono_assembly_open_from_bundle): Add the refonly argument,
13197 in order to pass it to other methods it calls to.
13198 (do_mono_assembly_open): Add the refonly argument, in order
13199 to pass it to other methods it calls to.
13200 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
13201 the refonly parameter to it.
13203 * image.c: Add loaded_images_refonly_hash and
13204 loaded_images_refonly_guid_hash to cache the reflection
13205 only loaded images.
13206 (mono_images_init): Initialize the hash tables used for
13207 caching the reflection only images.
13208 (load_modules): Invoke mono_image_open_full passing the refonly
13209 parameter to load the modules the correct way.
13210 (build_guid_table): Add the refonly argument, to re-build the
13211 correct hash table.
13212 (do_mono_image_open): Added the refonly argument, in order to
13213 define it for the loaded image.
13214 (mono_image_loaded_full): New function, which receives an
13215 additional parameter to look for the image in the refonly or
13216 non-refonly section.
13217 (mono_image_loaded): Updated, using mono_image_loaded_full.
13218 (mono_image_loaded_by_guid_full): The same case that happens
13219 with mono_image_loaded_full.
13220 (mono_image_loaded_by_guid): Likewise.
13221 (register_image): Use the ref_only variable inside MonoImage
13222 to decide in which hash table store the current image.
13223 (mono_image_open_from_data_full): Rename
13224 mono_image_open_from_data to mono_image_open_from_data_full,
13225 adding the refonly argument, to define the ref_only variable
13227 (mono_image_open_from_data): Return
13228 mono_image_open_from_data_full.
13229 (mono_image_open_full): Rename mono_image_open to
13230 mono_image_open_full, receiving the new refonly argument,
13231 to pass it to inner methods.
13232 (mono_pe_file_open): Update this function, to open
13233 a MonoImage as a non-refonly image.
13234 (mono_image_close): Use the refonly variable inside
13235 MonoImage to remove the image from the correct caches.
13237 * image.h: Add the signatures of mono_image_open_full,
13238 mono_image_open_from_data_full, mono_image_loaded_full,
13239 mono_image_loaded_by_guid_full.
13241 * metadata-internals.h: Add the ref_only field to
13244 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13246 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
13247 Fix the last behavior, which used to load the assemblies and
13248 extract MonoReflectionAssemblyName information, instead of
13249 extract it from the metadata tables. Needed for Reflection
13252 2005-07-29 Martin Baulig <martin@ximian.com>
13254 * mono-debug-debugger.c
13255 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
13259 (mono_debug_address_from_il_offset): Check whether we have
13260 debugging support before attempting to take the lock.
13261 (mono_debug_source_location_from_address): Likewise.
13262 (mono_debug_source_location_from_il_offset): Likewise.
13263 (mono_debug_il_offset_from_address): Likewise.
13264 (mono_debug_address_from_il_offset): Likewise.
13266 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
13268 * class.c (mono_class_from_name_case): Add support for dynamic images.
13271 * object.c (mono_class_compute_gc_descriptor): Add a workaround
13274 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
13276 * reflection.c (mono_method_get_object): Fix warning.
13278 2005-07-28 Martin Baulig <martin@ximian.com>
13281 (mono_debug_add_wrapper): Also write the wrapper type.
13283 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
13285 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
13287 * class.c (mono_class_init): Avoid reading nested classes if the AOT
13288 data indicates the class has none.
13290 2005-07-26 Ben Maurer <bmaurer@ximian.com>
13292 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
13293 loader lock with the debugger lock. Prevents deadlocks for beagle.
13295 Beagle can now run on an smp box for a weekend without any
13298 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
13300 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
13301 in a module. Fixes #75629.
13303 2005-07-26 Martin Baulig <martin@ximian.com>
13305 * mono-debug.c (mono_debug_add_wrapper): New static method.
13306 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
13307 interncall or a wrapper.
13309 * mono-debug.h (MonoDebugWrapperData): New public typedef.
13310 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
13311 (MONO_DEBUGGER_VERSION): Bump to 51.
13313 * mono-debug-debugger.c
13314 (mono_debugger_add_type): Removed this empty function.
13315 (mono_debugger_add_method): Likewise.
13317 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
13319 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
13320 before accessing method->slot.
13322 2005-07-21 Jb Evain <jbevain@gmail.com>
13324 * reflection.c (method_encode_clauses/class): Handle filters clauses.
13327 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
13329 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
13332 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
13334 * image.h image.c: Add mono_image_get_guid () API function.
13336 2005-07-19 Ben Maurer <bmaurer@ximian.com>
13338 There were issues when multiple threads tried to load
13339 assemblies. A deadlock was created between assemblies_mutex and
13340 mono_domain_assemblies_lock. This fixes the issue by making the
13341 assembly ref counting be lock free. See bug 75586.
13343 * image.c (mono_image_close): The add ref function here was using
13344 Interlocked operations while the unref was using a mutex and a
13345 --. I don't think this was ever a bug that would be exposed in a
13346 non-pendantic way (ie, by an embedder doing a ref on one thread
13347 and an unref on another), but for the sake of correctness, this is
13350 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
13351 (mono_assembly_load_reference): Call mono_assembly_addref rather
13352 than touching the refcount ourselves.
13353 (mono_assembly_close): Use InterlockedDecrement to unref the
13354 assembly. Don't acquire the lock unless it is actually needed.
13356 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
13358 * class.c (mono_class_layout_fields): Fix calculation of has_references
13361 2005-07-12 Martin Baulig <martin@ximian.com>
13363 Applying a patch from Michal Moskal <malekith@nemerle.org>.
13366 (mono_type_hash): Provide better hashing for generic instances.
13367 (mono_generic_inst_hash): Improve hashing.
13368 (mono_generic_class_hash): Likewise.
13370 * reflection.c (mymono_metadata_type_hash): Improve hashing for
13373 2005-07-12 Martin Baulig <martin@ximian.com>
13375 * reflection.c (mono_reflection_create_runtime_class): Remove the
13376 hack for generic type definitions and non-`Run' assemblies.
13377 (mono_reflection_bind_generic_parameters): Also use
13378 `klass->wastypebuilder' to check for TypeBuilders.
13380 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
13382 * class.c (mono_class_layout_fields): Fix calculation of has_references
13385 * class.c (inflate_generic_class): Fix a leak.
13386 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
13389 2005-07-11 Martin Baulig <martin@ximian.com>
13391 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
13394 2005-07-11 Martin Baulig <martin@ximian.com>
13396 * loader.c (find_method): Also lookup in
13397 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
13399 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
13401 * appdomain.c (mono_domain_unload): Don't free the error message
13402 before passing it to mono_get_exception_...
13404 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
13406 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
13408 * threads.c: try to better guess an available RT signal (bug #75387).
13410 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
13412 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
13415 2005-07-07 Martin Baulig <martin@ximian.com>
13417 * class.c (mono_type_get_name_full): Return NULL for
13418 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
13421 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
13423 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
13424 exit the appdomain as well being aborted.
13426 * threadpool.c: Create all threadpool threads inside the root appdomain, and
13427 change back to the root domain after calling managed code. This enables
13428 appdomains using threadpools to be unloaded.
13430 2005-07-07 Martin Baulig <martin@ximian.com>
13432 * class-internals.h
13433 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
13434 into `MonoDynamicGenericClass' since we only need it for dynamic
13437 * reflection.c (mono_class_bind_generic_parameters): We don't need
13438 to compute the `parent' here.
13440 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
13442 * culture-info-table.h : regenerated.
13444 2005-07-06 Martin Baulig <martin@ximian.com>
13447 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
13449 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
13451 2005-07-06 Martin Baulig <martin@ximian.com>
13453 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
13454 we're doing a signature-only comparision; fixes #74945.
13456 2005-07-06 Martin Baulig <martin@ximian.com>
13458 * class-internals.h (MonoGenericClass): Moved some things out into
13459 a new `MonoInflatedGenericClass' type.
13460 (MonoInflatedGenericClass): New type; the `klass' of a
13461 `MonoGenericClass' is now computed lazyly in
13462 mono_get_inflated_generic_class().
13464 * class.c (mono_get_inflated_generic_class): New public function.
13465 (mono_class_inflate_generic_method): Removed the unused
13466 `MonoClass *' argument.
13467 (setup_generic_vtable): Don't call mono_get_inflated_method() on
13469 (mono_class_create_generic): Make this static and merge it with
13470 mono_class_create_generic_2(); we're now called automatically from
13471 mono_get_inflated_generic_class().
13473 * loader.c (mono_method_signature): Call
13474 mono_get_inflated_method() here.
13476 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
13478 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
13479 type of fields with RVA.
13481 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
13482 for this pseudo class.
13483 (my_mono_class_from_generic_parameter): Likewise.
13484 (mono_class_init): Allow interfaces to have cctors.
13486 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
13488 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
13489 lazily for AOT methods.
13491 2005-07-05 Martin Baulig <martin@ximian.com>
13493 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
13494 returns FALSE for a successful match, not TRUE.
13496 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
13498 * loader.c (mono_method_get_index): Optimize this a bit.
13500 2005-07-04 Martin Baulig <martin@ximian.com>
13503 (class_compute_field_layout): Move the check for generic type
13504 definitions into mono_class_layout_fields(). Fixes #74684.
13505 (mono_class_from_generic_parameter): Correctly compute
13506 `klass->parent'; fixes #75457.
13508 * reflection.c (register_assembly, register_module): Make sure
13509 `domain->rejobject_hash' is already created.
13511 2005-07-02 Martin Baulig <martin@ximian.com>
13513 * class-internals.h
13514 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
13515 `MonoDynamicGenericClass'.
13517 2005-07-01 Lluis Sanchez <lluis@ximian.com>
13519 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
13520 returned by a field getter is null, since null is a valid value.
13522 2005-07-01 Martin Baulig <martin@ximian.com>
13524 * reflection.c (mono_reflection_generic_class_initialize): Update
13525 the `dgclass->fields [i].parent' to the correct class.
13526 (mono_image_get_fieldref_token): Use the declaring type, not the
13529 2005-07-01 Martin Baulig <martin@ximian.com>
13531 * loader.c (find_method): Also look in the interfaces; fixes #75429.
13533 2005-06-30 Ben Maurer <bmaurer@ximian.com>
13535 * threads.c (thread_cleanup): assert that thread != NULL
13536 (wait_for_tids_or_state_change): We were using the wrong variable
13537 when accessing wait->threads. `i' was always out of the bounds of
13540 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13542 * loader.c: map user32 and kernel32 to libMonoSupportW
13544 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
13546 * appdomain.c (unload_thread_main): Mark this as WINAPI.
13548 2005-06-28 Martin Baulig <martin@ximian.com>
13550 * loader.c (method_from_methodspec): Fix #75334.
13552 2005-06-28 Martin Baulig <martin@ximian.com>
13554 Fix #74953 - Arrays now implement the generic IList<T> interface
13555 on the 2.0 platform.
13557 * class-internals.h (MonoDefaults): Added `generic_array_class'.
13559 * reflection.c (mono_class_bind_generic_parameters): New public
13560 function; similar to mono_reflection_bind_generic_parameters(),
13561 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
13563 * domain.c (mono_init_internal): Try to initialize.
13564 `mono_defaults.generic_array_class' here; this'll only succeed if
13565 we're using the 2.0 corlib.
13568 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
13569 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
13570 (mono_lookup_internal_call): Added support for nested classes.
13573 (mono_get_method_from_token): Set `result->signature->pinvoke' if
13574 we're an interncall and have generic arguments.
13577 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
13578 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
13579 instance of System.Array.InternalArray<T> for arrays, so they
13580 implement the generic IList<T> interface.
13582 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
13584 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
13585 (chastamar@yahoo.com). Fixes #75374.
13587 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
13589 * culture-info-table.h: regenerated.
13591 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13593 * icall.c: handle spaces correctly for base64 strings.
13595 2005-06-26 Ben Maurer <bmaurer@ximian.com>
13597 * *.c: Kill some warnings.
13599 2005-06-23 Duncan Mak <duncan@novell.com>
13601 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
13602 that this builds on Solaris 10 (x86).
13604 2005-06-23 Martin Baulig <martin@ximian.com>
13607 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
13608 generic type definitions.
13610 2005-06-23 Martin Baulig <martin@ximian.com>
13614 * metadata.c (mono_class_get_overrides): Renamed to
13615 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
13616 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
13617 pass it to mono_get_method_full().
13619 2005-06-22 Ben Maurer <bmaurer@ximian.com>
13621 * reflection.c (mono_reflection_create_runtime_class): take the
13622 mono_domain_lock in this method. Prevents deadlocks
13624 2005-06-22 Martin Baulig <martin@ximian.com>
13626 * loader.c (method_from_methodspec): Fix #75330.
13628 2005-06-22 Martin Baulig <martin@ximian.com>
13630 * reflection.c (type_get_qualified_name): Use
13631 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
13632 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
13633 argument; use it if we don't have an assembly name.
13635 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
13637 * object.c: In mono_message_init, set "copy out" flag for in
13638 parameters with the [Out] flag.
13640 2005-06-21 Martin Baulig <martin@ximian.com>
13643 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
13646 2005-06-21 Martin Baulig <martin@ximian.com>
13648 * class.c (mono_class_init): Don't initialize `class->fields' for
13649 generic instances since they're initialized again in
13650 compute_field_layout().
13651 (compute_field_layout): Set the field's `generic_info' here; fix
13654 2005-06-21 Martin Baulig <martin@ximian.com>
13656 * class-internals.h
13657 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
13659 * metadata.c (mono_metadata_generic_method_equal): Also
13660 distinguish the `generic_class'; fixes #75334.
13662 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13666 * domain-internals.h:
13667 * reflection.c: 'domain_assemblies' field is now protected by its own
13668 lock. Don't call into managed code to run the AssemblyLoad event if we
13669 now there are no registered delegates for it.
13671 2005-06-20 Martin Baulig <martin@ximian.com>
13673 * class.c (mono_class_is_assignable_from): Use a custom version of
13674 mono_class_has_parent() to make things work for generic instances;
13677 2005-06-20 Martin Baulig <martin@ximian.com>
13679 * loader.c (method_from_methodspec): Apply a patch from
13680 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
13682 2005-06-20 Martin Baulig <martin@ximian.com>
13684 * class.c (mono_class_init): Reverted Zoltan's last change; it
13687 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
13689 * threads.c (wait_for_tids_or_state_change): Add missing locking.
13691 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13693 * socket-io.c: fix the index in the socket array for writable/error
13694 sockets. Fixes bug #75306.
13696 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
13698 * class.c (mono_class_init): Allow interfaces to have static ctors.
13700 2005-06-17 Martin Baulig <martin@ximian.com>
13702 * loader.c (method_from_methodspec): Use `context->container' when
13703 parsing the `gmethod->inst'.
13705 2005-06-17 Martin Baulig <martin@ximian.com>
13707 * class.c (mono_type_get_name_recurse): Don't add the assembly
13708 name for type arguments.
13710 2005-06-15 Martin Baulig <martin@ximian.com>
13712 * reflection.c (mono_image_get_inflated_method_token): Encode
13713 correct klass; fixes #75260.
13715 2005-06-13 Michal Moskal <malekith@nemerle.org>
13717 * icall.c: Make GetCorrespondingMethod/Constructor take
13718 MonoReflectionMethod method not MonoMethod. Removed
13719 MonoType.GetCorrespondingField, and make
13720 MonoGenericType.GetCorrespondingField take name not
13723 2005-06-13 Michal Moskal <malekith@nemerle.org>
13725 * reflection.c (field_encode_signature, encode_locals):
13726 Make sizes of buffers for types larger (for big generic types).
13727 (create_generic_typespec,
13728 mono_reflection_sighelper_get_signature_local,
13729 mono_reflection_sighelper_get_signature_field):
13730 Add asserts for too small buffers.
13732 2005-06-15 Martin Baulig <martin@ximian.com>
13734 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
13735 if our parent is not a dynamic type.
13737 2005-06-15 Martin Baulig <martin@ximian.com>
13739 * class-internals.h (MonoTypeNameFormat): New enum.
13742 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
13743 (mono_type_get_full_name): Removed.
13744 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
13745 argument instead of the boolean's.
13747 * icall.c (ves_icall_System_MonoType_getFullName):
13748 Added `gboolean assembly_qualified'.
13751 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
13753 * reflection.c (mono_reflection_parse_type): Parse the new type
13756 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13758 * icall.c: no need to convert from utf16 to utf8 and then back again
13759 after the call to GetLogicalDrives.
13761 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13763 * icall.c: frombase64. Fix problems exposed by new tests.
13765 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13767 * icall.c: added internal calls for converting char [] and strings in
13768 base64 into byte [].
13770 2005-06-10 Martin Baulig <martin@ximian.com>
13772 * class.c (mono_class_create_generic_2): Read the nested classes
13773 from the metadata rather than from `gklass->nested_classes' since
13774 `gklass' might not be initialized yet.
13776 2005-06-09 Duncan Mak <duncan@novell.com>
13778 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
13779 all public headers. Fixes #74919.
13781 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
13783 * domain.c: The key for proxy_vtable_hash is now a pointer
13784 array. Added new GHashFunc and GCompareFunc functions for this.
13786 * class.h: The list of interfaces in MonoRemoteClass is known in
13787 advance and can't grow (we create a new MonoRemoteClass if needed),
13788 so now the interface array can be allocated together with
13791 * object.c: Added a new method create_remote_class_key.
13792 Fixed mono_remote_class so it does not depend on
13793 mono_upgrade_remote_class.
13794 Removed extend_interface_array.
13795 Added new method clone_remote_class(), which makes a copy of a remote
13796 class and adds a new interface or class to it.
13797 mono_upgrade_remote_class() now creates a new remote class (or gets
13798 it from the cache) if an vtable upgrade is needed. In this way
13799 we make sure that other objects sharing the same remote class
13800 don't get the new vtable with unwanted interfaces.
13802 * object-internals.h:
13803 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
13805 * marshal.c: Track changes in mono_upgrade_remote_class().
13807 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
13808 * icall.c: Add runtime methods for obtaining members of inflated
13809 class, which were created from supplied non-inflated members. It
13810 is used in internal Get{Method,Constructor,Field} methods in
13813 2005-06-09 Martin Baulig <martin@ximian.com>
13816 (mono_reflection_bind_generic_method_parameters): Fix #75169.
13818 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13819 * reflection.c (mono_image_basic_init): Define
13820 Version in MonoDynamicAssembly.
13822 2005-06-08 Martin Baulig <martin@ximian.com>
13827 (mono_method_signature_full): New public method; takes a
13828 `MonoGenericContext *'.
13829 (find_method): Use mono_method_signature_full() and pass the
13830 klass'es context to it.
13832 * class.c (mono_class_is_inflated_method): Use
13833 mono_method_signature_full() and pass the context to it.
13835 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
13837 * object.c: add proper locking in mono_remote_class_vtable(),
13838 fixes possible memory corruption.
13840 2005-06-08 Michael Meeks <michael.meeks@novell.com>
13842 * marshal.c (mono_remoting_marshal_init): set
13843 initialized after initialization.
13845 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
13847 * locales.c : hush.
13849 2005-06-06 Michael Meeks <michael.meeks@novell.com>
13851 * object.c (extend_interface_array): fix really silly
13852 memory corrupting / comparison bug.
13854 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13856 * reflection.c: Functions added to support the creation
13857 of CustomAttributeData, which includes Attribute data
13858 used by ReflectionOnly methods.
13860 * reflection.h: mono_reflection_get_custom_attrs_data and
13861 mono_custom_attrs_data_construct added (functions exposed).
13863 * icall.c: Added mono_reflection_get_custom_attrs_data
13866 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
13868 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
13871 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
13873 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
13875 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
13876 dynamic DllImportAttribute.
13878 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
13879 dynamic DllImportAttribute.
13881 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
13884 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13886 * threads.c: avoid segfault when an unstarted thread is aborted.
13888 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
13890 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
13891 Returns the name and version of the runtime for reporting.
13893 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13895 * appdomain.c: bump corlib version.
13896 * object-internals.h: new field in MonoReflectionAssembly.
13898 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13900 * object-internals.h: Carlos forgot to add this field.
13902 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13904 * icall.c: Added create_version to create instances
13905 of Version of MonoReflectionAssemblyName. This change helps
13906 the AssemblyName tests to keep running fine.
13908 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
13910 * object.c (mono_method_return_message_restore): A somehow less
13911 intrusive fix for #75138.
13913 2005-06-03 Raja R Harinath <rharinath@novell.com>
13915 * object.c (mono_method_return_message_restore): Fix computation
13916 of expected number of out args.
13918 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
13920 * reflection.c (mono_image_get_method_info): Fix the case when the
13923 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
13925 * object.c: Added missing null check in
13926 mono_method_return_message_restore.
13928 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
13930 * reflection.c (mono_image_get_method_info): Handle the case when
13933 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
13935 * object.c: When creating the vtable for a proxy, take into account
13936 all inherited interfaces, not only the ones registered in
13937 iclass->interfaces. This fixs bug #74996.
13938 Also, in mono_method_return_message_restore, verify that the array
13939 of out args has the expected lengh.
13941 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13943 * socket-io.c: update the timeout in Poll when the call is interrupte.
13945 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13947 * socket-io.c: support abort/suspend in Select_internal after last
13950 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13952 * threadpool.c: remove warning.
13954 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13957 * socket-io.[ch]: Select_internal uses poll() now when available, thus
13958 removing the 1024 limit from select(). Runtime part of the fix for
13961 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13963 * socket-io.c: when resolving the addresses for the same
13964 host returned by gethostname(), get the local IPs from the interface
13965 list. Loopback addresses are discarded if the are interfaces up with
13966 non-loopback ones. Fixes bug #63265.
13968 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
13970 * appdomain.c, verify.c, object-internals.h, reflection.c:
13971 bumped corlib number to 36, and added new extra_flags field
13972 to ReflectionMethodBuilder and friends. Fixes #75060.
13974 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
13976 * gc.c: register a new weak link only if the object is non-null
13979 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
13981 * culture-info.h : short time pattern too.
13983 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
13985 * culture-info.h : expand long time pattern string length.
13987 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
13989 * culture-info-table.h : update (more French date format; #72788).
13991 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
13993 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
13994 the method is static. Fixes #75029.
13996 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
13998 * reflection.c: Update the table_idx field of method builders after
13999 saving the module, since it can change. This is a workaround for
14002 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
14004 * culture-info-table.h : update (additional French date format).
14006 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
14008 * icall.c (ves_icall_type_Equals): Revert last change.
14010 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
14012 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
14014 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
14016 * class-internals.h: Added executioncontext_class field to
14017 MonoDefaults structure.
14018 * domain.c: Cache System.Threading.ExecutionContext class in
14020 * object.c: Capture the ExecutionContext for asynchroneous calls in
14021 mono_async_result_new.
14022 * object-internals.h: Added execution_context and original_context
14023 fields to MonoAsyncResult. Added execution_context to MonoThread.
14024 * security-manager.c|.h: Added mono_get_context_capture_method to
14025 return the capture method (if required by the security manager or by
14026 the framework version used).
14027 * threadpool.c: Apply capture (if present) ExecutionContext in
14028 mono_async_invoke and revert to original context after it completes.
14030 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
14032 * culture-info-table.h : updated (real hacky solution for zh-CHT).
14034 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
14036 * culture-info-table.h : zh-CHT related workaround.
14038 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
14040 * marshal.c (emit_marshal_custom): Add some error checking and call the
14041 methods in the ICustomMarshaler interface. Fixes #74875.
14043 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
14044 native->managed wrappers.
14046 2005-05-12 Martin Baulig <martin@ximian.com>
14048 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
14049 here and use the loader lock.
14051 * mono-debug.c: Properly lock when the debugger is not attached.
14052 (mono_debug_init): Release the initial lock if we're not running
14055 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
14057 * marshal.c (emit_marshal_custom): Pass through NULL values without
14058 calling the custom marshalling routines.
14060 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
14061 conversion in structures. Fixes #74882.
14063 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
14065 * culture-info-table.h : zh-* cultures were missing.
14067 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
14069 * threads.c: Added a new event background_change_event which is signaled
14070 when a thread changes its background mode.
14071 Moved here several checks previously done in managed code. The checks
14072 require the thread lock, and using the thread lock in managed code
14073 can result in deadlocks.
14074 Merged Start_internal and Thread_internal into a single method. Now
14075 Thread_internal does all work of creating and starting a thread.
14076 Added icalls for setting and getting the state of the object. Moved from
14077 managed code to avoid locking there.
14078 Added wait_for_tids_or_state_change() which is called instad of
14079 wait_for_tids when waiting for non-backround threads to end. This method
14080 will return if one of the threads ends or the background_change_event
14082 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
14083 the background mode. This method signals the background_change_event
14086 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
14087 removed Start_internal.
14089 2005-05-11 Martin Baulig <martin@ximian.com>
14091 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
14092 to order of some fields to get proper alignment on 64-bit machines.
14094 2005-05-11 Martin Baulig <martin@ximian.com>
14096 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
14097 changes as they're broken and completely fuck up the debugger.
14099 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
14101 2005-05-10 Martin Baulig <martin@ximian.com>
14103 * reflection.c (mono_reflection_generic_class_initialize): Don't
14104 call mono_class_setup_parent() here.
14106 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14108 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
14109 send/receive timeout use an integer in milliseconds. We were using a
14112 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14115 (internal_get_cultures): reserve the first slot of the array for the
14116 InvariantCulture, which will be filled in managed code.
14118 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
14120 * reflection.c (mono_image_fill_module_table): Initialize the
14121 GENERATION field as well.
14123 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14125 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
14126 Monitor.Enter on the object.
14128 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
14130 * threads.c: Enable the wait for running threads when exiting.
14131 * icall.c: Suspend all threads before exiting.
14133 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
14135 * assembly.c (mono_assembly_load_reference): Fix warning.
14137 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14139 * threadpool.c: changed the default number of threads per cpu. From now
14140 on, the default will be 20 + (5 * number of cpus) instead of 50.
14142 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
14144 * loader.c (mono_method_get_signature_full): Add locking here.
14146 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
14148 * appdomain.c: Moved methods for parsing and freeing assembly
14149 names to assembly.c.
14150 * assembly.c, domain-internals.h: Created public methods for parsing
14151 assembly names. Fixed mono_assembly_load_with_partial_name:
14152 it now finds the best match, taking into account the version,
14153 token and culture specified in the partial name. Also return
14154 the latest version if no version information is specified.
14156 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
14158 * threadpool.c: replace check for SocketAsyncCall class.
14160 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14162 * threadpool-internals.h:
14163 * Makefile.am: added threadpool-internals.h
14165 * threadpool.c: call mono_unhandled_exception on exceptions not handled
14166 that happen in threadpool threads (tested on MS).
14167 (mono_thread_pool_remove_socket): new function that dispatch any pending
14168 AIO call on a socket that is closing. By now only epoll really needs it,
14169 as select/poll wake up when the socket closes.
14172 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
14174 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
14176 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
14178 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
14180 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
14182 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
14184 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
14185 has an abort request, convert it into a suspend request.
14187 2005-04-30 Ben Maurer <bmaurer@ximian.com>
14189 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
14190 warning for the usage of `UnmanagedFunctionPointerAttribute' which
14191 is not supported yet.
14193 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14195 * image.c: register assemblies loaded from data (bundles) in the loaded
14196 assemblies hash. Fixes bug #74772.
14198 2005-04-29 Martin Baulig <martin@ximian.com>
14200 * class.c (mono_type_get_name_recurse): Update to the new naming
14201 schema from the latest .NET 2.x beta2.
14202 (mono_class_setup_vtable_general): If we're a generic instance,
14203 copy the vtable from our generic type definition and inflate all
14206 * loader.c (find_method): Update to the new naming schema from the
14207 latest .NET 2.x beta2.
14209 2005-04-29 Raja R Harinath <harinath@gmail.com>
14211 * class.c (mono_class_init): Add a mono_loader_unlock to the
14214 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
14216 * icall.c (ves_icall_System_Environment_Exit): Remove the
14217 suspend_all_other_threads () call for the time being, since it can hang.
14219 * threads.c (mono_thread_manage): Similarly, disable the waiting for
14220 the background threads to exit, since it can also hang.
14222 * class.c (mono_class_init): Applied patch from Ankit Jain
14223 (radical@gmail.com). Avoid pending init errors when a field refers
14224 to a nested class using a typeref. Fixes #74734.
14226 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
14227 this for dynamic modules.
14229 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14231 * threads.c: don't wait for threads that are in the process of aborting
14232 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
14233 and waiting for background threads to finish. This makes xsp and
14234 mod-mono-server exit without random length delays and/or hangs.
14236 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14238 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
14240 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
14242 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
14243 dynamic types to prevent infinite loops. Fixes #74727.
14245 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
14246 ..._is_assignable_to.
14248 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
14250 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
14252 2005-04-25 Martin Baulig <martin@ximian.com>
14254 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
14257 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
14259 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
14261 * reflection.c (build_compressed_metadata): Set metadata header
14264 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
14266 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
14267 number into an integral and a decimal part. Fixes #70473.
14269 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
14271 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
14273 * culture-info-table.h : reflected the latest locale-builder output.
14275 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14277 * threadpool.c: check for SuspendRequested too when deciding if
14278 mono_thread_interruption_checkpoint should be called.
14280 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14282 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
14283 * threads.c: remove interruption_mutex and use Interlocked instead. When
14284 suspending all the threads, wait for all the suspended events at once.
14285 If we're shutting down and get an APC that is going to be queued,
14286 call mono_thread_execute_interruption immediately, as the thread might
14287 be sleeping on a pthread condition or mutex.
14289 * icall.c: call mono_runtime_set_shutting_down before suspending the
14292 Fixes bug #74693. And now xsp is happier when exiting.
14294 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
14296 * loader.c (mono_stack_walk): Fix #74690.
14298 2005-04-22 Martin Baulig <martin@ximian.com>
14300 * mono-debug.h (MonoDebugMethodJitInfo): Added
14301 `MonoDebugMethodJitInfo *jit'.
14303 * mono-debug.c (mono_debug_read_method): Cache the
14304 MonoDebugMethodJitInfo in `address->jit'.
14305 (mono_debug_free_method_jit_info): New public method.
14307 2005-04-22 Martin Baulig <martin@ximian.com>
14309 * class.c (mono_class_is_assignable_from): Disallow
14310 type parameter -> interface.
14312 2005-04-21 Dick Porter <dick@ximian.com>
14314 * threads.c (mono_thread_create): Turn an assertion into an error.
14316 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
14318 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
14320 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
14321 Fix some gcc 4.0 warnings.
14323 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
14325 * file-io.c: fix alt dir separator char on unix systems
14326 and cleanup (fixes bug #71214).
14328 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
14330 * marshal.c: Use CALLVIRT instead of CALL when dispatching
14331 a call to a remote domain, since the method may be an
14332 interface method in the client domain. This fixes bug #74192.
14334 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14336 * threadpool.c: recv/send are now performed before going back to managed
14337 code to save one transition.
14339 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14341 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
14343 * metadata/threadpool.c: removed hack to workaround the bug above.
14347 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
14349 * reflection.c reflection.h: Fix handling of parameter defaults in
14350 dynamic methods. Also fixes handling of parameter attributes.
14353 * mono-debug.c (mono_debug_close_image): Fix warning.
14355 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14357 * socket-io.h: replaced old unused field with new 'blocking'.
14358 * threadpool.c: restore socket blocking state on windows(tm).
14360 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
14362 * icall.c: don't return the codebase in the AssemblyName[] returned by
14363 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
14364 * object-internals.h: Removed FIXME (fields were presents) and fixed
14365 versioncompat declaration.
14367 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14369 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
14370 not closed, so don't cleanup when it happens.
14372 2005-04-13 Chris Toshok <toshok@ximian.com>
14374 * mono-debug-debugger.h: change prototype for
14375 mono_debugger_lookup_type.
14377 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
14378 this function, although it should probably be named
14379 mono_debugger_init_type.
14381 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14383 * threadpool.c: fix non-AIO case.
14385 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
14387 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
14388 the built-in profiler to measure just JIT compilation times.
14390 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14392 * threadpool.c: the epollfd might be closed by another thread at
14393 any time, so ignore EBADF at treat it as a "we're closing" sign.
14395 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14397 * threadpool.c: release the semaphores with a count equals to the number
14398 of working threads in both IO and regular pools. Fixed typo that messed
14399 up the count of IO pool threads. Don't initialize the pipe handles if
14402 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14404 * threadpool.c: some systems don't like a NULL when deleting the socket
14407 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14409 * threadpool.c: fix semaphore allocation.
14411 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14413 * threadpool.c: added epoll() based implementation for asynchronous IO
14414 that is used instead of the default poll() when available.
14415 It can be disabled by setting MONO_DISABLE_AIO.
14417 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14419 * threadpool.c: windows needs 'closesocket' and instead of returning
14420 0 when the stream is closed while in select, it returns -1. Fixes bug
14423 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
14425 * class.c (class_compute_field_layout): Fix the regression caused by
14428 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14430 * threadpool.c: separate pool for socket async. IO.
14431 * threadpool.h: mono_max_worker_threads is not a global any more.
14433 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
14435 * class.c (class_compute_field_layout): Fix #74549.
14437 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14439 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
14440 use 2 connected sockets instead.
14442 2005-04-08 Miguel de Icaza <miguel@novell.com>
14444 * mono-config.c: Add new entry point for mkbundle
14445 mono_config_parse_memory.
14447 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14449 * threadpool.c: removed another unused function.
14451 2005-04-08 Ankit Jain <radical@corewars.org>
14453 * reflection.c (get_default_param_value_blobs): Add 'types'
14454 parameter to get the types encoded in the constant table.
14455 (mono_param_get_objects): Use the type from the constant table,
14456 not the type of the parameter, when creating default values.
14457 Handle null default values correctly.
14459 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14466 * socket-io.c: removed dead code for async IO.
14468 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14470 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
14472 * threadpool.c: intercept socket async. calls and pass them to a thread
14473 that is polling and dispatching the job items to the threadpool as
14474 socket become ready. Fixes bugs #71217, #71933.
14476 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
14477 between char and short/ushort arrays.
14479 * socket-io.c: remove dead code.
14481 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
14484 icall.c : removed InternalToUpper_Comp() and
14485 InternalToLower_Comp().
14487 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
14489 * char-conversions.h : The tables were incorrectly generated. Should
14490 be generated against invariant culture.
14492 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
14494 * object.c (mono_runtime_invoke_array): Fix return value when
14495 passing pre-created valuetype objects to ctors.
14497 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
14498 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
14501 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
14503 * domain.c: removed g_assert for runtimesecurityframe_class. This is
14504 only used with --security and hides the wrong corlib version error.
14506 2005-03-30 Joshua Tauberer <tauberer@for.net>
14508 * class.c: Changed mono_class_name_from_token so that types
14509 outside of a namespace don't have an initial period. Improved
14510 the g_warning message used in _mono_class_get when loading
14512 * assembly.c: In mono_assembly_load_reference, when an assembly
14513 can't be found, "No such file or directory" is misleading and
14514 unhelpful because a few paths were checked for the presence of
14515 the assembly. When that happens (ENOENT), display a nicer
14516 message indicating the directories that were searched. In all
14517 cases, the warning is made easier to read for non-hackers.
14519 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
14521 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
14523 * appdomain.h|domain.c: Removed inline from functions.
14524 * appdomain.c: Reduced warnings when compiling on windows.
14525 * icall.c: Fixed output_debug declaration to gunichar2*.
14526 * mono-config.c: Reduced warnings when compiling on windows.
14527 * rand.c: Added missing "windows.h". Added missing return value.
14528 * rawbuffer.c: Added missing winsock2.h for windows.
14529 * sysmath.h: Added mono-compiler.h header to allow/ease
14530 compilation with non-GCC compilers.
14531 * threads.c: Fixed declarations to compile with VS.NET C compiler.
14532 Removed cast warnings.
14534 Adapted from the work of J Lothian (for VC6).
14536 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
14538 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
14541 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
14543 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
14546 2005-03-27 Raja R Harinath <harinath@gmail.com>
14548 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
14549 has to be in $(exec_prefix). $(prefix) is for arch-independent
14550 stuff, and it would probably use $(prefix)/share rather than
14553 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14555 * console-io.c: added 2 includes that might be missing.
14557 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
14559 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
14562 * reflection.c (create_custom_attr): Allocate the params array using
14563 alloca so it gets GC tracking.
14565 2005-03-23 Chris Toshok <toshok@ximian.com>
14567 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
14570 2005-03-24 Raja R Harinath <rharinath@novell.com>
14572 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
14573 changes to pick up any changes in prefix, etc.
14575 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
14577 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
14579 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
14580 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
14582 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
14584 * class-internals.h object-internals.h class.c reflection.c: Extend the
14585 mono_lookup_dynamic_token () function to return the class of the
14588 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
14589 well. Fixes #73848.
14591 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
14593 * security-manager.c: Skip inheritance checks for intra-corlib
14594 class inheritance and method overrides. This skips a lot of checks
14595 and (anyway) permissions cannot work until corlib is loaded.
14597 2005-03-23 Martin Baulig <martin@ximian.com>
14599 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
14600 MONO_TYPE_GENERICINST.
14602 2005-03-23 Martin Baulig <martin@ximian.com>
14604 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
14606 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
14608 * class.c: added locking comments to some functions.
14609 Cache the interface offsets arrays (saves about 20 KB
14610 of runtime memory in a typical app).
14611 Reduce the time overhead in mono_class_setup_supertypes ().
14613 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
14615 * icall.c: speedup and fix leaks in GetMethodsByName and
14616 GetPropertiesByName.
14618 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
14620 * reflection.c: some locking fixes.
14622 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
14624 * metadata.c: added missing break in case statement.
14626 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
14628 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
14629 typedbyref return values. Fixes #73941.
14631 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
14633 * security-manager.c|h: Added demandunmanaged method and
14634 suppressunmanagedcodesecurity class to MonoSecurityManager.
14635 Renamed aptc class to allowpartiallytrustedcallers.
14637 2005-03-17 Martin Baulig <martin@ximian.com>
14639 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
14641 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14643 * file-io.c: disabled file async. IO using aio_*. It uses the
14644 threadpool now. Workaround for bug #73718.
14646 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
14648 * assembly.h, mono-config.c: added code to deal with bundled configs
14649 for bundled assemblies.
14651 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
14653 * *.c, private.h: cleanup, removing old private.h header file.
14655 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
14657 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
14658 and throw_on_unmappable_char attributes.
14660 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
14662 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
14663 _ProcessName_internal.
14665 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
14667 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
14670 * icall.c threads.c threads-types.h: Remove slothash icalls as they
14671 are no longer used.
14673 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
14675 * object.c (compute_class_bitmap): Add support for generics. Fixes
14678 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
14680 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
14682 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14684 * filewatcher.c: commented out the code for windows watcher, as we don't
14685 use it (we use the managed implementation instead).
14687 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
14689 * object-internals.h (MonoThread): Remove 'unused1' field.
14691 * appdomain.c: Bump corlib version.
14693 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
14695 * reflection.c (mono_reflection_create_runtime_class): Remove the
14696 AssemblyBuilder.Save optimization since it causes too many problems.
14698 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
14700 * exception.c|h: Added mono_get_exception_reflection_type_load to
14701 create a ReflectionTypeLoadException object.
14702 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
14703 to return NULL is a InheritanceDemand fails during reflection. Updated
14704 ves_icall_System_Reflection_Assembly_GetTypes to throw a
14705 ReflectionTypeLoadException if an InheritanceDemand fails during
14706 reflection. Added icall mapping for GetLinkDemandSecurity.
14707 * security-manager.c|h: Added ves_icall_System_Security_
14708 SecurityManager_GetLinkDemandSecurity internal call to return the
14709 class and methods permissions set for a LinkDemand. Removed unused
14710 fields in MonoSecurityManager.
14712 2005-03-10 Martin Baulig <martin@ximian.com>
14714 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
14715 it's a generic instance.
14717 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
14719 * reflection.c (mono_get_object_from_blob): Applied patch from
14720 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
14722 * class.c (mono_class_is_assignable_from): Another try at fixing
14723 #73469 without breaking anything.
14725 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
14727 * class.c: (mono_class_is_assignable_from): Revert the last changes
14728 since they don't work with generics.
14730 * class.c (mono_class_is_assignable_from): Fix build bustage.
14732 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
14733 the managed IsAssignableFrom method. Fixes #73469.
14735 * reflection.c (mono_reflection_call_is_assignable_from): New helper
14738 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
14740 * object.c (mono_load_remote_field_new): Fix returning uninitialized
14741 memory when the remoting callback does not sets the out arguments.
14744 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
14747 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
14749 * object-internals.h (MonoStackFrame): Sync with managed object layout.
14751 * appdomain.c: Bump corlib version.
14753 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
14755 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
14758 * threads.c (mono_thread_attach): Detect threads which are not started
14759 by the GC pthread wrappers.
14761 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
14763 * icall.c: Added new icall for RNG.
14764 * rand.c|h: Added new icall to open the RNG. This allows to share a
14765 single handle on Linux to access /dev/urandom and fix #73183.
14767 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
14769 * object.c: setting the new vtable in a transparent proxy object must
14770 not change the GC descriptor.
14772 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
14774 * object.c: fixed compilation without GCJ support.
14775 * reflection.c: for runtime-created types ensure klass->has_references
14776 is correct (bug #73215).
14778 2005-03-02 Martin Baulig <martin@ximian.com>
14780 * class.c (mono_class_is_assignable_from): Make this work if
14781 `oklass' is a generic instance; fixes #72831.
14783 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
14785 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
14788 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
14790 * marshal.c: Reorganize native->managed marshalling code to also use
14791 the emit_marshal_... functions.
14793 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
14795 * object.c: typed allocs have issues with bitmap sizes > 30,
14796 so check for max_set >= 30.
14798 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
14800 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
14801 managed code. Fixes #73012.
14803 * metadata.h (MonoMarshalSpec): Add elem_mult field.
14805 * metadata.c reflection.c: Load/Emit elem_mult as well.
14807 * metadata.h (MonoMarshalSpec): Add comment.
14809 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
14811 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
14812 num_elem to -1 if not given.
14814 * object-internals.h (MonoReflectionMarshal): Add has_size field.
14816 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
14819 2005-03-01 Marek Safar <marek.safar@seznam.cz>
14821 * null-gc.c (mono_gc_free_fixed): Was not compilable.
14823 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
14825 * reflection.c (encode_marshal_blob): Encode param_num field as well.
14827 * object-internals.h (MonoReflectionMarshal): Add param_num field.
14829 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
14831 * object.c: generalized the reference bitmap creation
14832 and added hooks for the new GC.
14833 * class-internals.c: removed the gc_bitmap field from MonoClass.
14835 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14837 * domain.c: help the compiler to produce better code
14838 in mono_jit_info_table_find ().
14840 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
14842 * object.c: make all allocations look typed.
14844 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14846 * socket-io.c: load Mono.Posix if it's not loaded already
14849 2005-02-24 Martin Baulig <martin@ximian.com>
14851 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
14852 * reflection.c (dup_type): Likewise.
14854 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
14856 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
14857 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
14859 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
14861 * domain.c, threads.c, object-internals.h: make the critical thread
14862 local vars use the fast access mode (even when we're compiled in
14863 a lib). Provide accessors to be used by the jit during codegen.
14865 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14867 * appdomain.c: Changed hook functios behavior to include
14868 support for the reflection only assemblies. Some icalls were changed
14869 to support the mentioned assemblies too. Signatures of static methods
14870 try_assembly_resolve and real_load now have an additional parameter:
14873 * assembly.c: General changes to mono_assembly_ methods to support
14874 reflection only api. Functions mono_assembly_open, mono_assembly_load,
14875 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
14876 suffix, to support an additional gbool parameter to specify whether
14877 the assembli is reflection only or not. Created some new hook functions
14878 to add support for reflection only assemblies. Signatures of static
14879 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
14880 have now an additional parameter: refonly.
14882 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
14883 indicating whether the assembly is reflection only or not.
14885 * exception.c: Add mono_get_exception_invalid_operation.
14887 * icall.c: Throw an InvalidOperationException when trying to invoke
14888 a property/method/event, or trying to set/get the value of a field.
14889 Also add an icall to retrieve the ref_only flag to the
14890 MonoReflectionAssembly.
14892 2005-02-23 Chris Toshok <toshok@ximian.com>
14894 Part of fix for #72827.
14895 * mono-debug.c (mono_debug_add_method): add lexical block data to
14896 the info we write. Kind of a hack at the moment - we copy the
14897 lexical block info from the MonoDebugMethodInfo to the
14898 MonoDebugMethodJitInfo here, before writing it.
14899 (mono_debug_read_method): read the lexical block info.
14901 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
14903 * debug-mono-symfile.h: add lexical block support.
14905 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
14908 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
14910 * loader.c (mono_lookup_pinvoke_call): Fix warning.
14912 * object.c (mono_runtime_free_method): Call mono_free_method () and
14913 put the TODOs there.
14915 * loader.c (mono_free_method): Free up most memory allocated for
14918 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
14920 * reflection.c: properly flag a Type argument to a
14921 named custom attr value (bug #72248).
14923 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
14925 * reflection.c: reduce code duplication in named custom
14926 attribute encoding.
14928 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
14930 * reflection.c: properly encode custom attrs of type object
14933 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
14935 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
14937 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
14939 * socket-io.c: load System.dll if it's not loaded already
14940 (bug #72850 and #70477).
14942 2005-02-21 Martin Baulig <martin@ximian.com>
14944 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
14947 2005-02-21 Martin Baulig <martin@ximian.com>
14949 * reflection.c (mono_image_build_metadata): We also need to
14950 "fixup" the MethodImpl table after we computed the final method
14951 indices. Call fixup_methodimpl() to do that.
14952 (fixup_methodimpl): New private method.
14954 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
14956 * assembly.c: special case mscorlib.dll (bug#72536),
14957 patch from Carlos Alberto Cortez.
14959 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
14961 * threads-types.h threads.c: Fix build bustage.
14963 * threads.c: Use a union for long<->double conversions.
14965 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
14966 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
14968 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
14969 containing the checkpoint call with NOT_TAKEN.
14971 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
14972 checkpoint before pushing the arguments, so they won't have to be
14975 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
14977 * domain.c, assembly.c, domain-internals.h: make some data
14978 const and relocation-free.
14980 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
14982 * object.c, appdomain.c, class-internals.h: introduce the
14983 MonoClassRuntimeInfo structure to hold the info needed to
14984 use a class at runtime. Made mono_class_vtable() lock-free
14985 for all the appdomains.
14987 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
14989 * metadata-internals.h, image.c: introduce a per-image mempool to
14990 be used for memory that has the same lifetime as the image.
14992 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
14994 * domain.c: In mono_init_internal(), instead of selecting the first
14995 runtime version supported by an executable, get a list of all
14996 supported versions and select the one for which an mscorlib exists
14997 (since even if the runtime supports a given version, it doesn't mean
14998 that the framework for that version is installed).
14999 Modified get_runtimes_from_exe to support this behavior.
15000 In supported_runtimes, added information about additional system
15003 * assembly.c: Added support for more than one system assembly version
15004 per runtime version. Updated the assembly list.
15005 In mono_assembly_remap_version, removed the initial version check,
15006 since we don't know to which version we need to compare until we
15007 get the version set on which the assembly is based.
15008 Moved the code for loading corlib into the new method
15009 mono_assembly_load_corlib(), so it can be used by the initialization
15012 * domain-internals.h: Updated data structures and added declaration
15013 for mono_assembly_load_corlib.
15015 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
15017 * reflection.c (resolve_object): Fix the creation of the signature in
15018 the SignatureHelper case.
15020 * assembly.c (mono_assembly_remap_version): Fix binary search.
15022 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
15024 * class.c: Added inheritance check when a method is overloaded (from a
15025 virtual method or when implementing an interface) and when a class is
15026 inherited. Added functions to set a failure for a class and to
15027 retreive the exception from a failure.
15028 * class-internals.h: Added fields to MonoClass to keep the exception
15029 information status for inheritance (or other exceptions) to be thrown
15030 later (i.e. not at load time).
15031 * object.c: Throw the inheritance SecurityException when a type is to
15032 be created with either class or method inheritance violations.
15033 * reflection.c|h: Fix when getting declsec from a class. Removed
15034 unrequired code for class. Improved sanity in parameter naming.
15035 * security-manager.c|h: Added functions to check for class and method
15038 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
15040 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
15041 and has_finalize in dynamic types as well.
15043 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
15045 * culture-info-table.h : fixed currency format for en-GB (and so on).
15047 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
15049 * gc.c: ensure the GC handles never have 0 as a value.
15051 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
15053 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
15054 a pointer to a struct to unmanaged code. Fixes #72625.
15056 2005-02-16 Martin Baulig <martin@ximian.com>
15058 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
15060 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
15062 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
15064 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
15066 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
15068 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
15069 UnmanagedFunctionPointerAttribute, use it for determining calling convention
15072 * reflection.c (mono_custom_attrs_get_attr): New helper function.
15074 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
15076 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
15078 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
15079 changes to make the current context a field in MonoThread.
15081 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
15083 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
15086 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
15087 extracted from mono_marshal_get_native_wrapper.
15089 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
15090 to create wrappers around native functions.
15092 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
15093 delegates for arbitrary function pointers. Fixes #71472.
15095 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
15097 * threads.c: cleaned up the code a little.
15099 2005-02-15 Martin Baulig <martin@ximian.com>
15101 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
15104 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
15105 allocate larger chunks if needed.
15107 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
15109 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
15112 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
15114 * domain.c: keep the domains in an array and ensure the domain ids
15115 are kept small, so they can be used as indexes to domain-specific data
15116 with a small memory overhead.
15118 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
15120 * icall.c: Handle byref types in Type icalls. Fixes #72544.
15122 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
15124 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
15126 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
15128 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
15130 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
15133 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
15135 2005-02-12 Ben Maurer <bmaurer@ximian.com>
15137 * domain-internals.h: add the hashtable here.
15139 * class-internals.h: Remove `info' from MonoMethod
15141 * domain.c: Add a new hashtable, jit_trampoline_hash
15143 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
15145 * object.c: don't set the value of static fields
15148 2005-02-11 Martin Baulig <martin@ximian.com>
15150 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
15151 (mono_debug_add_method): Silently ignore the method if it's too big.
15152 (mono_debug_add_type): Likewise.
15154 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
15156 * threads.c, appdomain.c: remove #ifdefs from the code.
15158 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
15160 * metadata-internals.h: Added flags to MonoAssembly to cache the most
15161 common security informations. This allows us to stay in unmanaged code
15162 when doing LinkDemand and it's special cases (except for the first
15163 time for initialization). The flags a very much used with --security.
15164 * reflection.c|h: Added code to get declarative security attributes
15165 for LinkDemand and InheritanceDemand. This required to refactor the
15166 existing code for Demand.
15167 * security-manager.c|h: Added new method fields for the special cases
15170 2005-02-10 Martin Baulig <martin@ximian.com>
15172 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
15173 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
15175 2005-02-10 Martin Baulig <martin@ximian.com>
15177 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
15178 debugging code; this is almost a complete rewrite.
15180 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
15182 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15184 * domain.c, object.h: expose mono_string_equal () and
15185 mono_string_hash ().
15186 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
15187 it's implemented in managed code.
15189 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15191 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
15192 lo leak objects between appdomains.
15194 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
15196 * assembly.c: old compilers compilation fix from
15197 robertj@gmx.net (Robert Jordan).
15199 2005-02-09 Ben Maurer <bmaurer@ximian.com>
15201 * class-internals.h: Little reminder for the future.
15203 * debug-helpers.c: Fix up wrapper_type_names
15205 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
15207 * image.c, metadata-internals.h: when loading an image from a file,
15208 mmap all of it and use the same codepaths as when using a
15209 in-memory image: the code is simpler and we use less memory
15210 (both writable and readonly).
15212 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
15214 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
15215 API to alloc runtime data structures that need to be tracked by the
15216 GC and contain pointers.
15217 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
15218 make the code more readable and eventually use a different GC.
15220 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
15222 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
15225 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
15227 * object.c: In release_type_locks(), don't release the cctor lock
15228 if it has already been released. This fixes a crash in the
15231 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15233 * gc.c, marshal.c, icall.c: register a delegate for finalization
15234 only when the native function pointer has been allocated for it.
15236 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
15238 * object.c: cleaned up some code, allocate objects that are
15239 pointer free with the atomic malloc variant. Allocate memory
15240 for static data from the mempool if it's pointer-free.
15241 Allocate the bounds array at the end of the array data, when needed.
15242 * object-internals.h, object.h: move a private function in a private
15244 * class.c: handle missing case in tracking references in fields.
15246 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
15248 * class.c, class-internals.h: keep track if a type has
15249 reference fields in either the instance or static fields.
15251 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
15253 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
15254 and renamed to MonoRuntimeInfo. Added fields to store the expected
15255 framework assembly version. Changed mono_get_framework_version and
15256 mono_get_runtime_version for a single mono_get_runtime_info method.
15258 * assembly.c: Added method to remap system assembly versions to the
15259 current executing runtime version. Removed old mapping code.
15260 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
15262 * icall.c, reflection.c: Track api changes.
15264 2005-02-06 Miguel de Icaza <miguel@novell.com>
15266 * loader.c (method_from_memberref): Improve error reporting,
15267 produce the class name instead of the typeref/typedef index.
15269 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
15271 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
15273 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
15275 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
15276 stdcall and charset name mangling. Reorganize the code and add
15277 some tracing stuff.
15279 2005-02-05 Ben Maurer <bmaurer@ximian.com>
15281 * monodiet.c: More iters!
15283 * marshal.c: Iter usage.
15285 * icall.c: Iter usage.
15287 * object.c: Use iters.
15289 * debug-helpers.c: More iters
15291 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
15293 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
15296 2005-02-05 Ben Maurer <bmaurer@ximian.com>
15298 * mono-debug-debugger.c: use iters
15300 * class.c, class-internals.h: mono_class_setup_events is static
15303 * All callers: use iters
15305 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
15307 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
15308 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
15310 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
15312 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
15314 * marshal.h: Add prototypes for ldfld/stfld_remote.
15316 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
15317 this is called during startup.
15319 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
15321 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
15322 MonoThreadsSync struct private in monitor.c. Changed the way
15323 MonoThreadsSync is allocated so it's faster and there is no
15324 need to keep track of it with a finalizer and it uses less memory.
15325 This also finally allows us to allocate mono objects as ptrfree when
15326 there are no reference fields.
15328 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
15330 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
15331 disappearing link to the GC interface and use them to simplify
15332 the gchandles code.
15334 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
15336 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
15337 stfld_remote which call mono_load/store_field_new. This allows methods
15338 calling ldfld/stfld wrappers to be AOTed.
15340 * console-io.c: Include sys/filio.h under solaris.
15342 * console-io.c: Include curses.h if needed correctly.
15344 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
15346 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
15347 method->klass as well.
15349 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
15351 * class.c (mono_class_init): Switch on lazy initialization of
15354 * class.c (mono_class_get_finalizer): Handle the case when the
15355 finalizer is inherited.
15357 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15359 * console-io.c: <curses.h> is needed by term.h on solaris.
15361 2005-02-03 Ben Maurer <bmaurer@ximian.com>
15363 * icall.c, class-internals.h, monodiet.c, class.c: Remove
15364 mono_class_setup_properties where possible. Remove this ftn from
15365 the header file, and make it static.
15367 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
15369 * loader.c: Add missing setup_... call.
15371 * class.c: Add missing setup_... calls.
15373 * class.c (mono_class_init): Switch on lazy initialization of
15374 the generic vtable.
15376 * class.c (mono_class_init): Fix generics broken by the recent changes.
15378 * monodiet.c (handle_type): Add missing setup_... calls.
15380 * class.c: Back out garbage in previous patch.
15382 * class.c: Add missing setup_... calls.
15384 * class.c (mono_class_get_method_from_name_flags): Avoid calling
15385 mono_class_setup_methods () if possible.
15387 * class-internals.h (MonoClass): Add 'has_cctor' flag.
15389 * class-internals.h (MonoCachedClassInfo): New structure.
15391 * class.c: Initialize properties and events fields of MonoClass lazily.
15393 * class.c: Add infrastructure for lazily initializing the methods and
15394 vtable fields of MonoClass. Not yet used.
15396 * class.c (mono_class_get_finalizer): New helper function.
15398 * class.c: Add infrastructure for loading some class related data from
15401 * object.c: Add infrastructure for initializing the vtable from data
15404 * gc.c (run_finalize): Use mono_class_get_finalizer ().
15406 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
15407 appropriate initialization function before accessing parts of the
15408 MonoClass structure.
15410 * marshal.c: Fix warnings.
15412 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
15414 * mono-debug-debugger.c (get_exception_message): Use
15415 mono_class_get_method_from_name_flags ().
15417 2005-02-02 Ben Maurer <bmaurer@ximian.com>
15419 * reflection.c, appdomain.c: Replace a few manual searches that
15420 Zoltan missed. (Paolo approved this part of my initial patch).
15422 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
15424 * profiler.c: disable recording statistical events at report time.
15426 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
15428 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
15429 to byteswap arrays of enum values, too (bug #72080).
15431 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
15433 * appdomain.c (set_domain_search_path): Allow this to be called if
15434 domain->setup is not yet set.
15436 * loader.c (mono_method_get_index): New helper function.
15438 * loader.c reflection.c: Use mono_method_get_index ().
15440 * class.c (mono_class_get_method_from_name_flags): New helper method.
15442 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
15445 * class.c (mono_class_get_cctor): New helper method.
15447 * string-icalls.c object.c class.c marshal.c reflection.c: Use
15448 mono_class_get_method () to look up methods.
15450 2005-02-01 Miguel de Icaza <miguel@novell.com>
15452 * console-io.c: Fix the build, this should work on Windows.
15454 2005-01-31 Ben Maurer <bmaurer@ximian.com>
15456 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
15457 be set to null to keep things valid
15459 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15461 * icall.c: added Console 2.0 icalls.
15462 * Makefile.am: added console-io.[ch]
15463 * console-io.[ch]: internal calls for Console 2.0 API.
15465 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
15467 * class.c: make sure we consider all the interfaces
15468 when calculating max_interface_id (bug found by
15469 Jeroen Frijters running ikvm).
15471 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
15473 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
15474 valuetype fields to null.
15476 * object.c (set_value): Ditto. Fixes #71669.
15478 2005-01-31 Martin Baulig <martin@ximian.com>
15480 * metadata.c (mono_metadata_has_generic_params): New public
15481 function; checks whether something is a generic method.
15483 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
15485 * appdomain.c: fix infinite recursion when adding assemblies.
15487 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
15489 * object.c: Fix small typo to return all items for Environment.
15490 GetCommandLineArgs.
15492 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15494 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
15495 reflection.c: more domain and assembly-unload related fixes
15496 and memory leaks plugs.
15498 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
15500 * 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.
15502 2005-01-29 Ben Maurer <bmaurer@ximian.com>
15504 * loader.c (mono_method_signature): Make this method lazy
15505 (mono_get_method_from_token): Don't computate the signature here.
15507 Doing this saves quite a bit of memory. I got 90 kb on starting up
15508 monodoc. It should also save some disk reads on startup.
15510 * *: MonoMethod->signature might be NULL now. You *MUST* use
15511 mono_method_signature.
15513 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
15515 * object.c (mono_runtime_get_main_args): Return an array from the
15516 current domain here. Fixes #71938.
15518 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
15520 * monitor.c: formatting changes to comply with the
15521 mono coding style and remove #ifdefs from the code.
15523 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
15525 * metadata.c, private.h: remove some unneeded data
15526 and use a more compact representation for table schemas.
15528 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
15530 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
15531 to get a better distribution in hash tables.
15532 * *.c: use mono_aligned_addr_hash() where appropriate.
15533 * assembly.c: make var static.
15535 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
15537 * domain-internals.h: Put MonoJitInfo on a diet.
15539 * domain.c: Fix a warning.
15541 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15543 * gc.c: rework the gc handles code to reuse handles
15546 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
15548 * domain.c: fixed long standing bug in mono_string_equal() which
15549 was brought to light with the ldstr changes.
15551 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
15553 * reflection.c: Remove warning by adding missing include for marshal.h
15555 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
15557 * domain.c, object.c: change the ldstr_table to hold
15558 MonoString* as keys: makes the runtime isinterned lookup
15559 faster and simplifies memory management.
15561 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
15563 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
15564 possible to add imperative security checks before calling the icall.
15565 * reflection.c: Return security attributes on the original MonoMethod
15566 (and not the wrapped one). This fix permissions on icalls.
15568 2005-01-25 Dick Porter <dick@ximian.com>
15570 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
15571 the check for mktime() support actually test the mktime() return
15572 value. "Fixes" bug 71682, though the output is still different to
15575 2005-01-25 Martin Baulig <martin@ximian.com>
15577 * class.c (mono_class_is_assignable_from): Make this work for
15580 2005-01-24 Ben Maurer <bmaurer@ximian.com>
15582 * marshal.c (mono_string_utf8_to_builder)
15583 (mono_string_builder_to_utf16): We might not have ownership of the
15584 string. In thise case, we need to create a new buffer.
15586 * object-internals.h (mono_stringbuilder_capacity): sb->str might
15587 be null, in which case, use the default capacity.
15589 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
15591 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
15592 GC events to the profiler.
15594 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
15596 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
15597 if you don't want the GC to run.
15599 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
15601 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
15602 start providing a GC API and keeping different implementations in
15604 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
15606 2005-01-22 Ben Maurer <bmaurer@ximian.com>
15608 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
15609 mmap rather than allocating a huge buffer.
15610 (mono_debug_close_mono_symbol_file): Free the buffer allocated
15613 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
15615 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
15616 and CheckExecutionRights.
15617 * reflection.c|h: Keep the index of the declarative security to be
15618 used, instead of the pointer, when AOT compiler is used. Also add
15619 class initialization when requesting demands.
15620 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
15621 CheckExecutionRights. Both properties are now FALSE by default, and
15622 unmodifiable, unless the --security option is used.
15624 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
15626 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
15627 reflection.c: properly refcount images and assemblies, many leaks fixed.
15629 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15631 * threadpool.c: increase the timeout for threads in the thread pool to
15632 10s. Fixes bug #67159.
15634 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
15636 * class-internals.h: Sun's compiler insists on explicit
15637 signed on bit fields to handle then correctly.
15639 2005-01-19 Miguel de Icaza <miguel@ximian.com>
15641 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
15642 Make the size of the array fit only the number of invalid path
15643 chars that we have.
15645 * class.c (_mono_class_get): Improve the error reporting when a
15646 class referenced is not found, to assist debugging.
15648 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
15650 * threads.c: fix off-by-one error.
15651 * domain.c: free data allocated in the domain.
15653 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
15655 * reflection.c (mono_method_body_get_object): Fill out exception info
15658 * object-internals.h: Add MonoReflectionExceptionHandlingClause
15661 2005-01-19 Martin Baulig <martin@ximian.com>
15663 * loader.c (mono_get_method_constrained): Make this work again.
15665 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
15667 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
15668 guint16 to match the managed side.
15670 * reflection.c (mono_reflection_body_get_object): Fill out local
15673 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
15676 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
15677 'local_var_sig_token'.
15679 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
15681 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
15684 * reflection.c (mono_method_body_get_object): Handle abstract and
15687 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
15689 * marshal.c, loader.c, class-internals.h, reflection.c:
15690 store the emthod data for a wrapper in an array instead of a list.
15692 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
15694 * marshal.c: change the code to allocate memory more
15695 conservatively for method wrappers.
15697 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
15699 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
15700 fields from MonoClass to the marshal info structure where they belong.
15702 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15704 * class.c, object.c, class-internals.h, marshal.c: rearrange
15705 some fields and tweak some types to lower memory usage.
15707 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
15709 * threads.c (signal_thread_state_change): Handle the case when the
15710 target thread is the current thread.
15712 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
15714 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
15715 emit_ptr_to_object_conv.
15717 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
15718 marshalling. Fixes #71352.
15720 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
15722 * metadata.h, blob.h: move table enum to blob.h so it can be included
15724 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
15725 cut the size of MonoImage/MonoDynamicImage.
15727 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
15729 * profiler.c (mono_profiler_install_simple): Fix default arguments.
15731 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
15733 * reflection.c, reflection.h, icall.c: add a function to check
15734 if an attribute type is defined for a metadata object.
15736 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
15738 * object-internals.h: Added some needed fields from StringBuilder class.
15739 * marshal.c: Set the maxCapacity when creating a StringBuilder.
15741 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
15743 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
15744 threads before shutting down the runtime.
15746 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
15748 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15750 * object-internal.h, threads.c: implement stacksize and
15751 parameterized thread start functionality (requires
15752 matching corlib). Marked broken code for later removal.
15754 2005-01-12 Martin Baulig <martin@ximian.com>
15756 * class-internals.h (MonoGenericClass): Moved the `initialized'
15757 flag to MonoDynamicGenericClass, removed `init_pending'.
15758 (MonoGenericInst): Added `is_reference' flag.
15760 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
15762 * reflection.c (mono_image_create_pefile): Only set the pe_offset
15763 inside the MSDOS header. Fixes #71201.
15765 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
15767 (mono_domain_finalize): Ditto.
15769 2005-01-12 Martin Baulig <martin@ximian.com>
15771 * class.c (mono_get_shared_generic_class): Use the cache for
15772 non-dynamic generic classes.
15774 * class-internals.h (mono_class_create_generic_2): Removed
15775 function prototype, this function is now static inside class.c.
15777 * class.c (mono_class_create_generic_2): Made this static, only
15778 call it from mono_class_init() and mono_class_setup_parent().
15779 (collect_implemented_interfaces_aux): Call mono_class_init() on
15780 the interfaces we collect.
15781 (mono_class_setup_vtable): Call mono_class_init (class->parent).
15783 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
15785 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
15786 it a real thread handle.
15788 * domain-internals.h: Move exvar_offset from MonoJitInfo to
15789 MonoJitExceptionInfo, since each catch clause needs its own variable.
15791 2005-01-11 Dick Porter <dick@ximian.com>
15793 * image.c (mono_pe_file_open): New variant on mono_image_open()
15794 that does not set up the CLI metadata; used for FileVersionInfo so
15795 it can get the data for windows binaries too.
15797 * process.c (process_read_string_block): Don't read off the end of
15798 the StringTable block.
15800 These both fix bug 70766.
15802 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
15804 * gc.c: set some fields to NULL at GC cleanup time.
15805 * threads.c: if we quit the main thread, call exit ().
15807 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
15809 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
15811 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
15813 * threads.h, threads.c, object.c: added accessor and settor for
15814 main_thread. Handle it specially when exiting from it: wait
15815 for other foreground threads to exit.
15817 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
15819 * process.c, verify.c: remove some bloat.
15821 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
15823 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
15824 the calling convention to cdecl under win32.
15826 2005-01-08 Ben Maurer <bmaurer@ximian.com>
15828 * object.c (mono_object_get_size): New function to get the size of
15829 an object instance.
15831 * profiler.c (simple_allocation): Use above.
15833 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
15835 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
15836 ves_icall_System_AppDomain_getRootDomain (as it's not required to
15837 get an appdomain by it's id and we can't assume the root's id is 0).
15838 * domain-internals.h: Change the function prototype to match.
15839 * icall.c: Change the icall table for AppDomain.
15841 2005-01-08 Miguel de Icaza <miguel@ximian.com>
15843 * locales.c (string_invariant_compare_char): Only compute
15844 GUnicodeTypes in the case where we need them. Test for ordinality
15845 first and return if so.
15850 * FIXME: here we must use the information from c1type and c2type
15851 * to find out the proper collation, even on the InvariantCulture, the
15852 * sorting is not done by computing the unicode values, but their
15853 * actual sort order.
15856 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15858 * loader.c: for P/Invoke methods, allow the "Internal" shared
15859 library name to refer to the calling process symbol namespace.
15861 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
15863 * Makefile.am: Add the security manager to the build.
15864 * security-manager.c|h: New. Initialization of the security manager.
15866 2005-01-07 Dick Porter <dick@ximian.com>
15869 * monitor.c: Update thread state during Monitor and WaitHandle
15870 waits. Fixes bug 71031.
15872 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
15874 * reflection.c (property_encode_signature): Correctly handle when the
15875 property has no methods.
15877 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
15879 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
15881 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
15882 fields from mb, not rmb. Fixes #71017.
15884 * marshal.c (emit_ptr_to_str_conv): Add support for
15885 ByValTStr -> string conversion. Fixes #71015.
15887 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
15889 * mempool.c (mono_mempool_contains_addr): New helper function.
15891 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
15893 * metadata.c (mono_metadata_compute_size): Fix size calculation of
15894 HasSematics encoded fields.
15896 * metadata.c (mono_type_to_unmanaged): Improve error message for
15897 invalid string marshalling.
15899 * metadata.c: Fix warnings.
15901 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
15903 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
15906 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
15908 * domain.c object.c domain-internals.h: Revert part of r38077 since the
15909 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
15912 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
15914 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
15915 so methods containing these can be AOTed.
15917 2005-01-03 Martin Baulig <martin@ximian.com>
15919 * loader.c (find_method): Removed the hack for generic instances.
15920 (method_from_memberref): If our parent is a generic instance, pass
15921 its generic type definition to find_method() and then inflate the
15923 (mono_get_method_constrained): Pass the generic type definition to
15924 find_method() and inflate the method later.
15926 * class-internals.h (MonoStats): Added `generic_class_count'.
15928 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
15929 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
15931 * reflection.c (mono_custom_attrs_from_params): Don't ignore
15932 generic type definitions.
15934 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
15936 * loader.c icall.c: Fix warnings.
15938 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
15940 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
15941 blittable types. Fixes #70864.
15943 2004-12-29 Martin Baulig <martin@ximian.com>
15946 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
15948 * reflection.c (mono_method_get_object): Create a
15949 "System.Reflection.MonoGenericMethod" for inflated methods; don't
15950 call mono_get_inflated_method().
15952 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
15954 2004-12-27 Martin Baulig <martin@ximian.com>
15956 * class-internals.h (MonoMethod): Added `is_inflated' flag.
15957 (MonoMethodInflated): Added `inflated' field.
15959 * class.c (mono_class_inflate_generic_method): Don't really
15960 inflate the method here; just set the `is_inflated' flag in the
15962 (mono_class_get_inflated_method): Actually inflate the method here
15963 if it's not already inflated; we use the MonoMethodInflated's new
15964 `inflated' field as a cache.
15966 2004-12-26 Martin Baulig <martin@ximian.com>
15969 (inflate_generic_class): Moved some code out of inflate_generic_type().
15970 (mono_class_inflate_generic_method): If we're already inflated,
15971 inflate the context and use the declaring method; ie. make sure
15972 the declaring method of an inflated method is always the generic
15974 (mono_class_create_from_typedef): Create
15975 `class->generic_container->context->gclass'.
15977 2004-12-24 Ben Maurer <bmaurer@ximian.com>
15979 * metadata-internals.h, marshal.c, reflection.c: More
15980 MonoGHashTable->GHashTable.
15982 * domain-internals.h, class.c: Change MonoGHashTable's into
15983 GHashTables for some cases where no gc stuff is used
15985 All users: update apis
15987 2004-12-23 Ben Maurer <bmaurer@ximian.com>
15989 * metadata.c (builtin_types): Make this `const'. Makes this get
15990 put into the shareable section.
15991 (mono_metadata_init): Casts to make gcc happy.
15993 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
15995 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
15997 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
15999 * icall.c: Added an internal call to retrieve the position and length
16000 of assembly-level declarative security attributes (RequestMinimum,
16001 RequestOptional and RequestRefuse). This is used by the Assembly class
16002 to re-create the corresponding permission sets.
16004 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
16006 * marshal.c: fix the stelemref wrapper to be type correct
16009 2004-12-20 Ben Maurer <bmaurer@ximian.com>
16011 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
16012 to do key & 0x7fffffff. Hashtable already does this. It just
16013 results in longer code.
16015 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
16017 * appdomain.c: Bump corlib version.
16018 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
16019 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
16020 * reflection.c|h: Add functions to get declarative security infos
16021 (blob position and length) for assemblies, classes and methods.
16023 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
16025 * reflection.c: sort the constant table (bug #70693).
16027 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
16029 * object-internals.h, threads.c, domain.c: add accessors for
16030 the MonoThread and MonoDomain tls keys.
16032 2004-12-18 Martin Baulig <martin@ximian.com>
16034 * class.c (inflate_generic_type): If we're inflating a generic
16035 instance, set `ngclass->context->container = context->container';
16036 ie. the container we inflated into.
16038 * metadata.c (mono_metadata_parse_generic_param): Reflect above
16039 inflate_generic_type() changes.
16041 2004-12-17 Martin Baulig <martin@ximian.com>
16043 * class-internals.h
16044 (MonoGenericClass): Replaced `MonoType *generic_type' with
16045 `MonoClass *generic_class'. Removed `dynamic_info'; if
16046 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
16047 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
16049 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
16051 * exception.c (mono_exception_from_token): New helper function.
16053 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
16055 * assembly.c (mono_assembly_load_with_partial_name): Call
16056 mono_assembly_loaded before invoking the preload hooks. Fixes
16059 * object-internals.h (MonoThread): Change culture_info and
16060 ui_culture_info into an array.
16062 * threads.c: Cache culture info objects from more than one appdomain.
16064 * threads.c threads-types.h icall.c: Add icalls for manipulating the
16065 current UI culture.
16067 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
16069 * threads.h threads.c appdomain.c: Clear the culture_info field of
16070 all threads during unloading if they point to an object in the dying
16073 2004-12-13 Ben Maurer <bmaurer@ximian.com>
16075 * culture-info.h (TextInfoEntry): New struct
16076 * object-internals.h: sync with managed
16077 * locales.c: fill the `text_info_data' field
16078 * culture-info-tables.h: update
16080 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
16082 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
16085 2004-12-12 Ben Maurer <bmaurer@ximian.com>
16087 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
16088 (ves_icall_ModuleBuilder_getMethodToken): Ditto
16090 2004-12-12 Martin Baulig <martin@ximian.com>
16092 * mono-debug-debugger.c (write_type): If we're an enum and the
16093 builtin types have already been initialized, call mono_class_init().
16095 2004-12-11 Martin Baulig <martin@ximian.com>
16097 * metadata.c (mono_metadata_load_generic_params): Added
16098 `MonoGenericContainer *parent_container' argument; automatically
16099 compute `container->is_method'; pass the correct owner to
16102 * reflection.c (compare_genericparam): Sort the GenericParam table
16103 according to increasing owners.
16105 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
16107 * profiler.c: allow disabling the default profiler.
16109 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
16111 * decimal.c, icall.c: allow disabling System.Decimal support.
16113 2004-12-09 Marek Safar <marek.safar@seznam.cz>
16115 * reflection.c: Add support for null attribute arguments.
16117 2004-12-09 Martin Baulig <martin@ximian.com>
16119 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
16120 names to get rid of compiler warnings.
16122 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
16124 * marshal.c (mono_marshal_get_struct_to_ptr): Call
16125 mono_marshal_load_type_info (). Fixes #69625.
16126 (mono_marshal_get_ptr_to_struct): Likewise.
16128 2004-12-08 Martin Baulig <martin@ximian.com>
16130 * mono-debug.h: Bumped version number to 47.
16132 * mono-debug-debugger.c
16133 (mono_debugger_event_handler, mono_debugger_event): Take two
16134 guint64 arguments insteed of a gpointer and a guint32.
16136 2004-12-08 Martin Baulig <martin@ximian.com>
16138 * debug-mono-symfile.h
16139 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
16140 `address' to `native_offset'.
16142 2004-12-08 Martin Baulig <martin@ximian.com>
16144 * class.c (mono_class_create_from_typespec): Only inflate if we
16145 either have `context->gclass' or `context->gmethod'.
16147 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
16149 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
16151 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
16153 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
16155 * reflection.c (mono_assembly_get_object): Remove the workaround put
16156 in for the release.
16158 * appdomain.c: Use the corlib_internal field from MonoAssembly.
16160 * appdomain.c: Bump corlib version.
16162 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
16163 be visible in other appdomains.
16165 2004-12-07 Ben Maurer <bmaurer@ximian.com>
16167 * threads.c: Interlocked inc and dec for longs were messed up,
16168 use a KISS based impl for this. Fixes 70234
16170 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
16172 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
16174 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
16176 * icall.c: fix to follow policy not to allow struct
16177 arguments in icalls.
16179 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16181 * process.c: make the patch that handles spaces in file paths work
16182 on mono/windows too.
16184 2004-12-06 Martin Baulig <martin@ximian.com>
16186 * class.c (mono_class_create_generic): Call
16187 mono_class_setup_supertypes() if we're dynamic.
16188 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
16190 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
16192 * object-internals.h: Add new fields to MonoThread.
16194 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16196 * icall.c threads-types.h threads.c: Add new icalls.
16198 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
16200 * object-internals.h (MonoReflectionAssembly): Sync object layout with
16203 * appdomain.c: Bump corlib version.
16205 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
16206 internal assemblies. Fixes #69181.
16208 2004-12-05 Martin Baulig <martin@ximian.com>
16210 * class.c (mono_class_inflate_generic_signature): Make this a
16211 no-op if `context' is NULL or we don't have any type parameters;
16212 also copy `sentinelpos'.
16214 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
16216 * image.c: Add unbox_wrapper_cache.
16218 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
16220 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
16221 function generator.
16223 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
16226 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
16228 2004-12-04 Martin Baulig <martin@ximian.com>
16230 * loader.c (mono_method_get_signature_full): New public function;
16231 like mono_method_get_signature(), but with an additional
16232 `MonoGenericContext *' argument.
16234 * class.c (mono_class_inflate_generic_signature): Formerly known
16235 as inflate_generic_signature(); make this public.
16237 2004-12-04 Martin Baulig <martin@ximian.com>
16240 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
16241 instead of a `MonoGenericContainer *'.
16242 (mono_metadata_parse_array_full): Likewise.
16243 (mono_metadata_parse_signature_full): Likewise.
16244 (mono_metadata_parse_method_signature_full): Likewise.
16245 (mono_metadata_parse_generic_inst): Likewise.
16246 (mono_metadata_parse_generic_param): Likewise.
16247 (mono_metadata_parse_mh_full): Likewise.
16248 (mono_type_create_from_typespec_full): Likewise.
16250 2004-12-03 Martin Baulig <martin@ximian.com>
16252 * class-internals.h (MonoGenericContainer): Replaced the
16253 `MonoGenericContext * pointer with a `MonoGenericContext'
16254 structure and made it the first element.
16256 2004-12-03 Martin Baulig <martin@ximian.com>
16259 (inflate_generic_type): Set the `context->container' when creating
16260 a new MonoGenericContext.
16261 (mono_class_inflate_generic_method): Likewise.
16262 (mono_class_create_from_typespec): Just use `context->container'
16263 to get the container.
16265 * loader.c (method_from_methodspec): Set `context->parent' from
16266 `context->container' - and if that's a method container, use its
16267 parent. Also set the `context->container' when creating a new
16268 MonoGenericContext.
16269 (mono_get_method_from_token): Use just `context->container' to get
16272 * metadata.c (do_mono_metadata_parse_generic_class): Also set
16273 `gclass->context->container'.
16275 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
16276 the `context->container' when creating a new MonoGenericContext.
16278 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
16280 * reflection.c (compare_genericparam): Sort params with identical
16281 owner by their number. Fixes gen-111 on sparc.
16283 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
16285 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
16286 around the domain changes.
16288 * appdomain.c (mono_domain_unload): Handle the case when the thread
16289 calling Unload is itself being aborted during unloading. Fixes #70022.
16291 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
16293 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
16294 checkpoint_func as an icall so it gets a wrapper.
16295 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
16296 in the cross-appdomain wrappers too.
16298 * threads.c (mono_thread_has_appdomain_ref): Make this public.
16300 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
16302 * reflection.c: Fix some memory leaks.
16304 2004-12-02 Martin Baulig <martin@ximian.com>
16306 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
16308 * metadata.c (generic_class_cache): New static hashtable.
16309 (mono_metadata_lookup_generic_class): New public method.
16311 2004-12-02 Martin Baulig <martin@ximian.com>
16313 * class.c (mono_class_create_from_typedef): Call
16314 mono_class_setup_parent() and mono_class_create_mono_type() before
16315 parsing the interfaces.
16317 2004-12-02 Martin Baulig <martin@ximian.com>
16319 * metadata.c (generic_inst_cache): New static hashtable.
16320 (mono_metadata_lookup_generic_inst): New public function.
16321 (mono_metadata_inflate_generic_inst): New public function.
16322 (mono_metadata_parse_generic_inst): New public function.
16323 (do_mono_metadata_parse_generic_class): Use the new
16324 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
16325 since this'll also use the cache.
16327 * reflection.c (mono_reflection_bind_generic_method_parameters):
16328 Use mono_metadata_lookup_generic_inst() to use the new cache.
16330 * class.c (inflate_mono_type): Use
16331 mono_metadata_inflate_generic_inst() to inflate a generic
16332 instance; this'll also use the new cache.
16334 * loader.c (method_from_methodspec): Use
16335 mono_metadata_parse_generic_inst() and
16336 mono_metadata_inflate_generic_inst() rather than parsing it
16337 manually, so we can use the new cache.
16339 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
16341 * threads.c (wait_for_tids): Do not incorrectly free threads when
16342 the wait times out.
16344 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16346 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
16347 iter->args based on whether parameters are passed in registers (i.e.
16348 MONO_ARCH_REGPARMS is defined)
16350 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
16352 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
16353 the exception message. Fixes #70070.
16354 (method_from_methodspec): Fix warnings.
16356 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16358 * process.c: (complete_path) return the path quoted
16360 2004-12-01 Martin Baulig <martin@ximian.com>
16362 * class-internals.h (MonoGenericInst): New structure.
16363 (MonoGenericClass): Replaced `type_argc', `type_argv' and
16364 `is_open' with `MonoGenericInst *inst'.
16365 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
16366 `is_open' with `MonoGenericInst *inst'.
16368 2004-11-30 Martin Baulig <martin@ximian.com>
16370 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
16372 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
16373 to `generic_class_cache'.
16376 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
16377 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
16378 (mono_generic_inst_is_valuetype): Renamed to
16379 mono_generic_class_is_valuetype().
16381 * class-internals.h
16382 (MonoGenericInst): Renamed to MonoGenericClass.
16383 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
16384 (MonoClass): Renamed `generic_inst' to `generic_class'.
16385 (MonoGenericContext): Renamed `ginst' to `gclass'.
16387 * object-internals.h
16388 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
16390 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
16391 mono_reflection_generic_class_initialize().
16393 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
16394 now known as "System.Reflection.MonoGenericClass".
16395 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
16397 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
16399 * class-internals.h: Added a flag field to MonoClass to cache the
16400 declarative security attributes actions associated with the class.
16401 * domain-internals.h: Added booleans to MonoJitInfo to cache the
16402 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
16403 applicable to the JITted method.
16404 * reflection.c|h: Added functions to extract (as flags) which security
16405 actions are available (declaratively) for a method, class or assembly.
16406 * metadata.c|h: Added functions to search the declarative security
16407 table in the metadata.
16409 2004-11-29 Ben Maurer <bmaurer@ximian.com>
16411 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
16412 EXPORTEDTYPES are already in the class name cache, so there is no
16413 need to add extra code here to look at them. Just removes a bit of
16416 (ves_icall_System_Environment_get_TickCount): No need for #if
16417 WINDOWS. We already have the code in io-layer.
16419 2004-11-28 Martin Baulig <martin@ximian.com>
16422 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
16425 2004-11-27 Miguel de Icaza <miguel@ximian.com>
16427 * assembly.c (do_mono_assembly_open): Instead of having a
16428 conditional WITH_BUNDLE, incorporate support for bundles here, by
16429 having a global `bundles' variable holding a pointer to the actual
16432 (mono_register_bundled_assemblies): New API call used by the
16435 See mkbundle.1 for details.
16437 2004-11-27 Martin Baulig <martin@ximian.com>
16439 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
16440 the vtable for generic methods.
16442 2004-11-26 Martin Baulig <martin@ximian.com>
16445 (mono_metadata_generic_method_hash): New public function.
16446 (mono_metadata_generic_method_equal): Likewise.
16448 * class-internals.h
16449 (MonoGenericContainer): Added `GHashTable *method_hash'.
16451 * reflection.c (ReflectionMethodBuilder): Added
16452 `MonoGenericContainer *generic_container'.
16453 (reflection_methodbuilder_to_mono_method): Don't create a new
16454 MonoGenericContainer each time we're called.
16455 (mono_reflection_bind_generic_method_parameters): Use
16456 `container->method_hash' to cache the results so we don't create a
16457 different method if we're called several times with the same
16460 * loader.c (method_from_methodspec): Use the new
16461 `container->method_hash' here, too.
16463 2004-11-26 Martin Baulig <martin@ximian.com>
16465 * class.c (inflate_generic_signature): Correctly compute
16466 `res->has_type_parameters'.
16467 (mono_class_vtable): Use the `has_type_parameters' flag to
16468 determine whether we're a generic method.
16470 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
16472 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
16474 * object.c (mono_runtime_run_main): Fix a small memory leak.
16476 2004-11-25 Martin Baulig <martin@ximian.com>
16478 * class.c (set_generic_param_owner): Fixed the loop.
16480 2004-11-25 Martin Baulig <martin@ximian.com>
16482 * object.c (mono_class_vtable): Don't create any JIT wrappers for
16485 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
16487 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
16488 names. Fixes #69787.
16490 2004-11-24 Martin Baulig <martin@ximian.com>
16492 * class.c (mono_class_create_generic_2): If we don't have a
16493 `ginst->parent', inflate `gklass->parent' to get our parent.
16495 2004-11-24 Martin Baulig <martin@ximian.com>
16497 * reflection.c (compare_genericparam): Correctly sort the
16498 GenericParam table; fixes #69779.
16500 2004-11-23 Ben Maurer <bmaurer@ximian.com>
16502 * reflection.c: When writing a PE file, don't create a huge
16503 buffer in memory. Just write the arrays we have to the file.
16504 This reduces memory usage.
16506 * metadata-internals.h: MonoDynamicStream pefile is no longer used
16509 2004-11-17 Martin Baulig <martin@ximian.com>
16511 * class.c (mono_class_init): Don't setup `class->parent' for
16512 dynamic instances; moved this to mono_class_generic_2().
16513 (mono_class_create_generic): Also set `klass->inited' for dynamic
16515 (mono_class_create_generic_2): Don't do anything for dynamic
16516 generic instances. Set `klass->parent' here and also call
16517 mono_class_setup_parent() here.
16519 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
16520 `MonoType *parent' argument; set `ginst->parent' before calling
16521 mono_class_create_generic_2(), so we set the correct parent.
16523 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
16525 * reflection.c: allow getting attributes from ModuleBuilder
16528 2004-11-17 Martin Baulig <martin@ximian.com>
16530 * class.c (mono_class_create_from_typedef): If a type parameter is
16531 inherited from an outer class, set its owner to that class.
16533 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
16535 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
16536 for (int*) written size. This fixes bug #69592.
16538 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
16540 * icall.c: Added IsAuthenticodePresnet internal call.
16541 * image.c|h: New function that check a MonoImage for an Authenticode
16542 signature in the certificate PE data directory.
16543 * security.c|h: New internal call to ask the runtime if an
16544 Authenticode signature seems referenced in the PE header.
16546 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
16548 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
16550 * reflection.c (mono_image_create_pefile): Free the assembly streams
16551 after writing out the assembly file.
16553 * object.c (mono_runtime_run_main): Fix small memory leak.
16555 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
16556 property access modifiers. Fixes #69389.
16558 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
16560 * domain.c, object.c, object-internals.h, domain-internals.h,
16561 object.h, marshal.c: keep dynamic code info per domain.
16563 2004-11-15 Martin Baulig <martin@ximian.com>
16565 * class.c (mono_type_get_name_recurse): Put type arguments in
16566 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
16569 2004-11-15 Martin Baulig <martin@ximian.com>
16571 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
16572 (mono_class_setup_vtable): When computing `the_cname' for a
16573 generic instance, don't include the namespace since we'd otherwise
16576 2004-11-15 Martin Baulig <martin@ximian.com>
16578 * class.c (mono_class_create_generic): Changed return type to void.
16579 (mono_class_create_generic_2): New public function; setup
16580 `class->method', `class->field' and `class->interfaces' here
16581 instead of in mono_class_init().
16583 * class.h (mono_class_create_generic): Moved to class-internals.h.
16585 2004-11-14 Ben Maurer <bmaurer@ximian.com>
16587 * reflection.c (mono_image_create_pefile): take a file HANDLE.
16588 rather than writing to memory, write to this file. Right now,
16589 we are just writting into a buffer, and copying that. However
16590 we can avoid the buffer later.
16592 (mono_dynamic_stream_reset): new function
16594 * icall.c, object-internals.h: update for the above.
16596 2004-11-13 Ben Maurer <bmaurer@ximian.com>
16598 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
16599 have been using gc'd memory. First it is slower, unlikely
16600 the comment in the source code said, secondly, it increases
16601 our footprint to do it in the gc.
16603 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
16604 the method so that it does not have to copy to managed code.
16606 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
16608 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
16610 2004-11-12 Martin Baulig <martin@localhost>
16612 * reflection.c (mono_image_create_token): Allow generic method
16613 definitions here, since they may appear in an `.override'; see
16614 gen-98/gen-99 for an example.
16616 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
16618 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
16621 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
16624 2004-11-11 Martin Baulig <martin@ximian.com>
16626 * class.c (mono_class_setup_vtable): In an explicit interface
16627 implementation, the method name now includes the arity.
16629 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
16631 * object.c (mono_array_full_copy): Fix warning.
16633 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
16635 * appdomain.c: Removed look_for_method_by_name(). Use the new method
16636 mono_class_get_method_from_name() instead.
16638 * class-internals.h: Added two new types of wrappers.
16639 Added MonoRemotingTarget enum. Added new trampoline function type, which
16640 takes an additional MonoRemotingTarget value as parameter, so it is
16641 possible to request a trampoline for a specific target.
16643 * class.c: Added new mono_class_get_method_from_name() method.
16645 * class.h: In MonoRemoteClass, we can have now to vtables, one for
16646 general remoting sinks and one specific for cross domain calls.
16648 * debug-helpers.c: Added new wrapper names.
16650 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
16653 * image.c: Porperly delete value objects form the remoting invoke hashtable.
16655 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
16656 with several other methods (mono_marshal_get_xappdomain_dispatch,
16657 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
16658 and others) can generate a fast remoting wrapper for cross domain calls.
16659 More information can be found in docs/remoting.
16660 Other changes: Removed mono_find_method_by_name, and used
16661 mono_class_get_method_from_name instead.
16662 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
16663 is stored in the remoting invoke hashtable.
16665 * marshal.h: published the new method for getting the xdomain wrapper,
16666 and also added a method for getting the adequate wrapper for a given
16669 * object-internals.h, object.c: Added a couple of methods for capying and
16671 Modified mono_install_remoting_trampoline, which takes the new remoting
16672 trampoline that has a remoting target as parameter.
16673 mono_class_proxy_vtable now also takes a remoting target as parameter, and
16674 will return the most suitable vtable for the target.
16675 Added mono_remote_class_vtable, which returns the vtable of a remote class
16676 (which can be the normal remoting vtable or the xdomain vtable).
16678 * threads.c: the xdomain invoke and dispatch wrappers must also be
16679 protected against interruptions.
16681 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16683 * icall.c: use memmove in BlockCopyInternal when the source and
16684 destination arrays are the same.
16686 2004-11-09 Martin Baulig <martin@ximian.com>
16688 * class-internals.h (MonoGenericContainer): Removed `method' and
16689 `signature', replaced them with `is_method' and `is_signature'
16690 flags. Added `context'.
16692 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
16693 instead of a `MonoGenericContainer *'.
16695 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
16696 for dynamic type parameters.
16697 (mono_metadata_load_generic_params): Setup `container->context'.
16699 * reflection.c (mono_reflection_setup_generic_class): Setup
16700 `tb->generic_container->context'.
16701 (do_mono_reflection_bind_generic_parameters): Use
16702 mono_class_inflate_generic_type() to correctly inflate types,
16703 rather than using our own hack just for MONO_TYPE_VAR.
16705 2004-11-09 Martin Baulig <martin@ximian.com>
16707 * class.c (mono_class_inflate_generic_method): Small fix; don't
16711 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
16712 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
16713 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
16714 (ves_icall_Type_BindGenericParameters): Likewise.
16715 (ves_icall_Type_get_IsGenericInstance): Likewise.
16716 (ves_icall_Type_GetGenericParameterPosition): Likewise.
16717 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
16718 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
16719 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
16721 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
16723 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
16724 assembly versions and public key tokens. Fixes #69113.
16726 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
16728 * metadata.c: fix bug introduced with the type cache changes
16731 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
16733 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
16734 the MonoClass pointer instead of the token in exception clauses.
16735 * reflection.c: updates for the above and make the code not depend
16736 on the structure of MonoExceptionClause.
16738 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
16740 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
16741 Add support for dynamic assemblies. Fixes #69114.
16743 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
16745 2004-11-07 Ben Maurer <bmaurer@ximian.com>
16747 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
16748 since most only those methods use it. the code member of
16749 MonoMethodPInvoke was dead, so that can be removed too. Also,
16750 remove inline_count (again, not used), and move slot so that it
16751 can share bits with some other flags. This saves 8 bytes in the
16752 structure and gives us about 50 kb back for mcs helloworld.cs
16754 * *.[ch]: Do naming changes for the above.
16756 * loader.c (mono_method_get_header): Lazily init the header
16758 (mono_get_method_from_token): don't init the header here
16759 (mono_free_method): the header may never be allocated
16761 Overall, this saves 150 kb of unmanaged allocations
16762 for mcs helloworld.cs. That accounts for 10% of the unmanaged
16765 * loader.c, loader.h (mono_method_get_header): new accessor.
16767 * *.[ch]: use the above method. Prepares us to lazily load
16770 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
16771 three warnings, which are actual bugs (see 69206).
16773 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
16774 unused. Saves a cool 4 bytes / method.
16776 2004-11-06 Ben Maurer <bmaurer@ximian.com>
16778 * metadata.c (builtin_types): Add types for System.Object here.
16779 (mono_metadata_parse_type_full): Cache MonoType*'s that are
16780 for a class or valuetype from klass->this_arg or klass->byval_arg.
16782 On mcs for a hello world, this gets us down from 21836 MonoType's
16785 (mono_metadata_free_type): Account for the above change.
16787 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
16789 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
16790 exception instead of asserting if name is null.
16791 (ves_icall_System_AppDomain_GetData): Ditto.
16793 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
16795 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
16798 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
16799 Return NULL when the domain does not have entry_assembly set.
16801 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
16802 Add a 'resource_modules' argument.
16803 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
16805 * reflection.c (mono_reflection_create_runtime_class): Move setting
16806 of wastypebuilder here, so mono_get_type_object () returns a MonoType
16809 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
16810 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
16811 Throw an ArgumentNullException if 'ptr' is null.
16813 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
16814 assemblies here. Fixes #69020.
16816 2004-11-05 Geoff Norton <gnorton@customerdna.com>
16818 * reflection.c (build_compressed_metadata): Fix the previous patch for
16819 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
16822 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
16824 * assembly.c (mono_assembly_names_equal): Allow a match if one of
16825 the cultures is false. Fixes #69090.
16827 * reflection.c (build_compressed_metadata): Fix invalid memory read
16828 detected by valgrind.
16830 * reflection.c (mono_reflection_get_type): Avoid triggering a
16831 TypeResolve multiple times for the same type. Fixes #65577.
16833 2004-11-04 Ben Maurer <bmaurer@ximian.com>
16835 * marshal.c: Avoid using ldftn to call managed functions. It is
16836 much slower than just a call.
16838 * reflection.c (mono_module_get_object): free the basename we
16839 allocate here from glib.
16841 * reflection.c (ensure_runtime_vtable): make sure to free
16842 overrides. Also, we were allocating an array of MonoMethod not an
16843 array of MonoMethod*.
16845 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
16847 * image.c (mono_image_close): free image->guid here.
16849 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
16851 * reflection.c: Fix some spec conformance issues with the PE file
16852 structures so mcs compiled apps run on the Net 2.0 beta.
16854 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
16856 * string-icalls.c (ves_icall_System_String_ctor_encoding):
16857 Implement this. Fixes #67264.
16859 * debug-helpers.h debug-helpers.c marshal.c: Move
16860 mono_find_method_by_name to debug-helpers.c.
16862 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
16864 * object.c (mono_release_type_locks): type_initialization_hash is
16867 * reflection.c object.c object-internals.h: Fix warnings.
16869 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
16870 without accessors. Fixes #61561.
16872 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
16873 application base from the root domain if not set. Fixes #65641.
16874 (mono_runtime_init): Fix warning.
16876 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16878 * appdomain.c: call mono_thread_pool_init.
16879 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
16880 of worker threads based on the number of CPUs and the environment
16881 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
16882 for non-windows (windows) systems.
16884 2004-10-27 Chris Toshok <toshok@ximian.com>
16886 * mono-debug-debugger.c (write_class): don't call mono_class_init
16887 here, as even with the check for (!klass->init_pending), we get
16888 into a situation where we're hitting cycles in class
16889 initialization. Fixes #68816.
16891 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
16893 * image.c: Avoid overwriting values in the loaded_images_hash when an
16894 assembly is loaded multiple times. Fixes #61152.
16896 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
16897 so multiple satellite assemblies for the same name can be loaded.
16900 * mono_domain_assembly_preload: Actually return the loaded assembly,
16903 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
16904 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
16906 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
16907 pending finalizers are not invoked after the appdomain has been
16908 unloaded. Fixes #67862.
16910 2004-10-22 Martin Baulig <martin@ximian.com>
16912 * mono-debug-debugger.c
16913 (mono_debugger_runtime_invoke): Don't box valuetypes.
16915 2004-10-22 Chris Toshok <toshok@ximian.com>
16917 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
16918 don't hide private methods.
16920 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
16922 * icall.c: Allows the runtime to "share" (when known) the public key
16923 token of an assembly. This avoid the need to recalculate the token
16924 (from the public key) in managed code.
16926 2004-10-21 Chris Toshok <toshok@ximian.com>
16928 * debug-helpers.c (append_class_name): argh, revert last patch.
16930 2004-10-21 Chris Toshok <toshok@ximian.com>
16932 * debug-helpers.c (append_class_name): use '+' as the delimiter,
16933 not '/', so that it matches what the debugger uses to look up
16936 2004-10-21 Martin Baulig <martin@ximian.com>
16938 * mono-debug-debugger.c (mono_debugger_throw_exception): New
16939 public method; this is called each time an exception is thrown and
16940 allows the debugger to use exception catch points.
16942 2004-10-21 Martin Baulig <martin@ximian.com>
16944 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
16945 the stack pointer and the exception object in some struct and pass
16946 that to the debugger.
16948 2004-10-21 Chris Toshok <toshok@ximian.com>
16950 * mono-debug-debugger.c (do_write_class): add instance/static
16951 event support. We don't expose "raise" or "other" yet.
16952 (event_is_static): new method.
16954 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
16956 * mono-debug-debugger.c
16957 (mono_debugger_handle_exception): Remove
16958 bogus return value for fussy compilers.
16960 2004-10-20 Martin Baulig <martin@ximian.com>
16962 * mono-debug-debugger.c
16963 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
16964 (mono_debugger_handled_exception): Likewise.
16966 2004-10-20 Martin Baulig <martin@ximian.com>
16968 * mono-debug-debugger.h (MonoDebuggerEvent): Added
16969 MONO_DEBUGGER_EVENT_EXCEPTION.
16971 * mono-debug-debugger.c (mono_debugger_handle_exception): New
16972 public function to send the debugger a notification for an
16973 exception and inform it about a catch/finally clause.
16975 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
16977 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
16978 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
16981 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
16983 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
16985 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
16986 marshalled as [In,Out]. Fixes #58325.
16988 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
16990 * reflection.c (mono_method_body_get_object): Implement some fields.
16992 2004-10-12 Martin Baulig <martin@ximian.com>
16994 * reflection.c (mono_reflection_bind_generic_parameters): Small
16995 fix, correctly retrieve our parent from a generic instance.
16997 2004-10-12 Martin Baulig <martin@ximian.com>
16999 * metadata.c (mono_metadata_generic_param_equal): We always have
17003 (mono_class_from_generic_parameter): We need to have an owner.
17004 (my_mono_class_from_generic_parameter): Likewise.
17006 * reflection.c (mono_reflection_setup_generic_class): Renamed to
17007 mono_reflection_create_generic_class() and added a new
17008 mono_reflection_setup_generic_class().
17009 (mono_reflection_initialize_generic_param): If we're a nested
17010 generic type and inherited from the containing class, set our
17011 owner to the outer class.
17013 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
17015 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
17017 * reflection.c (mono_method_body_get_object): New function to create
17018 a MethodBody object.
17020 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
17022 2004-10-11 Martin Baulig <martin@ximian.com>
17024 * metadata.c (_mono_metadata_type_equal): Renamed to
17025 do_mono_metadata_type_equal() and made static.
17027 2004-10-11 Martin Baulig <martin@ximian.com>
17029 * appdomain.c: Bump corlib version number to 28.
17031 2004-10-10 Martin Baulig <martin@ximian.com>
17033 * class-internals.h
17034 (MonoGenericInst): Added `MonoGenericContainer *container'.
17035 (MonoGenericMethod): Likewise.
17036 (MonoGenericContext): Likewise.
17037 (MonoGenericParam): Added `MonoGenericContainer *owner'.
17040 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
17041 (do_mono_metadata_parse_generic_inst): Likewise.
17042 (mono_metadata_parse_type_full): New public method. This is the actual
17043 mono_metadata_parse_type() implementation - with an additional
17044 `MonoGenericContainer *' argument.
17045 (mono_metadata_parse_array_full): Likewise.
17046 (mono_metadata_parse_signature_full): Likewise.
17047 (mono_metadata_parse_method_signature_full): Likewise.
17048 (mono_metadata_parse_mh_full): Likewise.
17049 (mono_type_create_from_typespec): Likewise.
17050 (mono_metadata_interfaces_from_typedef_full): New public method;
17051 this is similar to the other _full() methods, but we take a
17052 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
17053 (mono_metadata_parse_generic_param): Take an additional
17054 `MonoGenericContainer *' argument and lookup the MonoGenericParam
17055 from that container.
17056 (mono_metadata_generic_param_equal): New static method to compare
17057 two type parameters.
17058 (_mono_metadata_type_equal): New static method; takes an
17059 additional `gboolean signature_only' argument - if true, we don't
17060 compare the owners of generic parameters.
17061 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
17062 with a TRUE argument - do a signature-only comparision.
17064 * loader.c: Use the new _full() methods and pass the
17065 MonoGenericContainer to them.
17067 * object-internals.h (MonoReflectionTypeBuilder): Added
17068 `MonoGenericContainer *generic_container' field.
17069 (MonoReflectionMethodBuilder): Likewise.
17071 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
17073 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
17074 case initial images of dynamic assemblies.
17076 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
17078 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
17080 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
17081 length of event->other array.
17082 (typebuilder_setup_events): Ditto.
17084 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
17085 'assembly_by_name' and add an 'assemblies' list.
17087 * assembly.h assembly.c: Add a new search hook for determining whenever
17088 an assembly is already loaded. Use this instead of searching in the
17089 loaded_assemblies list.
17091 * domain.c appdomain.c: Implement the new search hook so loaded
17092 assemblies are now scoped by appdomain. Fixes #67727.
17094 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
17096 * threads.c (mono_thread_attach): Initialize synch_lock field so
17097 mono_thread_detach works again.
17099 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
17100 'lib' too. Fixes #63130.
17102 2004-10-06 Jackson Harper <jackson@ximian.com>
17104 * culture-info-tables.h: regenerated.
17106 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
17108 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
17109 implemented by other interfaces in the result. Fixes #65764.
17111 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17112 Handle unloadable modules without crashing.
17114 * image.c (load_modules): Revert the previous patch since modules must
17115 have a fixed index inside the array.
17117 * image.c (load_modules): Don't include native modules in the modules
17120 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
17122 * reflection.h: Add param_defaults field.
17124 * reflection.c: Add support for parameter defaults in dynamic methods.
17127 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
17128 an empty string when a type has no namespace. Fixes #64230.
17130 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
17132 * tabledefs.h: Added "internal" security actions to support non-CAS
17133 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
17134 Note: they do not seems to be used anymore in 2.0 (new metadata format)
17136 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
17138 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
17139 constructor of abstract class. Fixes #61689.
17141 2004-10-04 Martin Baulig <martin@ximian.com>
17143 * class-internals.h (MonoGenericContainer): New type.
17144 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
17145 `MonoGenericContainer *generic_container'.
17146 (MonoClass): Replaced `gen_params' and `num_gen_params' with
17147 `MonoGenericContainer *generic_container'.
17149 * metadata.c (mono_metadata_load_generic_params): Return a
17150 `MonoGenericContainer *' instead of a `MonoGenericParam *';
17151 removed the `num' argument.
17153 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
17155 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
17156 for dynamic images.
17158 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
17161 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
17163 * reflection.c: Save pe_kind and machine values into the generated
17166 * appdomain.c: Bump corlib version number.
17168 * object-internals.h: Reorganize layout of LocalBuilder.
17170 * class-internals.h class.c (mono_class_get_implemented_interfaces):
17171 New helper function.
17173 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
17174 created MonoType for dynamic types. Fixes #66180.
17176 2004-10-02 Ben Maurer <bmaurer@ximian.com>
17178 * threadpool.c: the ares hashtable needs a critical section around it.
17179 this prevents some nasty segfaults
17181 2004-10-02 Massimiliano Mantione <massi@ximian.com>
17183 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
17184 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
17187 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
17189 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
17191 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
17193 * image.c: Always canonicalize image file names, to avoid loading
17194 the same assembly twice when referenced using a relative path.
17196 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
17198 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
17200 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
17202 * marshal.c: Fix warnings.
17204 2004-09-29 Geoff Norton <gnorton@customerdna.com>
17206 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
17207 attempting to marshal the delegate_trampoline as the method_addr.
17208 This patch has a static hashtable of marshalled delegates so that
17209 we can map delegate_trampoline addresses back to delegates. This
17210 allows a delegate passed to managed code to be passed back into native
17213 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
17215 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
17217 * reflection.c (method_encode_code): Align method headers properly.
17220 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
17222 * marshal.c: In the runtime invoke wrapper, reset the abort
17223 exception if it is cached. This avoids the automatic rethrowal of
17224 the exception after the catch of the wrapper. Also check for pending
17225 interruptions before calling the managed method. This is done using
17226 the new method emit_thread_force_interrupt_checkpoint, since the
17227 normal checkpoint method is ignored when running the invoke wrapper.
17228 * object.c: If the abort exception is rethrown, set the abort_exc
17229 field of the thread, so it will be rethrown aftere every catch.
17230 * threadpool.c: Only run an interruption checkpoint if what has been
17231 requested is a stop of the thread (aborts will be ignored).
17232 * threads.c: By default, a thread will now never be interrumped while
17233 running the runtime invoke wrapper (this ensures that runtime_invoke
17234 will always return to the caller if an exception pointer is provided).
17235 There is a new special method mono_thread_force_interruption_checkpoint()
17236 to force an interruption checkpoint even if running a protected
17237 wrapper, which is used by the same runtime invoke wrapper to do a check
17240 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
17242 * object.c, object-internals.h: Implemented mono_release_type_locks,
17243 which releases the cctor locks held by a thread.
17244 * threads.c, threads.h: In thread_cleanup, release cctor locks held
17245 by a thread. Added mono_thread_exit() method to be used to safely stop
17248 2004-09-28 Raja R Harinath <rharinath@novell.com>
17250 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17251 Move null check before dereference. Avoid indexing beyond the end
17252 of the 'modules' array.
17254 2004-09-28 Raja R Harinath <rharinath@novell.com>
17256 * metadata-internals.h (MonoImage): Add module_count field.
17257 * image.c (load_modules): Set image->module_count.
17258 (mono_image_load_file_for_image): Use image->module_count.
17259 * reflection.c (mono_image_load_module): Append to image->modules array
17260 of dynamic assembly.
17261 (mono_module_get_object): Fix loop to actually increment index.
17262 Use image->module_count.
17263 * assembly.c (mono_assembly_load_references): Use image->module_count.
17264 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
17267 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
17269 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
17270 Avoid assert on generic types.
17272 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
17274 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
17276 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
17278 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
17279 function to convert a MarshalSpec structure to its managed counterpart.
17281 * reflection.c: Fix warnings.
17283 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
17286 * icall.c (mono_create_icall_signature): Fix build.
17288 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
17290 * icall.c: Add MakePointType icall.
17292 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
17295 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17297 * threadpool.c: reuse allocated slots in the queue.
17299 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
17301 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
17303 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
17305 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
17308 * tabledefs.h: Add constants for pinvoke attributes BestFit and
17309 ThrowOnUnmappableChar.
17311 * icall.c (ves_icall_Type_GetPacking): New icall.
17313 2004-09-24 Martin Baulig <martin@ximian.com>
17315 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
17317 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17320 (mono_domain_set): allow setting a domain that is being unloaded.
17321 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
17324 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
17326 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
17327 the GetCustomAttributes icall.
17329 2004-09-23 Martin Baulig <martin@ximian.com>
17331 * object-internals.h (MonoReflectionGenericParam): Replaced
17332 'has_ctor_constraint', `has_reference_type' and `has_value_type'
17333 with `guint32 attrs'.
17335 2004-09-23 Martin Baulig <martin@ximian.com>
17337 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
17339 2004-09-23 Martin Baulig <martin@ximian.com>
17341 * object-internals.h (GenericParameterAttributes): New enum.
17343 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
17345 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
17347 * class.c (init_events): Fill out event->other field.
17349 * class.c: Fix warnings.
17351 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
17353 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
17355 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
17356 walk which doesn't supply the IL offset.
17358 2004-09-22 Martin Baulig <martin@ximian.com>
17360 * reflection.c (mono_reflection_setup_internal_class): If we're
17361 System.ValueType, System.Object or System.Enum, set
17362 `klass->instance_size' and create the vtable.
17363 (mono_reflection_create_internal_class): If we're an enum type,
17364 get the base class from our current corlib.
17366 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
17368 * reflection.h (MonoResolveTokenError): New type.
17370 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
17373 * icall.c: Add an 'error' argument to the ResolveToken icalls.
17375 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
17377 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
17378 Support also calling constructors, but only for already allocated objects.
17380 2004-09-17 Geoff Norton <gnorton@customerdna.com>
17382 * reflection.c (type_get_qualified_name): If the klass is null
17383 return the typename to avoid a NullRefEx.
17384 (encode_cattr_value): Get the qualified name of the boxed type,
17385 not the underlying enumtype. Fixes #62984.
17387 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
17389 * marshal.c: Fix problems with previous checkin.
17391 2004-09-21 <vargaz@freemail.hu>
17393 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
17394 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
17396 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
17398 2004-09-21 Geoff Norton <gnorton@customerdna.com>
17400 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
17401 should only return a type for pointers, arrays, and passbyref types.
17404 2004-09-21 Martin Baulig <martin@ximian.com>
17406 * domain.c (mono_debugger_check_runtime_version): New public
17409 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
17411 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
17413 * reflection.c: Added missing sort to the declarative security
17414 attributes table. MS implementation stops seeing the attributes if the
17415 token number regress in the table (as shown by ildasm and permview).
17417 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
17419 * object-internals.h (MonoReflectionModule): Add 'token' field.
17421 * reflection.c (mono_reflection_get_token): Add support for Module
17423 (mono_module_get_object): Set 'token' field.
17424 (mono_module_file_get_object): Set 'token' field.
17426 * icall.c: Add new Assembly and Module icalls.
17428 * appdomain.c: Bump corlib version.
17430 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
17432 * loader.h loader.c class.h class.c: Add helper functions for obtaining
17433 tokens of metadata objects.
17435 * reflection.h reflection.c (mono_reflection_get_token): New function
17436 to obtain the token of a metadata object.
17438 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
17440 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
17442 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
17444 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
17446 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
17448 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
17449 * object-internals.h: Added 3 MonoArray* members to MonoReflection
17450 AssemblyBuilder to access the permissions set in the class lib.
17451 * reflection.c: Added security attributes encoding step in
17452 mono_image_build_metadata.
17453 * tabledefs.h: Added new security actions defined in 2.0:
17454 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
17456 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
17458 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
17461 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
17463 * locales.c: nullify the ICU_collator member of CompareInfo when it is
17464 finalized. There where random SIGSEVs at program termination, when
17465 an object being finalized was trying to do a string comparison and
17466 the current culture was already finalized.
17468 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17470 * threads.c: call thread_cleanup before finishing the thread if we get
17473 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
17475 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
17476 assemblies from the parent. Fixes #65665.
17478 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
17480 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
17483 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
17485 * reflection.h: add prototype for mono_get_dbnull_object
17486 * reflection.c: add prototypes for get_default_param_value_blobs
17487 and mono_get_object_from_blob for fussier compilers
17489 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
17491 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
17492 false deadlock checks in class initialization.
17494 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
17496 * image.c (mono_image_addref): Fix comment.
17498 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
17501 2004-09-12 Jambunathan K <kjambunathan@novell.com>
17503 * reflection.c (mono_param_get_objects): Modified to return
17504 ParameterInfo.DefaultValue object.
17506 (get_default_param_value_blobs):
17507 (mono_get_object_from_blob):
17508 (mono_get_dbnull_object): New helper routines.
17510 * object.c (mono_get_constant_value_from_blob): New helper routine
17511 carved out from get_default_field_value ()
17513 * object-internals.h (mono_get_constant_value_from_blob): Added
17514 function declaration.
17516 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
17518 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
17519 referenced assemblies. Fixes #62135.
17521 * exception.h exception.c (mono_get_exception_file_not_found2): New
17524 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
17526 * class.h class.c: Add mono_type_get_underlying_type ().
17528 2004-09-09 Geoff Norton <gnorton@customerndna.com>
17530 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
17531 Fix GetTypes() to support dynamically created assemblies.
17533 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
17535 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
17537 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
17540 * reflection.h reflection.c loader.c: Allow dynamic construction of
17541 pinvoke methods. Fixes #65571.
17543 * reflection.c (mono_reflection_get_type): Revert previous change since
17544 it causes regressions.
17546 2004-09-08 Martin Baulig <martin@ximian.com>
17548 * class.c (class_compute_field_layout): Don't call
17549 mono_class_layout_fields() for open generic instances.
17551 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
17552 * threads.c appdomain.c: fix typo in GC macro
17554 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17556 * threads.c: don't call mono_thread_detach() in start_wrapper(),
17557 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
17559 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
17561 * image.c (mono_image_close): Applied patch from
17562 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
17563 assembly is loaded multiple times from data.
17565 * image.c (mono_image_open): Fix warning.
17567 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
17569 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
17570 once. Fixes #58334.
17572 * reflection.c (mono_reflection_create_runtime_class): Initialize
17573 klass->nested_classes. Fixes #61224.
17575 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
17577 * threads.c: sched_yield() on exit, to allow threads to quit.
17579 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
17581 * object.c (mono_unhandled_exception): Remove leftover debug code.
17583 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
17585 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
17587 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
17589 * marshal.c (emit_marshal_array): Really null terminate string arrays.
17591 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
17593 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
17595 * marshal.c (emit_marshal_array): Null terminate string arrays.
17597 * marshal.c (raise_auto_layout_exception): Fix warning.
17599 * reflection.c (mono_param_get_objects): Initialize the default value
17600 with DBNull.Value, not null. Fixes #62123.
17602 2004-09-01 Miguel de Icaza <miguel@ximian.com>
17604 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
17605 throw an exception with a cute explanation.
17607 2004-09-06 Dick Porter <dick@ximian.com>
17609 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
17610 Close the new process's thread handle, as we don't use it. The
17611 handle stays around forever otherwise.
17613 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
17615 * object.c (arith_overflow): Fix warning.
17617 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
17618 calling conventions in method refs. Fixes #65352.
17620 * reflection.c: Fix warnings.
17622 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
17624 * icall.c: Add a new icall for Array.Clear
17626 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
17628 * object.c: When allocating an array, we have to throw
17629 an overflow exception if any of the lengths are < 0.
17631 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
17633 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
17634 properly. Also move implementation of string array marshalling to
17635 managed code. Fixes #42316.
17637 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17639 * assembly.c: provide more information when loading an assembly fails.
17641 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17643 * filewatcher.c: don't expect the development fam package to be
17646 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
17648 * marshal.c: Make a copy of the signature cookie since it will be
17649 freed by the caller.
17651 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
17653 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
17655 * metadata.c (mono_metadata_free_marshal_spec): New function to free
17658 * marshal.c: More refactoring.
17660 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
17663 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
17665 * object.c: In mono_message_invoke, fill the output parameter array after
17666 calling the managed method (it was done before the call). This fixes
17669 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
17671 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
17674 2004-09-02 Martin Baulig <martin@ximian.com>
17676 * class.c (mono_class_instance_size): Don't allow generic type
17677 definitions or open generic instances.
17678 (mono_class_array_element_size): If we're a value type, call
17679 mono_class_instance_size() on the original class.
17681 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
17682 handle generic instances.
17684 * mono-debug-debugger.c (write_type): Handle generic instances
17687 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
17689 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
17690 the allocation request fails. Fixes #65089.
17692 * object.c (mono_runtime_free_method): Do not call mono_free_method.
17694 * object.c (mono_runtime_free_method): New function to free a dynamic
17697 * marshal.c (mono_delegate_free_ftnptr): New function to free the
17698 delegate trampoline.
17700 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
17701 with hasthis as dynamic,
17703 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
17705 * domain.c (mono_jit_info_table_remove): New function to remove an
17706 entry from the jit info table.
17708 * class-internals.h (MonoMethod): Add 'dynamic' field.
17710 * loader.c: Fix warnings.
17712 2004-09-01 Martin Baulig <martin@ximian.com>
17714 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
17715 instead of mono_debugger_lock() because the latter one is a no-op
17716 unless running in the debugger.
17718 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
17720 * class.c (class_compute_field_layout): Classes with auto-layout or
17721 reference fields are not blittable.
17723 2004-09-01 Dick Porter <dick@ximian.com>
17725 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
17726 mono_image_get_filename() to get the assembly location.
17729 * metadata.h: Fix compile warnings
17731 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
17733 * class.c (class_compute_field_layout): System.Object is blittable.
17735 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
17736 as in/out. Fixes #59909.
17738 2004-09-01 Martin Baulig <martin@ximian.com>
17740 * metadata.h (MONO_TYPE_ISREFERENCE): Call
17741 mono_metadata_generic_inst_is_valuetype() if we're a generic
17742 instance to check whether our underlying type is a reference type.
17744 2004-09-01 Martin Baulig <martin@ximian.com>
17746 * metadata.c (mono_type_size): If we're a generic instance, call
17747 mono_class_value_size() for value types.
17749 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
17751 * marshal.c: Implement more custom marshalling functionality. Fixes
17754 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17756 * mono-debug.c, debug-mono-symfile.c: add some locking love.
17758 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
17760 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
17762 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
17764 * icall.c: Fix some warnings.
17766 * threads.c (abort_appdomain_thread): Fix unref errors.
17767 (mono_thread_current): Fix THREAD_DEBUG define.
17769 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
17771 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
17773 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
17775 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
17777 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
17780 2004-08-28 Martin Baulig <martin@ximian.com>
17783 (mono_metadata_generic_inst_is_valuetype): New public function.
17785 * metadata.h (MONO_TYPE_ISSTRUCT): Call
17786 mono_metadata_generic_inst_is_valuetype() if we're a generic
17787 instance to check whether our underlying type is a valuetype.
17789 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
17791 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
17794 2004-08-25 Martin Baulig <martin@ximian.com>
17796 * loader.c (mono_get_method_from_token): Abstract methods can also
17797 be generic and thus have type parameters.
17799 * metadata-internals.h
17800 (MonoDynamicImage): Added `GPtrArray *gen_params'.
17802 * reflection.c (mono_image_get_generic_param_info): Don't create a
17803 metadata row, just add an entry to the `gen_params' array.
17804 (build_compressed_metadata): Sort the `gen_params' array and then
17805 actually create the metadata.
17807 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17809 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
17811 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
17813 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
17815 2004-08-24 Martin Baulig <martin@ximian.com>
17817 * class.cs (mono_class_is_subclass_of): Like an interface, a
17818 generic instance also derives from System.Object.
17820 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
17822 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
17823 custom modifiers to be in any order. Fixes #61990.
17825 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
17827 * object.c: Register mono_object_new_fast icall.
17829 * object.c (mono_class_get_allocation_ftn): Return to calling
17830 mono_object_new_fast, since it seems faster to compute the object
17831 size in unmanaged code than passing it as a parameter.
17833 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
17835 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
17836 this function with Boehm as the oom handler, so we don't have to check
17837 the result of GC_malloc.
17839 * object.c: Remove checks for oom.
17841 * object.h object.c (mono_class_get_allocation_ftn): New function to
17842 return the icall which can be used to allocate an instance of a given
17845 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
17847 * class-internals.h: Add 'enabled' field.
17849 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
17851 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
17853 2004-08-18 Jambunathan K <kjambunathan@novell.com>
17854 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
17857 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
17859 * appdomain.c: use the Tls function for appdomain too,
17860 at Zoltan's request. Actually return in mono_context_get
17862 * appdomain.c, profiler.c, threads.c: use __thread
17864 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
17866 * appdomain.c threads.c: Call GC_CreateThread on windows.
17868 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
17869 multiple libraries since this don't work on windows.
17871 2004-08-18 Martin Baulig <martin@ximian.com>
17873 * class-internals.h
17874 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
17877 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
17878 MonoMethodNormal since we also need it for abstract and interface
17882 (build_compressed_metadata): Sort the GenericParam table.
17883 (mono_image_create_token): Added `gboolean create_methodspec'
17884 argument; this is false when generating a MethodImpl token.
17885 (reflection_methodbuilder_to_mono_method): Abstract and interface
17886 methods may also have generic parameters.
17888 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
17890 * appdomain.c: thread local alloc
17892 2004-08-17 Martin Baulig <martin@ximian.com>
17894 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
17897 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
17900 * class.c (mono_type_get_full_name): New public function.
17901 (mono_type_get_name): Don't include the type arguments.
17903 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
17905 * Makefile.am: Build static versions of libmetadata and libmonoruntime
17906 for inclusion into the mono executable.
17908 2004-08-16 Martin Baulig <martin@ximian.com>
17910 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
17911 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
17913 2004-08-14 Martin Baulig <martin@ximian.com>
17915 * class.c (dup_type): Also copy the `byref' field.
17917 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
17919 * reflection.c (create_dynamic_mono_image): Revert the last change
17920 since it breaks bootstrap.
17922 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
17924 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
17926 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
17927 not free them with g_free.
17929 2004-08-11 Martin Baulig <martin@ximian.com>
17931 * reflection.c (mono_reflection_setup_internal_class): Also call
17932 mono_class_setup_mono_type() if we already have a `tb->type.type'.
17934 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
17936 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
17937 called during default (first) AppDomain creation. Keep track of
17938 Evidence when loading assemblies.
17940 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
17942 * opcodes.c, opcodes.h: reduce runtime relocations.
17944 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
17946 * culture-info.h, locales.c: fixes and chages to sue the new
17947 optimized format of the locale data.
17948 * culture-info-tables.h: regenerated.
17950 2004-08-06 Geoff Norton <gnorton@customerdna.com>
17952 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
17954 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
17956 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
17957 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
17958 * domain-internals.h: icall declaration.
17959 * icall.c: icall registration.
17960 * object-internals.h: New fields in MonoAssembly for CAS.
17962 2004-08-05 Duncan Mak <duncan@ximian.com>
17964 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
17967 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
17969 * reflection.c: fix to deal with object[] arrays in custom ctors
17972 2004-08-05 Martin Baulig <martin@ximian.com>
17974 * class.c (mono_class_array_element_size): Added support for
17975 generic instances and correctly handle "recursive" types.
17977 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
17979 * assembly.c: Fix warnings.
17981 2004-08-04 Martin Baulig <martin@ximian.com>
17984 (mono_type_get_name_recurse): Added `gboolean include_arity'
17985 argument specifying whether or not we should include the generic
17986 arity in the type name.
17987 (_mono_type_get_name): New static function.
17988 (mono_class_setup_vtable): If we're a generic instance, don't
17989 include the generic arity in the names of explicit method
17992 2004-08-03 Martin Baulig <martin@ximian.com>
17994 * class.c (mono_type_get_name_recurse): Enclose the generic type
17995 arguments in `<', '>'.
17997 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
17999 * gc.c: make GC warning messages use the trace API, they are just
18000 noise to most of the users.
18002 2004-08-03 Martin Baulig <martin@ximian.com>
18004 * debug-mono-symfile.c (read_string): Correctly read the string.
18006 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
18008 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
18010 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
18012 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
18014 2004-07-30 Martin Baulig <martin@ximian.com>
18016 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
18017 Reflect latest symbol writer changes.
18019 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
18021 * object.c: always create an object if null is passed
18022 to Invoke() where a valuetype is expected.
18024 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
18026 * marshal.c (mono_marshal_init): make managed
18027 signatures match native ones better for 64bits.
18029 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18031 * appdomain.c: hack to build correctly the private bin path on windows.
18034 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
18036 * assembly.c: Load mscorlib from the correct framework directory
18037 (mono/<version>/mscorlib.dll).
18038 * appdomain.h: Added prototypes for new functions.
18039 * internals.h: Added some prototypes.
18040 * domain.c: When initializing the runtime, get from the executable and
18041 the configuration files the runtime version that the app supports.
18042 Added support methods for reading app.exe.config. Added list of versions
18043 supported by the JIT. Added two new methods: mono_init_from_assembly,
18044 which initializes the runtime and determines the required version from
18045 the provided exe file, and mono_init_version, which initializes
18046 the runtime using the provided version.
18047 * icall.c: Get machine.config from version-specific directory.
18048 * reflection.c: When generating an image, embed the version number
18049 of the current runtime.
18051 2004-07-28 Dick Porter <dick@ximian.com>
18054 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
18055 returned sockaddr size before creating the remote address object.
18056 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
18059 2004-07-28 Dick Porter <dick@ximian.com>
18061 * locales.c (string_invariant_compare_char): Fix invariant char
18062 compares between upper and lower cases. Fixes bug 61458.
18064 2004-07-27 Ben Maurer <bmaurer@ximain.com>
18066 * marshal.c: actually cache stelem.ref wrappers.
18068 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18070 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
18071 sections and remove the mono_cli_rva_map () function.
18073 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
18075 * debug-mono-symfile.c: fix one more endianess issue, from a patch
18076 by Geoff Norton (<gnorton@customerdna.com>).
18078 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
18080 * class.c: fix class loads for pointer types (typeof(int) !=
18083 2004-07-27 Martin Baulig <martin@ximian.com>
18085 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
18086 reading the debugging information from an external ".mdb" file.
18088 2004-07-24 Martin Baulig <martin@ximian.com>
18090 * reflection.c (mono_image_get_type_info): Only write a class
18091 layout entry if we actually have a size or a packing size.
18093 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
18095 * reflection.c (type_get_fully_qualified_name):
18096 insert cast to get type checking of ?: with non-gcc compilers
18098 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
18100 * rand.c: use g_getenv for both lookups of
18103 2004-07-17 Martin Baulig <martin@ximian.com>
18105 * reflection.c (mono_reflection_bind_generic_method_parameters):
18106 Set `gmethod->reflection_info'.
18108 2004-07-17 Martin Baulig <martin@ximian.com>
18110 * class.c (mono_class_create_from_typedef): Insert the newly
18111 created class into the hash table before computing the interfaces
18112 since we could be called recursively.
18114 2004-07-16 Ben Maurer <bmaurer@ximain.com>
18116 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
18117 function to implement stelem.ref in managed code
18118 * class-internals.h, debug-helpers.c: a new wrapper type
18121 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
18123 * gc.c: allow GC handles to work even when no GC is compiled in.
18124 Fix part of bug #61134 (GetAddrOfPinnedObject).
18126 2004-07-13 Peter Williams <peter@newton.cx>
18128 * process.c (complete_path): Make sure we don't attempt to execute
18131 2004-07-12 Geoff Norton <gnorton@customerdna.com>
18133 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
18134 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
18135 and will add/subtract the hour if needed
18137 2004-07-12 Martin Baulig <martin@ximian.com>
18139 * reflection.c (mono_field_get_object): If we have
18140 `field->generic_info', take the attributes from
18141 `field->generic_info->generic_type'.
18143 2004-07-12 Martin Baulig <martin@ximian.com>
18145 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
18146 This function must be called before initializing the runtime.
18147 (mono_debug_init_1): New function; call this after initializing
18148 the runtime, but before loading the assembly. It tells the
18149 debugger to load corlib and the builtin types.
18151 * mono-debug-debugger.c: Did some larger changes in the debugging
18152 code; support recursive class declarations, make sure we actually
18155 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18157 * debug-helpers.c: undo my previous patch and fixed the real issue in
18158 ../mini/exceptions-x86.c
18160 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18162 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
18163 when no HOME env. variable was set and a NullRef was thrown in a .cctor
18164 called from other .cctors.
18166 2004-07-09 Miguel de Icaza <miguel@ximian.com>
18168 * loader.c: Removed the mono_loader_wine_init hack now that we are
18169 doing a managed version of Windows.Forms.
18171 2004-07-09 Ben Maurer <bmaurer@ximian.com>
18173 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
18174 threadpool.c, threads.c: remove static data from rootset.
18176 2004-07-09 Dick Porter <dick@ximian.com>
18178 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
18179 Don't do any more processing if the matched length was 0. It was
18180 increasing the size of the string before. Fixes bug 61167.
18182 2004-07-09 Dick Porter <dick@ximian.com>
18186 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
18187 Add support for SO_PEERCRED if its available.
18189 2004-07-09 Peter Bartok <pbartok@novell.com>
18190 * loader.c: winelib.exe.so error message is now only displayed if
18191 MONO_DEBUG is set. To help us avoid questions when people are trying
18192 out the new Managed.Windows.Forms.
18194 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
18196 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
18197 for isinst and castclass wrappers.
18199 * class-internals.h icall.c: Move registration and lookup of JIT icalls
18200 to libmetadata from the JIT, so they could be used by the marshalling
18201 code and the interpreter.
18203 * marshal.c: Register marshalling related JIT icalls here instead of
18204 in mini.c. Use CEE_MONO_ICALL instead of the family of
18205 CEE_MONO_PROC<x> opcodes to call marshalling functions.
18207 * metadata.h: Remove unneeded marshalling conversions.
18209 * opcodes.c: Update for new opcodes.
18211 2004-07-08 Martin Baulig <martin@ximian.com>
18213 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
18214 (mono_debug_get_domain_data): Make this function static.
18216 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
18218 * gc.c, object.h: add nice GC handle API for embedders.
18220 2004-07-06 Ben Maurer <bmaurer@ximian.com>
18222 * reflection.c: more changes for the new api
18224 * object.c: When we reflect on a field w/ a constant value, it
18225 will not have a memory location, so we must access metadata. Also,
18226 allow easier reading of strings so that we can read them from
18229 * class.c (mono_class_layout_fields): no need for literal fields here.
18231 * class-internals.h: api changes for const fields
18233 * icall.c (ves_icall_get_enum_info): use new apis for const fields
18235 2004-07-06 Martin Baulig <martin@ximian.com>
18237 * mono-debug.h: Increment version number to 44.
18239 * mono-debug.c (mono_debug_add_wrapper): The second argument is
18240 now a gpointer, rewrote this whole method.
18242 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
18243 function. Add information about the wrapper in a new "misc table".
18245 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
18246 for the new misc table.
18248 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
18250 * metadata-internals.h image.c: Add a cache for helper signatures.
18252 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
18254 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
18256 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
18257 delegates from a delegate. Fixes #61033.
18259 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
18260 marshalling of stringbuilder arrays. Fixes #59900.
18262 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
18264 * icall.c: Add EnumBuilder:setup_enum_type icall.
18266 2004-06-30 Ben Maurer <bmaurer@ximian.com>
18268 * icall.c: Added a new icall for the property version of
18269 OffsetOfStringData.
18271 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
18273 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
18274 it has a constant size across platforms.
18276 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
18279 2004-06-29 Martin Baulig <martin@ximian.com>
18281 * mono-debug.c (mono_debug_add_method): Protect the whole function
18282 in mono_debugger_lock(), not just parts of it.
18284 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18286 * reflection.c: make sure padding bytes in heaps are zeroed.
18288 2004-06-24 David Waite <mass@akuma.org>
18290 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
18291 image.c, loader.c, locales.c, marshal.c, metadata.c,
18292 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
18293 string-icalls.c, threads.c: change to C90-style comments from C99 /
18296 2004-06-24 Dick Porter <dick@ximian.com>
18299 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
18300 return createdNew. Fixes bug 60412.
18303 * icall.c: Add createdNew parameter to CreateMutex icall
18305 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
18307 * reflection.c, object-internals.h: save default value in params.
18309 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18311 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
18312 no need to build a new path combining that with the application base.
18315 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
18317 * reflection.c: fixed minor standard compliance issues.
18319 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
18321 * reflection.c: fixed issue with encoding some custom attributes
18322 (arrays in properties and fields, bug #60411).
18324 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18326 * reflection.c: fix start address when copying the public key token.
18328 2004-06-23 Martin Baulig <martin@ximian.com>
18330 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
18331 the `exc' object in a static object to put it into the GC's root set.
18333 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
18335 * reflection.c: make mono_reflection_setup_internal_class ()
18336 callable a second time to setup a new parent class.
18338 2004-06-23 Dick Porter <dick@ximian.com>
18340 * threads.c: Check for WAIT_IO_COMPLETION return values.
18342 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
18344 * appdomain.c: Removed the g_free on the public key token. Now copy
18345 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
18346 * assembly.c: Added public key token string value when loading
18347 assemblies. Fix bug #60439.
18348 * icall.c: Added missing informations (like public key) in
18349 GetReferencedAssemblies. Fix #60519.
18350 * image.h: Changed definition for public key token from const char*
18351 public_tok_value to guchar public_key_token [17];
18352 * reflection.c: Updated for changes to public key token.
18354 2004-06-22 Lluis Sanchez Gual
18356 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
18357 for the field in base classes.
18359 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
18361 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
18362 mark headers as not supported, they are installed only for use by the
18365 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
18367 * *.c, *.h: avoid namespace pollution in public headers.
18369 2004-06-21 Martin Baulig <martin@ximian.com>
18371 * exception.c (mono_get_exception_security): It's in
18372 "System.Security", not in "System".
18374 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
18375 the exception classes.
18377 2004-06-21 Martin Baulig <martin@ximian.com>
18379 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
18380 Protect the exception object from being finalized.
18382 2004-06-21 Martin Baulig <martin@ximian.com>
18384 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
18387 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
18389 * reflection.c: Load the assembly in mono_reflection_type_from_name,
18390 if it was not loaded before. Fix parts of #60439.
18392 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
18394 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
18395 code that was broken since Ben's change: wrappers are now
18396 dependent on the method signature only again.
18398 2004-06-21 Martin Baulig <martin@ximian.com>
18400 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
18401 added interface support.
18403 2004-06-21 Martin Baulig <martin@ximian.com>
18405 * class.c (mono_vtable_get_static_field_data): New public method.
18407 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
18409 * filewatcher.c : Windows build fix to be compliant with API changes.
18411 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
18413 * class.h, class.c: more accessors.
18414 * metadata.h, metadata.c: prepare for hiding MonoType and
18415 MonoMethodSignature: people should use the accessors from now on
18416 outside of the tree.
18418 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
18420 * *.c, *.h: more API cleanups.
18422 2004-06-18 Jackson Harper <jackson@ximian.com>
18424 * assembly.c: Trace loading assemblies.
18425 * loader.c: Trace loading native libraries.
18426 * mono-config.c: Trace loading config files.
18428 2004-06-18 Dick Porter <dick@ximian.com>
18430 * locales.c: Tell ICU the lengths of strings, it can cope with
18431 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
18433 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
18435 * image.c: swapped name/filename;
18437 2004-06-18 Martin Baulig <martin@ximian.com>
18439 * mono-debug-debugger.c (write_class): Write the parent class at
18440 the end of the header.
18442 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
18444 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
18446 2004-06-17 Raja R Harinath <rharinath@novell.com>
18448 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
18449 (bundle_obj): New conditional define.
18450 (BUILT_SOURCES): Remove.
18451 ($(bundle_srcs)): Make parallel-make safe.
18452 (libmonoruntime_la_LIBADD): Make unconditional.
18453 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
18454 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
18456 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
18458 * culture-info-tables.h: It was inconsistent with the latest
18461 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
18463 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
18466 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
18469 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
18471 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
18472 cleaned up public header threads.h.
18474 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
18476 * Makefile.am, *.c, *.h: more API cleanups.
18478 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18480 * Makefile.am: removed monosn from compilation.
18481 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
18482 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
18483 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
18484 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
18485 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
18486 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
18488 2004-06-15 Jackson Harper <jackson@ximian.com>
18490 * assembly.c: Make locales lower case when searching the GAC for
18491 assemblies. gacutil will always make locales lowercase when
18492 installing so this effectively makes them case insensitive.
18494 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
18496 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
18497 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
18498 parameter which allows to choose whether the wait can be interrupted or
18499 not. Also added the method mono_monitor_enter(), which locks the monitor
18500 using an infinite wait and without allowing interruption.
18501 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
18503 * object.h: Added new fields in MonoThread. suspend_event holds the event
18504 used to susped/resume the thread. synch_lock is the lock object to use for
18505 modifying the thread state.
18506 * threads.c: Use the new synch_lock object for locking, instead of "this",
18507 which can generate deadlocks.
18508 Moved thread state change in Thread.Sleep and Thread.Join from managed
18509 to unmanaged code. This avoids a deadlock when the thread was suspended
18510 just after acquiring the thread lock.
18511 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
18512 Implemented Thread.Suspend using an event instead of ThreadSuspend,
18513 which is not fully implemented in the io-layer.
18514 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
18516 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
18518 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
18519 threads-types.h: more API cleanups.
18521 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
18523 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
18524 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
18525 threadpool.c, threads.c: first pass at the exported API cleanup.
18527 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18529 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
18531 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18533 * icall.c: added internalGetHome.
18535 2004-06-14 Dick Porter <dick@ximian.com>
18537 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
18538 possible to return successfully when '.' or '..' were the only
18539 entries in a directory, but were skipped. The MonoIOStat was not
18540 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
18543 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18545 * reflection.c: make binaries run on .Net 1.1 by default.
18547 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
18549 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
18551 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
18553 * marshal.c: keep track of struct size with explicit layout
18556 2004-06-12 Martin Baulig <martin@ximian.com>
18558 * mono-debug-debugger.c: Comment out a debugging g_message().
18560 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
18562 * reflection.c, reflection.h: do not free custom attrs that are cached.
18563 * icall.c: use braces to make code clearer.
18565 2004-06-11 Martin Baulig <martin@ximian.com>
18567 * class.h (MonoInflatedField): New type.
18568 (MonoClassField): Replaced `MonoType *generic_type' with
18569 `MonoInflatedField *generic_info'.
18572 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
18574 2004-06-11 Martin Baulig <martin@ximian.com>
18576 * reflection.c (mono_image_create_method_token): Correctly encode
18579 2004-06-11 Martin Baulig <martin@ximian.com>
18581 * metadata.c (mono_metadata_parse_method_signature): When parsing
18582 a MethodDef which has VarArgs, also set sentinelpos if we don't
18583 have any parameters.
18585 2004-06-11 Martin Baulig <martin@ximian.com>
18587 * verify.c (mono_method_verify): In CEE_CALL, use
18588 mono_method_get_signature() to get the method's signature, unless
18589 we're a PInvoke method.
18591 2004-06-10 Jackson Harper <jackson@ximian.com>
18593 * assembly.c: Use <path>/lib/mono/gac for the extra paths
18594 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
18595 logical name as the supplied path is just a prefix to the gac not
18596 the direct path to it.
18598 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
18600 * reflection.c: make the token for a created method match
18601 the token of the MethodBuilder it was created from
18602 (IKVM requires this behaviour now).
18604 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
18606 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
18607 reflection.c, socket-io.c: leak fixes.
18609 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
18611 * icall.c: handle sentinel pos in vararg methods in position different
18614 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18616 * culture-info-tables.h: freshly generated.
18618 2004-06-09 Martin Baulig <martin@ximian.com>
18620 * loader.c (mono_get_method_constrained): Call `mono_class_init
18621 (constrained_class)'.
18623 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
18625 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
18626 any methods. Fixes #59629.
18628 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
18630 * culture-info-tables.h: reflecting locale-builder updates.
18632 2004-06-08 Dick Porter <dick@ximian.com>
18635 * locales.c: Fixed compile warnings, including a real bug in
18636 CompareInfo_internal_compare.
18638 2004-06-08 Dick Porter <dick@ximian.com>
18641 (ves_icall_System_Globalization_CompareInfo_internal_index):
18642 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
18643 Double-check the resuls of usearches, because ICU currently
18644 ignores most of the collator settings here. Fixes bug 59720.
18646 2004-06-08 Dick Porter <dick@ximian.com>
18649 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
18650 Fix memory leak and segfault-causing typo. No idea how this one
18651 lasted so long without being noticed.
18653 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
18655 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
18656 any methods. Fixes #59629.
18658 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18661 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
18662 own the critical section before). Removed dead code (that's done
18663 in the preload hook).
18665 (mono_assembly_load_with_partial_name): call the preload hook.
18667 2004-06-08 Martin Baulig <martin@ximian.com>
18669 * metadata.c (mono_metadata_signature_alloc): Default
18670 `sentinelpos' to -1.
18672 * reflection.c (mono_image_get_array_token): Likewise.
18674 2004-06-08 Martin Baulig <martin@ximian.com>
18676 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
18678 * metadata.c (mono_metadata_parse_method_signature): When parsing
18679 a MethodDef which has VarArgs, set sentinelpos.
18681 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
18682 `gint16' since we're using -1 for non-varargs methods.
18685 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
18686 (method_encode_signature): Added varargs support.
18687 (method_builder_encode_signature): Likewise.
18688 (mono_image_get_varargs_method_token): New static method.
18689 (mono_image_create_method_token): New public method; this is
18690 called via an icall instead of mono_image_create_token() when
18691 calling a varargs method.
18693 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
18695 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
18697 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
18699 * culture-info-tables.h : Reflecting the latest locale-builder that
18700 fixed empty array representation ({} to {0}).
18702 2004-06-07 Jackson Harper <jackson@ximian.com>
18704 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
18705 looking up extra gac paths. This allows MONO_GAC_PATH to act
18706 exactly like a prefix.
18708 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
18710 * reflection.c (mono_reflection_type_from_name): Make a copy of the
18711 type name before modifying it. Fixes #59405.
18713 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
18715 * culture-info.h: added fields for "all datetime patterns".
18716 * locales.c: ( ves_icall_System_Globalization_CultureInfo
18717 _construct_datetime_format ()): fill xxx_patterns fields.
18718 * object.h: added fields for "all datetime patterns" to
18719 MonoDateTimeFormatInfo.
18720 * culture-info-tables.h: reflecting locale-builder updates.
18722 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
18724 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
18725 the event has no add and remove methods. Fixes #59629.
18727 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
18729 * object.c: Fixed possible integer overflow when allocating large
18732 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
18734 * culture-info-tables.h: reflecting locale-builder updates.
18736 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
18738 * culture-info-tables.h: reflecting locale-builder updates.
18740 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
18742 * culture-info-tables.h: reflecting locale-builder updates.
18744 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
18746 * threads.c: Made Thread.Sleep abortable.
18748 2004-06-02 Martin Baulig <martin@ximian.com>
18750 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
18752 * debug-mono-symfile.h: Bumped symbol file version number to 37.
18754 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
18756 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
18758 2004-05-30 Jackson Harper <jackson@ximian.com>
18760 * reflection.c: Do not hardcode assembly versions or public key
18761 tokens anymore. All of this except the corlib section was dead
18764 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
18766 * object.c (mono_runtime_invoke_array): Automatically create boxed
18767 objects for byref valuetypes if needed. Fixes #59300.
18769 * object.c (mono_method_return_message_restore): Handle
18770 MONO_TYPE_OBJECT as well.
18772 2004-05-28 Jackson Harper <jackson@ximian.com>
18774 * reflection.c: The modified type encoding was causing build
18775 problems. Reverted for now.
18777 2004-05-28 Jackson Harper <jackson@ximian.com>
18779 * reflection.c/h: Take an assembly ref so that we dont create
18780 fully qualified names when encoding types in the same assembly as
18781 the custom attribute being emitted.
18782 * appdomain.c: Increment version number.
18784 2004-05-26 Duncan Mak <duncan@ximian.com>
18787 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
18788 Set the full version number (major, minor, build, revision).
18790 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
18792 * marshal.c (emit_struct_conv): increment src/dst after blit
18793 (mono_marshal_get_managed_wrapper,
18794 mono_marshal_get_native_wrapper): make sure we have marshalling
18795 info before marshalling params (info computation affects
18798 * class.c (class_compute_field_layout): correctly deal with
18800 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
18801 value types (as per what windows dows by default)
18802 (mono_class_setup_mono_type): System.ValueType is blittable
18803 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
18806 * marshal.c (mono_marshal_load_type_info): flag types as
18807 non-blittable if the native layout doesn't match the managed
18810 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18812 * appdomain.c: don't add stuff in the private search path that is
18813 above the application base. If application base is not set, there's
18814 no private search path.
18816 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
18818 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
18819 byref struct arguments in native->managed marshalling.
18821 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
18823 * marshal.c (mono_marshal_get_runtime_invoke): correctly
18824 cache methods using signature (special case for methods
18825 that are value type or string class)
18827 * image.c (mono_image_close): clean up allocated GSList's
18828 in runtime_invoke_cache.
18830 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18832 * mono-config.c: set the correct path for mono_cfg_dir on windows when
18833 there's no MONO_CFG_DIR environment variable defined.
18835 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18837 * threads.c: windows version must be >= 0x0500 to include OpenThread.
18839 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
18841 * threadpool.c: Really wait for 500ms after the async call, even if the wait
18843 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
18844 before waiting for it, and call CloseHandle after the wait to unref it.
18845 This will make sure that handles are not disposed too early.
18847 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18852 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
18855 * object.c: se the application_base only for the domain that runs
18856 Main. Fixes bug #59216,
18858 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18861 * object.c: only the domain in which Main is run have
18862 SetupInformation.ConfigurationFile set, so moved a few lines from
18863 appdomain.c to object.c.
18865 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18867 * appdomain.c: we tried to load [name].(dll|exe), but according
18868 to bug #57710, we must also try [culture]/[name].(dll|exe) and
18869 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
18870 There's a test case attached to bug #58922.
18872 2004-05-27 Dick Porter <dick@ximian.com>
18875 * file-io.c: Implemented icalls for locking and unlocking regions
18877 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
18878 FALSE on error (fixes both compiler warning and real bug.)
18880 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
18882 * culture-info-tables.h: reflecting locale-builder updates.
18884 (Added missing ChangeLog entry for 05/26)
18886 2004-05-27 Jackson Harper <jackson@ximian.com>
18888 * locales.c: Fix some cut and paste errors.
18890 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18892 * mono-config.c: set the correct path for config. directory on windows.
18894 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
18896 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
18899 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
18901 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
18902 from pinvoke functions.
18904 * marshal.c (mono_ftnptr_to_delegate): Implement this.
18906 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
18908 * culture-info-tables.h: reflecting locale-builder updates.
18910 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
18912 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
18915 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
18917 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
18918 * icall.c: Modified icalls for RNG.
18919 * rand.c|h: Changed RNG interface to allow thread-safe usage under
18920 Windows (CryptoAPI).
18922 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
18924 * locales.c: Fix build.
18926 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
18928 * culture-info-tables.h: reflecting locale-builder updates.
18930 2004-05-25 Jackson Harper <jackson@ximian.com>
18932 * locales.c: When creating the current culture use the $LANGs
18933 specific culture. So DateTimeFormat and NumberFormat entries are created.
18935 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
18937 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
18938 a char array as parameter.
18940 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
18942 * image.c: In mono_image_open(), always use an absolute path name to
18943 look for already loaded images.
18945 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
18947 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
18948 missing in the windows build (like older cygwin include files).
18950 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
18952 * icall.c: Fixed check for possible integer overflow in Buffer_
18953 BlockCopy icall. Replaced comments style // by /* */.
18955 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
18957 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
18959 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
18960 check after MONO_VTADDR. Fixes pinvoke2.exe.
18962 * marshal.h marshal.c metadata.h: Add beginnings of support for
18963 ftnptr -> delegate marshalling.
18965 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
18967 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
18968 * threads.c: Fix warnings.
18970 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
18972 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
18973 * icall.c: Registered icalls for Suspend and Resume.
18974 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
18976 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
18977 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
18978 * process.c: Use WaitForSingleObjectEx.
18979 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
18981 * threads.c, threads.h: Make use of new Ex wait methods. Improved
18982 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
18983 for Suspend and Resume. Added new mono_thread_stop, used for stoping
18984 background threads. Added basic support for Abort in Windows.
18985 Start new threads using a managed delegate invoke wrapper. This wrapper
18986 has an interruption checkpoint that is needed since an interruption
18987 can be requested before the thread leaves the unmanaged code that starts
18989 * marshal.c: Added interruption checkpoint after every native call, and
18990 also before managed calls for wrappers called from unmanaged code to
18991 go into managed code.
18992 * object.h: Added new field in MonoThread to keep track of interruption
18995 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
18997 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
19000 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19007 * rand.c: getenv -> g_getenv (windows!)
19009 * process.c: complete_path is also used on non-windows platforms.
19011 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19013 * icall.c: new signature for Process_Start.
19015 * process.[ch]: new signature for Process_Start. If we're on windows
19016 and UseShellExecute is false, we have to search for the program by
19017 ourselves if we don't get a full path.
19019 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
19021 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
19022 marshalling and call CleanUpNativeData if needed. Fixes #58646.
19024 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19026 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
19029 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19031 * process.c: use double quotes to quote program name and arguments on
19032 windows. Fixes bug #58575.
19034 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19036 * file-io.c: don't return "." and ".." when using windows Find*File.
19038 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
19040 * marshal.c: Don't pass wrappers to message init because method
19041 addressed used to lookup metadata. part of remoting[2|3] fix.
19043 2004-05-15 Jackson Harper <jackson@ximian.com>
19045 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
19046 path is essentially the same as MONO_PATH except that it points to
19047 GACs instead of lib directories.
19048 * loader.h: The user gac is gone so we dont need function to
19050 * mono-config.c: user gac option is now gone.
19052 2004-05-15 Jackson Harper <jackson@ximian.com>
19054 * culture-info.h: Make defines more consistent, add calendar data
19055 to the culture info table.
19056 * culture-info-tables.h: Add basic calendar data. Basically
19057 everyone gets default gregorian until all the data is
19059 * locales.c: Use the new consistent defines. Set calendar data for
19060 culture info objects.
19061 * object.h: add a field for calendar data to CultureInfo
19063 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
19065 * image.c: image->runtime_invoke_cache is keyed on signatures now.
19066 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
19068 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
19069 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
19070 an extra param that is the pointer of the method to invoke. The IL for
19071 the invoke method is no longer specific to the method, but to the
19072 signature of the method. Thus, we can share the same code for multiple
19073 methods. This reduces the number of methods that have to be compiled.
19075 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
19077 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
19079 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
19081 * icall.c: Optimize Buffer.BlockCopy.
19083 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19085 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
19086 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
19087 quote). Changed them to "MMMM yyyy".
19089 2004-05-12 Miguel de Icaza <miguel@ximian.com>
19092 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
19094 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
19096 * reflection.h: Updated after changes to managed structures.
19098 * appdomain.c: Bump corlib version.
19100 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19102 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
19105 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19107 * Makefile.am: link to ../os/libmonoos.la on windows.
19110 -If MONO_DEBUG, warn about non-existing directories in
19112 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
19113 compile time variable.
19114 -Removed init_default_path and call mono_set_rootdir from
19115 libmonoos.a instead (windows only).
19117 * assembly.h: declare mono_assembly_getrootdir().
19120 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
19122 * loader.c: s/getenv/g_getenv/
19124 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
19126 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
19128 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
19130 * metadata.h: Add new marshalling conversions.
19132 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
19135 * reflection.c (mono_reflection_get_type): Lookup the type in all
19136 modules of a multi-module assembly. Fixes #58291.
19138 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
19140 * threads.c: Before aborting a background, set the StopRequested
19141 state. This avoids throwing the Abort exception.
19142 In mono_thread_manage, don't continue with the shutdown until all
19143 aborted threads have actually stopped.
19145 2004-05-10 Jackson Harper <jackson@ximian.com>
19147 * locales.c: Remove the modifier from culture names.
19149 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19151 * Makefile.am: monosn is not installed any more. It has been deprecated
19154 2004-05-07 Jackson Harper <jackson@ximian.com>
19157 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
19158 Fix array construction, add bailout if the length is 0.
19160 2004-05-07 Dick Porter <dick@ximian.com>
19162 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
19163 machine doesn't have a DNS entry. Patch by Urs Muff
19164 (umuff@quark.com), fixes bug 57928.
19166 2004-05-06 Jackson Harper <jackson@ximian.com>
19168 * reflection.c: Handle null PublicTokens properly. alloc mem for
19169 assembly names culture so we dont crash when freeing it.
19171 2004-05-06 Jackson Harper <jackson@ximian.com>
19173 * assembly.c: Check the usergac when loading with partial names.
19175 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
19177 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
19178 does nothing for now (not required for Linux/Windows) but the class
19179 library can call it (and a newer or modified runtime could need it).
19180 * icall.c: Registred icall.
19182 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19184 * loader.c: prints a message on module loading error we set MONO_DEBUG
19185 environment variable.
19187 2004-05-05 Jackson Harper <jackson@ximian.com>
19189 * appdomain.c: Handle PublicKeyToken=null properly.
19191 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
19193 * environment.c|h: Added icall ves_icall_System_Environment_
19194 GetOSVersionString to get the current OS version as a string.
19195 * icall.c: Registred icall.
19197 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
19199 * object.c: in mono_object_get_virtual_method(), take into account that
19200 non-virtual methods don't have a slot in the vtable. Check needed when
19201 the object is a proxy.
19203 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
19205 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
19206 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
19208 * object.c (mono_class_compute_gc_descriptor): Fix warning.
19210 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
19211 passed when a valuetype is expected.
19213 * object.c (mono_unhandled_exception): Only set the exit code if the
19214 exception happens in the main thread. Fixes thread5.exe.
19216 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
19217 invalid names. Fixes #58047.
19219 2004-05-03 Jackson Harper <jackson@ximian.com>
19221 * assembly.c: This line was committed accidently and is unneeded.
19223 2004-05-03 Jackson Harper <jackson@ximian.com>
19225 * icall.c: Add new icall for Assembly::LoadWithPartialName
19226 * assembly.c/.h: new function that probes the GAC to load partial
19227 assembly names by Paolo Molaro.
19229 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19231 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
19232 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
19233 (type_get_fully_qualified_name): Added PublicKeyToken when building a
19236 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19238 * appdomain.c: fixed check for 'neutral' culture and removed warning.
19239 * reflection.c: fix bug when parsing a full type name and Version is not
19240 the last thing in the string.
19242 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
19244 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
19245 crashes when it is freed.
19247 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19249 * assembly.c: print the compat warning to stderr.
19251 2004-05-01 Miguel de Icaza <miguel@ximian.com>
19253 * assembly.c (mono_assembly_load_references): Add a compatibility
19254 hack to run old applications that might be still referencing the
19255 3300-based assemblies, only do this for System.xxx.
19257 2004-05-01 Jackson Harper <jackson@ximian.com>
19259 * appdomain.c: If the culture is neutral we set it to "".
19261 2004-04-29 Jackson Harper <jackson@ximian.com>
19263 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
19265 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
19267 * string-icalls.c: added low overhead function for copying chars
19268 * icall.c: added needed icall for the above function
19270 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19272 * icall.c: fix return value of get_global_assembly_cache. Implemented
19273 Environment.GetLogicalDrives.
19275 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
19277 * rand.c: try and talk to egd or prngd
19278 for random bytes if opening devices fail.
19280 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
19282 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
19283 alignment for the type using the native alignment of its members
19284 instead of using klass->min_align.
19286 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
19288 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19291 * socket-io.c: added check for sys/aio.h.
19293 2004-04-28 Dick Porter <dick@ximian.com>
19295 * threads.c: Don't abort a thread thats already aborting, when
19296 terminating everything.
19298 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19300 * icall.c: added 2 new async calls for Socket.
19302 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
19303 IO on *nix systems.
19305 * threadpool.c: removed unused variable.
19307 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
19309 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
19311 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
19313 * locales.c: put back string_invariant_tolower () and
19314 string_invariant_toupper ().
19316 2004-04-26 David Waite <mass@akuma.org>
19321 * unicode.h: remove comma from end of enumeration declarations
19323 2004-04-26 David Waite <mass@akuma.org>
19325 * debug-mono-symfile.h:
19328 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
19331 2004-04-26 Jackson Harper <jackson@ximian.com>
19333 * appdomain.c: Increment version number.
19335 2004-04-26 Jackson Harper <jackson@ximian.com>
19337 * appdomain.c: Set assembly references public token value when
19338 PublicKeyToken is specified, not the hash_value. Free public token
19339 values when free assembly name data. Previously the public key
19340 token was hex decoded, however we are using hex encoded public key
19341 tokens, so this is not neccasary.
19342 * assembly.c: Lookup assemblies in the gac if their public token
19343 value is set. Add function to allow enabling user gac
19344 lookups. Specify whether or not the assembly was loaded from the
19345 GAC. Compare full assembly names when checking the cache for
19346 assemblies (Temporarily disabled see comment in code). Remove
19347 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
19348 specifies trace-loader they get extra info to stdout on the
19349 loading of assemblies.
19350 * image.h: Add a field for an assembly references public token
19351 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
19352 whether an assembly has been loaded from the GAC.
19353 * image.c: Remove a corlib -> mscorlib name mapping.
19354 * loader.h: Add function to enable/disable the user gac.
19355 * mono-config.c: Check if the usergac is enabled in the config
19357 * icall.c: New icall to determine whether or not an assembly has
19358 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
19359 * tabldefs.h: Add constant for assemblyref flag that specifies a
19360 full public key is used instead of a public token.
19361 * reflection.c: Remove mscorlib -> corlib mappings. Set
19362 PublicTokenValue instead of hash value. This value is a hex
19363 string so it does not need to be expanded.
19365 2004-04-26 Martin Baulig <martin@ximian.com>
19367 * mono-debug-debugger.c (mono_debugger_initialize): Set
19368 `mono_debugger_initialized' before calling mono_debug_lock().
19370 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
19372 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
19373 InternalToUpper/InternalToLower.
19374 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
19375 removed invariant culture shortcut. This is now done in managed code.
19376 * locales.c: (string_invariant_toupper/tolower) removed.
19378 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19380 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
19381 Added Poll internal call.
19383 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
19384 call for Poll. Select was too heavy for polling a single socket.
19386 * threadpool.[ch]: added mono_threadpool_cleanup.
19387 * threads.c: use it. Don't use Thread_Abort on windows.
19389 2004-04-23 Martin Baulig <martin@ximian.com>
19391 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
19393 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
19395 * icall.c: Registred new icalls for key pair protection and added an
19396 icall for Environment.GetFolderPath on Windows.
19397 * security.c|h: Added new icalls for key pair protection.
19399 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19401 * socket-io.c: don't display the non-supported family warning for known
19402 families. Now this is not displayed on windows when checking support
19405 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19407 * class.c: don't display the layout warning for static fields.
19409 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
19411 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
19412 * locales.c, locales.h: Added new icalls for culture-specific
19413 Char.ToLower and Char.ToUpper.
19415 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19417 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
19420 2004-04-20 Martin Baulig <martin@ximian.com>
19422 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
19423 of the type name before passing it to mono_reflection_type_from_name().
19425 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
19427 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
19428 encodings here. Fixes #56965.
19430 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
19432 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
19433 fix test on strstr result not that I can see anything that
19434 relies on the result.
19436 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
19438 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
19441 * marshal.c (mono_marshal_get_string_encoding): New helper function.
19443 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
19444 function to determine which marshalling to use for strings. Fixes
19447 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
19449 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
19451 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
19453 * icall.c: #include mono-config.h
19455 2004-04-15 Jackson Harper <jackson@ximian.com>
19457 * culture-info-tables.h: Fix date formats for en-US culture.
19459 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
19461 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
19462 ThreadPool.SetMinThreads.
19463 * threadpool.c: Implemented ThreadPool.GetMinThreads and
19464 ThreadPool.SetMinThreads.
19466 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19468 * mono-config.c: also load the .config file in the directory
19469 where the assembly was found.
19471 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
19473 * assembly.c: load per-assembly config files.
19474 * icall.c: decrapified code to get the config dir and moved to
19476 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
19477 per-assembly config files. When doing a dll map lookup give precedence
19478 to the per-assembly data.
19480 2004-04-14 Martin Baulig <martin@ximian.com>
19482 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
19483 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
19484 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
19486 * mono-debugger-debugger.c: While the debugger is locked, remember
19487 whether the symbol tables have changes and send one single
19488 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
19490 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
19492 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
19494 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
19497 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
19498 account when marshalling string arrays. Fixes #56965.
19500 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
19502 * icall.c: Add new icalls mapping for security.
19503 * security.c|h: Add internal calls for WindowsIdentity,
19504 WindowsImpersonationContext and WindowsPrincipal.
19506 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
19508 * class.c: Added comment to ensure the System.MonoDummy class
19509 is removed when no longer necessary
19511 2004-04-13 Miguel de Icaza <miguel@ximian.com>
19513 * appdomain.c: Pass arguments to the bootstraping exceptions to
19514 minimize JITed methods at boot
19516 * metadata.c (mono_exception_from_name_two_strings): Allow for the
19517 second string to be null.
19519 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
19520 Change the protocol to minimize the JIT methods at startup. Now
19521 it Returns the internal codepage, if the value of "int_code_page"
19522 is 1 at entry, and we can not compute a suitable code page
19523 number, returns the code page as a string.
19525 2004-04-13 Jackson Harper <jackson@ximian.com>
19527 * culture-info-tables.h: Fix number of decimal digits for all
19530 2004-04-13 Jackson Harper <jackson@ximian.com>
19532 * icall.c: Clairfy out of sync error message. It is not always
19533 your corlib that is out of sync.
19535 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
19537 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
19538 properties when only the set accessor is overriden. Fixes #55874.
19540 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
19542 * assembly.c (mono_assembly_load_references): Make this thread safe.
19545 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
19547 * monosn.c: Add missing initialization calls.
19549 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
19552 ves_icall_System_Globalization_CultureInfo_construct_number_format
19553 Fix g_assert so it compiles on fussier compilers re int/ptr
19556 2004-04-08 Dick Porter <dick@ximian.com>
19559 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
19560 53992. Also rearrange the code so that the internal calls return
19561 an error value and exceptions are thrown from managed code.
19563 * icall.c: Add type info to the socket icalls.
19565 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19567 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
19570 2004-04-07 Martin Baulig <martin@ximian.com>
19572 * class.c (mono_class_from_generic_parameter): Don't default
19573 `klass->parent' to `mono_defaults.object_type'.
19575 2004-04-07 Martin Baulig <martin@ximian.com>
19577 * reflection.c (mono_reflection_initialize_generic_parameter): Set
19578 `param->pklass->reflection_info'.
19580 2004-04-07 Jackson Harper <jackson@ximian.com>
19582 * culture-info-tables.h: Fix date separator symbol.
19584 2004-04-07 Martin Baulig <martin@ximian.com>
19586 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
19587 from System.Type to System.MonoType.
19589 2004-04-07 Martin Baulig <martin@ximian.com>
19592 (MonoReflectionGenericParam): Added `has_reference_type' and
19593 `has_value_type' fields.
19595 * reflection.c (mono_image_get_generic_param_info): Encode the
19596 correct flags if we have the `class' or `struct' constraint.
19598 2004-04-07 Martin Baulig <martin@ximian.com>
19601 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
19603 2004-04-07 Jackson Harper <jackson@ximian.com>
19605 * appdomain.c: Revert extra patches, just wanted to bump the
19608 2004-04-07 Jackson Harper <jackson@ximian.com>
19610 * Makefile.am: Add culture-info private headers.
19611 * icall.c: Add new icalls for contructing locales.
19612 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
19613 * locales.h: Declare new culture info construction methods.
19614 * object.h: Add new fields used to avoid the CultureMap to
19616 * culture-info.h: Definition of structs used in the culture info
19618 * culture-info-tables.h: Autogenerated tables that contain culture
19619 info data. This file was generated with the locale-builder tool.
19620 * appdomain.c: Incement corlib version number.
19622 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
19624 * appdomain.c: (mono_runtime_init) move mono_thread_init
19625 to before mono_object_new calls so critical sections
19626 are initialized before use.
19628 2004-04-07 Martin Baulig <martin@ximian.com>
19631 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
19632 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
19633 (ves_icall_MonoGenericParam_initialize): Removed.
19634 (monogenericparam_icalls): Removed.
19635 (generictypeparambuilder_icalls): Added new table for
19636 System.Reflection.Emit.GenericTypeParameterBuilder.
19639 (mono_reflection_define_generic_parameter): Removed.
19640 (mono_reflection_initialize_generic_parameter): This is now called
19641 from GenericTypeParameterBuilder's .ctor.
19643 2004-04-06 Martin Baulig <martin@ximian.com>
19645 * class.c (mono_class_init): Don't inflate nested classes in a
19647 (mono_type_get_name_recurse): Include the generic arguments for
19648 generic instances and generic type declarations.
19649 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
19650 (_mono_class_get_instantiation_name): Removed.
19651 (mono_class_create_generic): Always use `gklass->name' as our name.
19653 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
19655 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
19656 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
19657 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
19658 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
19659 closed generic methods here.
19662 (mono_reflection_generic_inst_get_nested_types): Removed.
19663 (inflate_mono_method): Copy the generic parameters from the
19664 MonoMethodHeader into out MonoGenericMethod.
19666 2004-04-06 Martin Baulig <martin@ximian.com>
19669 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
19671 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
19673 * reflection.c (build_compressed_metadata): If we have any entries
19674 in the GenericParam, MethodSpec or GenericParamConstraint tables,
19675 set the header version to 1.1.
19677 2004-04-06 Martin Baulig <martin@ximian.com>
19679 * class.c (mono_class_init): If we're a generic instance,
19680 initialize our nested classes, too.
19681 (_mono_class_get_instantiation_name): Deal with the new `!%d'
19684 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19686 * process.c: quote the argument passed to the shell on windows.
19688 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
19690 * threads.c (mono_alloc_special_static_data): Allow this to be
19691 called during startup.
19693 2004-04-02 Martin Baulig <martin@ximian.com>
19696 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
19698 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
19700 * icall.c: Fix build.
19702 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
19704 * Makefile.am: Added security.c|h.
19705 * icall.c: Added icall for get_UserName;
19706 * security.c: New file for security related icalls. Added function
19707 get_UserName for System.Environment (fix #56144).
19708 * security.h: New. Header file for security.c
19710 2004-04-02 Dick Porter <dick@ximian.com>
19712 * icall.c: Deleted the icalls that were obsoleted some time ago
19713 by the ICU string code, and which were mixed into the icall
19714 rearranging. Fixes bug 55969.
19717 * string-icalls.c: Deleted the code that those icalls reference.
19719 2004-04-01 Martin Baulig <martin@ximian.com>
19721 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
19723 * class.c (mono_class_from_generic_parameter): Don't set
19724 TYPE_ATTRIBUTE_INTERFACE.
19725 (my_mono_class_from_generic_parameter): Likewise.
19727 2004-04-01 Martin Baulig <martin@ximian.com>
19729 * loader.c (find_method): Added an optional `MonoClass *ic'
19730 argument to search in a specific interface.
19731 (mono_get_method_constrained): New public function.
19733 2004-04-01 Martin Baulig <martin@ximian.com>
19735 * reflection.c (mono_image_get_generic_field_token): Use the
19736 `handleref' cache here.
19738 2004-04-01 Martin Baulig <martin@ximian.com>
19740 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
19742 * reflection.c (create_generic_typespec): Use the `typespec' hash
19743 here, not the `typeref' one.
19745 2004-04-01 Martin Baulig <martin@ximian.com>
19747 * class.c (mono_class_inflate_generic_type): Moved the
19748 functionality into a new static inflate_generic_type() which
19749 returns NULL if it didn't do anything. Only increment the
19750 `mono_stats.inflated_type_count' if we actually inflated
19752 (mono_class_get_full): Check the classes type to see whether we
19753 need to inflate it; also inflate MONO_TYPE_(M)VAR.
19755 2004-04-01 Jackson Harper <jackson@ximian.com>
19757 * reflection.c: Set culture for assembly references.
19759 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
19761 * reflection.[ch], icall.[ch], Fix support for pinning variables.
19763 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19766 (do_mono_assembly_open): the critical section also covers
19767 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
19769 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19772 (mono_manage_threads): abort the background threads when finishing.
19775 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19777 * gc.c: only close the done_event handle if there was no timeout.
19780 2004-03-30 Martin Baulig <martin@ximian.com>
19782 * icall.c (icall_entries): It's called "System.Activator", not
19783 "System.Activation".
19785 2004-03-30 Martin Baulig <martin@ximian.com>
19787 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
19788 (mono_class_create_from_typespec): Likewise.
19790 2004-03-30 Martin Baulig <martin@ximian.com>
19792 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
19793 `has_ctor_constraint' and `initialized'.
19795 2004-03-30 Martin Baulig <martin@ximian.com>
19797 * reflection.c (encode_new_constraint): New static function to add
19798 the constructor constraint attribute to a type parameter.
19799 (encode_constraints): Call encode_new_constraint() if necessary.
19802 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
19804 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
19806 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
19808 * reflection.c, icall.c: add support for pinning variables.
19810 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
19812 * marshal.c (mono_marshal_get_managed_wrapper):
19813 init bool local with zero rather than null.
19815 2004-03-29 Martin Baulig <martin@ximian.com>
19817 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
19818 the "official" behavior here.
19819 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
19821 2004-03-29 Martin Baulig <martin@ximian.com>
19823 * icall.c: Reflect latest API changes.
19825 2004-03-29 Martin Baulig <martin@ximian.com>
19827 * loader.c (mono_get_method_from_token): Also call
19828 mono_metadata_load_generic_params () for abstract and interface
19829 methods; replace the type arguments in the method signature with
19830 the ones which are loaded from the metadata.
19832 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
19834 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
19835 of the lock is not the current thread. MS.NET don't do it, in spite of
19836 what the documentation says. See bug #56157.
19838 2004-03-28 Martin Baulig <martin@ximian.com>
19840 * class.c (mono_class_init): Don't call init_properties() and
19841 init_events() for generic instances; set `prop->parent' when
19842 inflating properties.
19844 * reflection.c (mono_generic_inst_get_object): Call
19845 `mono_class_init (ginst->klass)'.
19846 (mono_type_get_object): Only create a MonoGenericInst if your
19847 generic type is a TypeBuilder.
19848 (do_mono_reflection_bind_generic_parameters): Only set
19849 `ginst->is_dynamic' if our generic type is a TypeBuilder.
19851 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
19853 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
19856 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19858 * icall.c: added Kill_internal icall.
19859 * process.[ch]: added Kill_internal icall.
19861 2004-03-25 Martin Baulig <martin@ximian.com>
19863 * class.h (MonoStats): Added `generic_instance_count',
19864 `inflated_method_count', `inflated_type_count' and
19865 `generics_metadata_size'.
19867 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19869 * reflection.c: no warnings now.
19871 2004-03-25 Martin Baulig <martin@ximian.com>
19873 * class.c (mono_class_get_full): New public function; does a
19874 mono_class_get(), but also takes a `MonoGenericContext *'.
19876 * loader.c (mono_field_from_memberref): Renamed to
19877 `field_from_memberref', made static and added `MonoGenericContext *'
19879 (mono_field_from_token): Added `MonoGenericInst *' argument.
19880 (method_from_memberef): Likewise.
19881 (mono_get_method_from_token): Likewise.
19882 (mono_get_method_full): New public function; does a
19883 mono_get_method(), but also takes a `MonoGenericContext *'.
19885 * verify.c (mono_method_verify): Get the method's generic context
19886 and pass it to mono_field_from_token(), mono_get_method_full() and
19887 mono_class_get_full().
19889 2004-03-25 Martin Baulig <martin@ximian.com>
19891 * class.c (mono_class_inflate_generic_type): Take a
19892 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
19893 `MonoGenericMethod *'.
19895 2004-03-25 Martin Baulig <martin@ximian.com>
19897 * loader.h (MonoMethodInflated): Store the MonoGenericContext
19898 instead of the MonoGenericMethod here.
19900 2004-03-25 Martin Baulig <martin@ximian.com>
19902 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
19903 each time we create a new MonoGenericInst, we also create a new
19904 context which points back to us.
19906 * class.c (inflate_method): Use `ginst->context' instead of
19907 creating a new context.
19909 * loader.c (method_from_memberref): Use
19910 `klass->generic_inst->context' instead of creating a new context.
19912 2004-03-25 Martin Baulig <martin@ximian.com>
19914 * class.h (MonoGenericContext): New struct.
19915 (MonoGenericMethod): Removed `generic_inst'.
19917 * class.c (mono_class_inflate_generic_method): Take a
19918 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
19920 2004-03-25 Martin Baulig <martin@ximian.com>
19922 * loader.h (MonoMethodInflated): New typedef.
19924 * metadata.h (MonoMethodSignature): Removed `gen_method', make
19925 `generic_param_count' consume just 30 bits, added `is_inflated'
19926 and `has_type_parameters' flags (one bit each).
19928 * class.c (mono_class_inflate_generic_method): Create a
19929 MonoMethodInflated instead of a MonoMethodNormal and set
19930 `is_inflated' in the method signature.
19932 * class.h (MonoGenericMethod): Removed `generic_method'.
19934 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
19936 * image.c: Make sure the name of a MonoImage is always an absolute path.
19937 This fixes bug #54415.
19939 2004-03-24 Martin Baulig <martin@ximian.com>
19941 * class.c (mono_class_setup_vtable): If we're a generic instance,
19942 use our generic type's vtable size.
19944 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
19946 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
19947 MONO_NO_UNLOAD env var as a temporary workaround for unloading
19950 2004-03-23 Martin Baulig <martin@ximian.com>
19952 * class.h (MonoDynamicGenericInst): Added `int count_events' and
19953 `MonoEvent *events'.
19955 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
19956 (typebuilder_icalls): Added "get_event_info"; calls
19957 mono_reflection_event_builder_get_event_info().
19959 * reflection.c (mono_reflection_generic_inst_initialize): Added
19960 `MonoArray *events'.
19961 (mono_reflection_event_builder_get_event_info): New function.
19963 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
19965 * object.h: add mono_type_initialization_init
19967 * object.c (mono_runtime_class_init):
19968 implement class constructor synchronization rules
19969 to cope with threading issues.
19970 add mono_type_initialization_init
19972 * appdomain.c (mono_runtime_init): call
19973 mono_type_initialization_init
19975 * class.h: removing initializing field from MonoVTable
19977 2004-03-23 Martin Baulig <martin@ximian.com>
19979 * class.c (my_mono_class_from_generic_parameter): Use
19980 `param->name' if it's not NULL.
19982 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
19984 * class.c: do not insert non-virtual methods in the vtable.
19985 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
19986 that means the method is non-virtual. This never would have
19989 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
19991 * profiler.c: Added lock for accessing coverage_hash.
19993 2004-03-22 Martin Baulig <martin@ximian.com>
19995 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
19996 `method->method->signature->generic_param_count != 0' to make it
19997 work for interface methods.
19999 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20001 * process.c: quote the string passed to the shell using g_shell_quote.
20003 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20006 (mono_threads_manage): don't remove the finalizer thread and self
20007 from the threads hash table so that mono_thread_manage can be called
20010 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20012 * process.c: quote the arguments when UseShellExecute is true. Fixes
20015 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20017 * threads.c: set mono_thread_detach as a cleanup routine for every
20018 thread. This way it's always executed upon thread termination, either
20019 aborted or finished normally. No more xsp hangs!
20021 2004-03-17 Martin Baulig <martin@ximian.com>
20023 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
20024 `int count_nested' and a `MonoType **nested'.
20026 * reflection.c (mono_reflection_bind_generic_parameters): Moved
20027 most of the functionality into a new static
20028 do_mono_reflection_bind_generic_parameters() and don't take a
20029 `MonoType *nested_in' argument any more. Don't compute nested
20031 (mono_reflection_generic_inst_get_nested_types): New public method
20032 to get nested types.
20034 * class.c (mono_class_create_generic): Set `klass->nested_in' if
20035 we're a nested class.
20037 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
20038 mono_reflection_generic_inst_get_nested_types() to compute the
20041 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
20043 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
20044 descriptive error message under windows.
20046 2004-03-17 Martin Baulig <martin@ximian.com>
20048 * class.c (dup_type): Added `const MonoType *original' argument;
20049 copy the attrs from the original type.
20051 2004-03-17 Martin Baulig <martin@ximian.com>
20053 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
20054 `m->generic_inst_cache' here.
20056 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
20058 * exception.h exception.c: Add stack_overflow_exception.
20060 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20063 (overlapped_callback): call SetEvent *after* invoking the callback.
20064 No need to call CloseHandle.
20066 2004-03-16 Martin Baulig <martin@ximian.com>
20068 * reflection.c (mono_image_get_fieldref_token): Take a
20069 `MonoReflectionField *' instead of a `MonoClassField *' and a
20070 `MonoClass *'; store the `MonoReflectionField *' in the hash.
20072 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20074 * appdomain.c: don't add the culture to the filename we're looking for
20075 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
20077 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20079 * locales.c: don't ignore symbols when doing case insensitive compares.
20080 Thanks Dick! Fixes bug #54046.
20082 * threads.c: surround 'threads' usage with enter/leave in
20083 mono_thread_manage.
20085 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
20087 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
20088 implicitly marshalled as [Out]. Fixes #55450.
20090 (mono_marshal_get_runtime_invoke): Zero out the result if there is
20093 2004-03-16 Martin Baulig <martin@ximian.com>
20095 * class.c (mono_class_from_generic_parameter): Use the actual
20098 2004-03-16 Martin Baulig <martin@ximian.com>
20100 * reflection.c (type_get_signature_size): New static function.
20101 Compues the size of the type in a method signature.
20102 (method_get_signature_size): New static function; calls
20103 type_get_signature_size() to compute the actual size of the
20104 method's signature.
20105 (method_encode_signature): Use method_get_signature_size() to get
20106 the signature's size rather than using `nparams * 10'.
20108 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20110 * file-io.h: define here WapiOverlapped on windows. I don't want the
20111 regular OVERLAPPED one.
20114 * threadpool.c: somehow, BindIoCompletionCallback is not found.
20115 Disabling AIO on windows.
20117 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20119 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
20122 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20124 * appdomain.c: upgraded corlib version.
20126 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
20127 and BeginWrite. Allow opening files for asynchrnous operations.
20129 * file-io.h: new struct that maps FileStreamAsyncResult.
20130 * icall.c: added new icalls.
20131 * process.[ch]: support setting child process environment variables
20132 and use the SHELL or COMSPEC when UseShellExecute is true.
20134 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
20135 callback for async. IO is here and also BindHandle.
20137 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
20140 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
20142 * reflection.c (create_custom_attr): Allow len == 0.
20144 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
20145 computation on big-endian machines.
20147 2004-03-13 Martin Baulig <martin@ximian.com>
20149 * class.h (MonoGenericInst): Added `int count_ifaces'.
20151 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
20152 `ginst->count_ifaces' instead `klass->interface_count' since we
20153 may get called before the vtable is created.
20155 * loader.c (mono_method_get_param_names): If we're a generic
20156 instance, return and don't initialize the class.
20158 * reflection.c (mono_reflection_setup_generic_class): Don't call
20159 ensure_runtime_vtable().
20160 (mono_reflection_bind_generic_parameters): Set
20161 `ginst->count_ifaces'.
20163 2004-03-11 Jackson Harper <jackson@ximian.com>
20167 * unicode.h: Remove unused System.Char icalls.
20169 2004-03-11 Miguel de Icaza <miguel@ximian.com>
20171 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
20172 code when we P/Invoke the first library in Windows.Forms, instead
20173 of when we first open the assembly.
20175 * assembly.c: Drop the lookup from here.
20177 2004-03-10 Martin Baulig <martin@ximian.com>
20179 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
20180 class for properties, fields and events. Finally fixes #54945.
20182 2004-03-10 Martin Baulig <martin@ximian.com>
20184 * metadata.c (mono_metadata_class_equal): New static function;
20185 checks whether two generic instances or two generic parameters are
20187 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
20190 2004-03-10 Martin Baulig <martin@ximian.com>
20192 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
20194 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
20195 argument and write it into the `reflection_info' field.
20198 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
20199 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
20201 2004-03-09 Jackson Harper <jackson@ximian.com>
20203 * char-conversions.h: use 8 bits for numeric data its all we need
20204 * icall.c: numeric data is only 8 bits now.
20206 2004-03-09 Martin Baulig <martin@ximian.com>
20208 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
20210 * class.c (init_properties, init_events): Initialize the new
20213 * reflection.c (typebuilder_setup_properties): Likewise.
20214 (typebuilder_setup_events): Likewise.
20216 * reflection.h (MonoEventInfo): Replaced `parent with
20217 `declaring_type' and `reflected_type'.
20219 * icall.c (ves_icall_get_property_info): Distinguish between
20220 declaring and reflected type.
20221 (ves_icall_get_event_info): Likewise.
20223 2004-03-09 Martin Baulig <martin@ximian.com>
20225 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
20226 (ves_icall_Type_GetField): Correctly set field->klass.
20228 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
20230 * loader.h: Fix warning.
20232 2004-03-08 Miguel de Icaza <miguel@ximian.com>
20234 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
20235 library routine if present. Notice that it will still continue
20236 executing even if its missing, for those working on the Gtk#
20237 edition of Windows.Forms.
20239 * assembly.c (do_mono_assembly_open): If loading the
20240 System.Windows.Forms call mono_loader_wini_init.
20242 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
20244 * class.h: Added MonoRemoteClass struct.
20245 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
20246 function for MonoStrings.
20247 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
20248 Added internal call for getting the proxy type.
20249 * marshal.c: Get the type of transparent proxies from its remote_class.
20250 Added methods that generate the IL for type checks and casts:
20251 mono_marshal_get_isinst, mono_marshal_get_castclass,
20252 mono_marshal_get_proxy_cancast.
20253 * marshal.h: Declaration of the previous new methods.
20254 * object.c: Added new moethods for creating and updating MonoRemoteClass
20255 instances: mono_remote_class, mono_upgrade_remote_class,
20256 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
20257 * verify.c: FIx transparent_proxy_fields layout.
20258 * appdomain.c: Bump corlib version.
20260 2004-03-04 Jackson Harper <jackson@ximian.com>
20262 * icall.c: Add icall to access char conversion tables.
20263 * char-conversions.h: Character conversion tables.
20264 * Makefile.am: Add char-conversions.h private header file.
20266 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
20268 * appdomain.c (unload_thread_main): Increase unloading timeout to
20269 10 sec as a temporary workaround for Nant problems.
20271 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
20273 * gc.c: Add checks for GC_enable and GC_disable.
20275 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
20276 (jaak@zd.com.pl). Fix memory corruption in String.Replace
20279 2004-02-27 Martin Baulig <martin@ximian.com>
20281 * reflection.c (mono_reflection_bind_generic_parameters): Take a
20282 `MonoReflectionType *' instead of a `MonoType *'.
20284 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
20286 * gc.c (run_finalize): Avoid finalizing the object representing the
20288 (finalizer_thread): Fix warning.
20290 2004-02-25 Martin Baulig <martin@ximian.com>
20292 * class.c (_mono_class_get_instantiation_name): Added `int offset'
20293 argument for nested types.
20294 (mono_class_create_generic): Added support for nested generictypes.
20296 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
20299 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
20301 * reflection.c (method_encode_signature): Increase the minimum
20302 value of `size' from 10 to 11.
20303 (mono_reflection_bind_generic_parameters): Take `int type_argc'
20304 and `MonoType **types' arguments instead of the `MonoArray
20305 *types'; added `MonoType *nested_in'. Recursively instantiate
20308 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
20310 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
20311 stack_overflow_ex members which are used by exception handling.
20313 * appdomain.c (mono_runtime_init): Initialize the new members.
20315 * gc.c (mono_gc_enable): New helper function.
20316 * gc.c (mono_gc_disable): New helper function.
20318 2004-02-23 Martin Baulig <martin@ximian.com>
20320 * icall.c: I must have been really stupid - make it actually work
20323 2004-02-23 Martin Baulig <martin@ximian.com>
20325 * loader.c (method_from_memberref): Only inflate the method if
20326 it's in another klass.
20328 2004-02-23 Martin Baulig <martin@ximian.com>
20330 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
20331 (mono_class_init): If we're a generic instance and an interface,
20332 compute `class->interface_id'; also create `class->interfaces'
20333 here and inflate them.
20335 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
20337 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
20339 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
20341 2004-02-15 Miguel de Icaza <miguel@ximian.com>
20343 * reflection.c (method_encode_code): Improved the error message
20344 generated by the exception.
20346 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20348 * icall.c: Martin did not do what he said in the ChangeLog for
20349 2004-02-18, but put back the changes for properties and events.
20350 Commenting those changes out again and adding comment to bug #54518.
20352 * process.c: removed warning.
20354 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
20356 * marshal.c (emit_struct_conv): Print an error message instead of
20357 asserting when a type does not have the StructLayout attribute.
20359 2004-02-20 Martin Baulig <martin@ximian.com>
20361 * reflection.c (mono_type_get_object): Also use the cache for
20363 (mono_reflection_bind_generic_parameters): Always compute
20366 2004-02-20 Martin Baulig <martin@ximian.com>
20368 * class.h (MonoGenericMethod): Removed `klass'.
20370 * class.c (mono_class_inflate_generic_method): Added `MonoClass
20373 2004-02-20 Martin Baulig <martin@ximian.com>
20375 * reflection.c (method_encode_methodspec): Actually use the
20376 uninflated signature for the memberref.
20378 2004-02-20 Martin Baulig <martin@ximian.com>
20380 * class.h (MonoGenericMethod): Removed `declaring'.
20382 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
20383 is NULL, compute it here.
20385 2004-02-20 Martin Baulig <martin@ximian.com>
20387 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
20389 * metadata.c (mono_metadata_generic_inst_hash): New method.
20390 (mono_metadata_generic_inst_equal): New method.
20392 * reflection.c (mono_reflection_bind_generic_parameters): Use the
20393 `klass->image->generic_inst_cache' cache to avoid creating
20394 duplicate MonoGenericInst's.
20396 * class.c (mono_class_inflate_generic_type): Use the cache.
20398 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
20400 * object.c: fixed gc descriptor calculation for embedded valuetypes.
20402 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20404 * icall.c: added Socket.WSAIoctl icall.
20406 * socket-io.[ch]: implemented
20407 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
20409 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
20411 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
20413 2004-02-18 Urs C Muff <umuff@quark.com>
20415 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
20416 this work on PPC and other big-endian architectures.
20418 * debug-mono-symfile.h: Prepended the names of all the `guint32'
20419 fields with an underscore to make sure they're only accessed by
20420 the read32() macro.
20422 2004-02-18 Martin Baulig <martin@ximian.com>
20424 * icall.c: Put the klass->refclass changes back for methods and
20425 fields, but not for properties and events. We're currently not
20426 distinguishing between DeclaringType and ReflectedType for
20427 properties and events, that's what caused the regressions.
20429 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20432 (mono_async_result_new): the handle can be NULL.
20434 * threadpool.c: Use an event instead of a semaphore, don't initialize
20435 it until needed. This saves quite a few semaphores from being created
20436 when using the threadpool.
20438 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
20440 * object.c (mono_string_is_interned_lookup): Fix interning of long
20441 strings. Fixes #54473.
20443 * domain.c (ldstr_equal): Optimize if the two strings are equal.
20445 * icall.c: Revert the klass->refclass changes since they introduce
20446 regressions (bug #54518).
20448 2004-02-18 Martin Baulig <martin@ximian.com>
20450 * class.c (mono_class_init): If we're a generic instance and don't
20451 come from a TypeBuilder, inflate our members here.
20452 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
20453 (mono_class_create_generic): New public method.
20454 (mono_class_initialize_generic): Removed.
20455 (get_instantiation_name): Renamed to
20456 _mono_class_get_instantiation_name() and made it public.
20458 2004-02-18 Martin Baulig <martin@ximian.com>
20460 * class.c (mono_class_inflate_generic_type): Clear the new
20461 instance's `nginst->klass' when inflating a generic instance.
20462 (mono_class_is_subclass_of): Added (basic) support for generic
20465 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
20467 * appdomain.h, domain.c: use a MonoCodeManager instead of a
20468 MonoMempool to hold compiled native code.
20470 2004-02-17 Martin Baulig <martin@ximian.com>
20472 * class.h (MonoDynamicGenericInst): Added `count_properties' and
20475 * reflection.c (mono_reflection_generic_inst_initialize): Added
20476 `MonoArray *properties' argument.
20478 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
20480 2004-02-17 Martin Baulig <martin@ximian.com>
20482 * icall.c (ves_icall_Type_GetFields): Renamed to
20483 ves_icall_Type_GetFields_internal() and added a
20484 `MonoReflectionType *rtype' argument; pass it to
20485 mono_field_get_object() to set the field's "reflected" type.
20486 (ves_icall_Type_GetConstructors): Likewise.
20487 (ves_icall_Type_GetEvents): Likewise.
20488 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
20489 argument; pass it to mono_method_get_object() to set the method's
20492 2004-02-17 Martin Baulig <martin@ximian.com>
20494 * class.h (MonoDynamicGenericInst): New type.
20495 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
20497 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
20498 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
20499 (ves_icall_MonoGenericInst_GetFields): New interncall.
20501 * class.c (mono_class_from_generic): Don't call
20502 mono_class_initialize_generic() if this is a dynamic instance;
20503 ie. it's being created from a TypeBuilder.
20504 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
20505 `class->byval_arg.type'.
20507 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
20508 to `inflate_method' and made static.
20509 (mono_reflection_inflate_field): Removed.
20510 (mono_reflection_generic_inst_initialize): New public method.
20512 * reflection.h (MonoReflectionGenericInst): Removed `methods',
20513 `ctors' and `fields'; added `initialized'.
20515 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
20517 * debug-helpers.c (mono_method_full_name): Fix output for empty
20520 2004-02-12 Martin Baulig <martin@ximian.com>
20522 * class.h (MonoClassField): Added `MonoType *generic_type'.
20524 * reflection.c (mono_image_get_fieldref_token): Added support for
20525 instantiated generic types.
20526 (field_encode_inflated_field): Removed.
20527 (mono_image_get_inflated_field_token): Removed.
20528 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
20530 * reflection.h (MonoReflectionInflatedField): Removed.
20532 2004-02-12 Martin Baulig <martin@ximian.com>
20534 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
20535 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
20537 * reflection.c (mono_image_get_methodspec_token): Take a
20538 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
20539 (mono_image_create_token): Check whether we have a
20540 `method->signature->gen_method' and call
20541 mono_image_get_methodspec_token() if appropriate.
20542 (inflated_method_get_object): Removed.
20543 (mono_reflection_bind_generic_method_parameters): Return a
20544 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
20545 (mono_reflection_inflate_method_or_ctor): Likewise.
20547 * reflection.h (MonoReflectionInflatedMethod): Removed.
20549 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
20551 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
20552 for custom valuetype marshalling.
20554 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
20556 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20558 * icall.c: fixed WSAGetLastError_internal name.
20560 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
20562 * threads.c (mono_thread_attach): Allow this to be called multiple
20563 times for a thread.
20565 * threads.c (build_wait_tids): Do not wait for ourselves.
20567 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
20568 appdomain list is empty.
20570 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
20571 memory returned by mono_string_builder_to_utf16, since it points into
20572 managed memory. Thanks to Bernie Solomon for noticing this.
20574 * icall.c: Add AppDomainSetup icalls.
20576 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
20578 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
20581 * reflection.c (reflection_methodbuilder_to_mono_method): Save
20582 custom attributes to the method_aux struct. Also fix array indexes etc.
20584 * loader.c (mono_method_get_param_names): Make dynamic case work again.
20586 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
20588 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
20589 (both static and runtime) and reduce startup time.
20591 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
20593 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
20594 AsAny marshalling conversion instead of crashing.
20596 * marshal.c: Fix warnings.
20598 2004-02-09 Martin Baulig <martin@ximian.com>
20600 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
20602 * reflection.h (MonoReflectionInflatedMethod): Removed the
20603 `declaring' field, it's now in the unmanaged MonoGenericMethod.
20605 * reflection.c (method_encode_methodspec): Removed the `method'
20606 argument; we get it from `gmethod->declaring'.
20607 (inflated_method_get_object): Removed the `declaring' argument.
20609 2004-02-09 Martin Baulig <martin@ximian.com>
20611 * class.h (MonoGenericMethod): New type.
20612 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
20615 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
20616 a `MonoGenericMethod *gen_method' one.
20618 * class.c (mono_class_inflate_generic_type): Take an additional
20619 `MonoGenericMethod * argument. This is only non-NULL if we're
20620 inflating types for a generic method.
20621 (mono_class_inflate_generic_signature): Renamed to
20622 inflate_generic_signature() and made static; take a
20623 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
20624 (inflate_generic_header): Take a `MonoGenericMethod *' argument
20625 instead of a `MonoGenericInst *' one.
20626 (mono_class_inflate_generic_method): Likewise.
20628 * reflection.c (encode_generic_method_sig): Take a
20629 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
20630 (method_encode_methodspec): Likewise.
20631 (inflated_method_get_object): Likewise.
20633 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
20634 field with a `MonoGenericMethod *gmethod' one.
20636 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
20638 * class.h (mono_class_has_parent): add parens to expansion
20641 2004-02-08 Martin Baulig <martin@ximian.com>
20643 * image.h (MonoImage): Removed `generics_cache'.
20645 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
20646 instead of a `MonoType *' argument; removed the `inflate_methods'
20647 argument. Don't inflate methods here.
20649 * loader.c (find_method): If it's a generic instance, call
20650 mono_class_init() on the `sclass->generic_inst->generic_type'.
20652 * metadata.c (mono_type_size): Make this work on uninitialized
20653 generic instances; call it on the `ginst->generic_type's class.
20655 * reflection.c (mono_reflection_bind_generic_parameters): Call
20656 mono_class_from_generic() to create the `ginst->klass'.
20658 2004-02-08 Martin Baulig <martin@ximian.com>
20660 * class.h (MonoClass): Changed type of `generic_inst' from
20661 `MonoType *' to `MonoGenericInst *'.
20663 2004-02-08 Martin Baulig <martin@ximian.com>
20665 * icall.c (ves_icall_Type_BindGenericParameters): Just call
20666 mono_type_get_object(), this is now creating a `MonoGenericInst'
20667 for MONO_TYPE_GENERICINST.
20668 (ves_icall_MonoGenericInst_GetParentType): Likewise.
20669 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
20671 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
20672 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
20673 (inflated_method_get_object): Added `MonoClass *refclass' argument.
20674 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
20675 and reflected type.
20677 * reflection.h (MonoReflectionInflatedMethod): Removed
20678 `declaring_type' and `reflected_type'.
20680 2004-02-08 Martin Baulig <martin@ximian.com>
20682 * class.h (MonoGenericInst): Added `MonoType *parent' and
20683 `MonoType **ifaces'.
20685 * reflection.h (MonoReflectionGenericInst): Removed `klass',
20686 `parent' and `interfaces'.
20688 * reflection.c (mono_reflection_bind_generic_parameters): Take a
20689 `MonoType *' argument and return a `MonoType *'.
20692 (ves_icall_MonoGenericInst_GetParentType): New interncall.
20693 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
20695 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
20697 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
20698 valuetype marshalling.
20700 2004-02-06 Martin Baulig <martin@ximian.com>
20703 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
20704 (my_mono_class_from_generic_parameter): Likewise.
20706 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
20708 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
20709 contents of the symbol files lazily.
20711 * object.h (MonoThread): Add 'name' and 'name_len' fields.
20713 * threads.h threads.c icall.c: New icalls for getting and setting the
20716 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
20718 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
20719 Raise an exception when the domain is not found.
20721 2004-02-03 Martin Baulig <martin@ximian.com>
20723 * reflection.c (mono_image_get_methodspec_token): Use the
20724 uninflated signature; fixes gen-33.
20726 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
20728 * gc.c threads.c: Make the finalizer thread a normal managed thread so
20729 the finalizer code can use thread functionality.
20731 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
20732 the finalizer thread.
20734 * threads.c: Make some functions more robust.
20736 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
20738 * metadata.h: Add new marshalling conventions.
20740 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
20741 stringbuilder marshalling. Fixes #53700.
20743 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
20745 * reflection.c (mono_image_get_type_info): Save declarative security
20748 * reflection.c (mono_image_get_field_info): Handle uninitialized
20749 unmanaged fields as well.
20751 * appdomain.c: Bump corlib version.
20753 2004-02-01 Martin Baulig <martin@ximian.com>
20755 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
20756 method type arguments.
20758 2004-01-30 Duncan Mak <duncan@ximian.com>
20760 * marshal.h: Add prototype for
20761 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
20763 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
20766 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
20768 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
20769 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
20771 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
20773 * marshal.c (mono_marshal_get_native_wrapper): Add support for
20774 custom marshalling of valuetypes.
20776 * marshal.c: Fix some warnings.
20778 2004-01-29 Martin Baulig <martin@ximian.com>
20780 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
20781 for generic method parameters.
20783 * reflection.c (method_encode_methodspec): Write the uninflated
20784 signature into the methodspec table.
20785 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
20786 is always the uninflated method.
20787 (reflection_methodbuilder_to_mono_method): Copy the generic
20788 parameters from the MethodBuilder into `header->gen_params'.
20790 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
20792 * class.c (mono_class_from_generic_parameter): Fix warning.
20794 2004-01-27 Martin Baulig <martin@ximian.com>
20796 * class.c (mono_class_from_generic_parameter): Don't create
20797 `klass->methods' here.
20799 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
20801 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
20802 extension since it does not work with libraries named lib<FOO>.dll.so.
20804 2004-01-25 Martin Baulig <martin@ximian.com>
20806 * class.c (mono_class_inflate_generic_type): Added support for
20807 MONO_TYPE_GENERICINST.
20809 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
20810 inflate methods on open constructed types.
20812 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20814 * object.c: fire ProcessExit event in the root AppDomain after running
20815 Main. Fixes bug #53299.
20817 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
20819 * socket-io.c: include the new socket-wrappers.h header.
20820 Use the wrappers instead of the unix socket functions to make the code
20823 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
20825 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
20827 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
20830 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
20832 * reflection.c (mono_image_create_pefile): Handle the case when the
20833 entry point is not a MethodBuilder.
20835 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
20836 field to ReflectionMethod since it is not allways a builder.
20838 * reflection.c (type_get_fully_qualified_name): New helper function to
20839 return the fully qualified name of a type.
20841 * reflection.c (encode_marshal_blob): Always emit the fully qualified
20842 type name for custom marshallers.
20844 * reflection.c (mono_marshal_spec_from_builder): Ditto.
20846 * class.c (mono_class_setup_vtable): If a parent class already
20847 implements an interface, use the implementing methods from that class.
20850 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20852 * threadpool.c: just return instead of ExitThread to allow for thread
20855 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
20857 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
20858 when closing resource modules.
20860 * reflection.c (mono_image_create_pefile): Handle the case when the
20861 entry point is not a MethodBuilder.
20863 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
20864 field to ReflectionMethod since it is not allways a builder.
20866 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
20868 * marshal.c (mono_marshal_get_managed_wrapper):
20869 mono_marshal_alloc takes native int so CONV_I
20870 the arg for 64bits.
20872 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
20874 * reflection.c (fixup_cattrs): New function to fixup the methoddef
20875 tokens in the cattr table. Fixes #53108.
20877 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20879 * loader.c: don't trim ".dll" before looking up in the config file.
20880 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
20882 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
20884 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
20885 Return the module which contains the resource as well.
20886 (ves_icall_System_Reflection_Module_Close): New icall.
20888 * appdomain.c: Bump corlib version number.
20890 * image.c (mono_image_addref): New public function.
20892 * assembly.c: Call mono_image_addref.
20894 * reflection.c (mono_module_get_object): Increase reference count of
20897 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
20900 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
20901 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
20902 proper exceptions on DllImport problems.
20904 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
20906 * class.c, metadata.c: eliminate CSIZE macro.
20908 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
20910 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
20911 * object.h: Added async_callback field in MonoAsyncResult.
20912 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
20913 * verify.c: Added async_callback in MonoAsyncResult layout.
20915 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
20917 * reflection.c (mono_reflection_get_custom_attrs): Add support
20920 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
20922 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
20924 (mono_marshal_method_from_wrapper): Add null pointer check.
20926 2004-01-16 Martin Baulig <martin@ximian.com>
20928 * debug-mono-symfile.h: Set version number to 36 and reflect
20929 latest symbol writer changes.
20931 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
20933 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
20934 multi-dimensional arrays.
20935 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
20936 (mono_class_from_mono_type): Use bounded_array_class_get.
20938 * class.c (mono_bounded_array_class_get): New function which takes
20939 a 'bounded' bool argument to distinguish vectors from one dimensional
20942 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
20943 bounded_array_class_get if the array has bounds.
20945 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
20946 Search modules loaded using AssemblyBuilder:AddModule as well.
20948 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20950 * appdomain.c: increased corlib version.
20951 * filewatcher.c: removed g_print.
20953 (get_property_info): only allocate what is actually requested.
20954 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
20956 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20958 * Makefile.am: added filewatcher.[ch]
20959 * filewatcher.[ch]: FileSystemWatcher runtime support.
20960 * icall.c: added new FSW icalls.
20962 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
20964 * string-icalls.c: fix stringbuilder regression as suggested by
20965 Iain McCoy <iain@mccoy.id.au>.
20967 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
20969 * process.c (process_read_stringtable_block): Recognize '007f' as
20970 a language neutral stringtable block.
20972 2004-01-12 Patrik Torstensson
20974 * object.h (MonoStringBuilder) : Changed layout to support our
20975 new stringbuilder class.
20976 * marshal.c: Change marshalling to support the new layout of
20978 * appdomain.c: increased version number because new layout of
20981 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
20983 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
20984 assembly name as an string instead of an AssemblyName, since it is
20985 easier to extract info from it.
20987 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
20988 the culture subdirectories too. Fixes #52231.
20990 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20992 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
20993 It takes 2 new parameters with an optional name for the method to look
20994 for and case ignoring info.
20996 * threadpool.c: removed unused variable.
20998 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21000 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
21001 It takes 2 new parameters with an optional name for the property to look
21002 for and case ignoring info.
21005 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
21007 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
21010 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21013 * assembly.c: escape the uri before passing it to g_filename_from_uri.
21016 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
21018 * reflection.c: Add support for more than one unmanaged resource.
21020 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
21021 in field->def_value, as done in all other cases.
21023 * reflection.c (mono_reflection_get_custom_attrs): Add support for
21026 * reflection.c (mono_reflection_create_runtime_class): Remove
21027 errorneous assignment to klass->element_class, since it is already
21028 done in mono_reflection_setup_internal_class.
21030 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21032 * gc.c: added missing LeaveCriticalSection.
21033 * icall.c: indented a couple of lines.
21034 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
21035 if we call EndInvoke inside a callback. Fixes bug #52601.
21037 2004-01-07 Martin Baulig <martin@ximian.com>
21039 * mono-debug-debugger.h
21040 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
21042 2004-01-06 Miguel de Icaza <miguel@ximian.com>
21044 * appdomain.c: Use messages in NotImplementedException.
21046 * exception.c (mono_get_exception_not_implemented): Now this takes
21047 a message argument.
21049 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
21050 exception instead of g_asserting an aborting when something is not
21053 Add some inline docs.
21055 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
21057 * reflection.h: Update after changes to object layout.
21059 * reflection.c: Implement saving of unmanaged aka win32 resources.
21061 * appdomain.c: Bump version number.
21063 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
21064 Handle missing domains gracefully.
21066 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
21068 * file-io.c : On Windows, there are much more invalid_path_chars.
21070 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
21072 * class.h, object.c: prepare for GetType () speedup.
21074 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
21076 * profiler.c: workaround for --profile null reference exception on
21077 cygwin. Patch by Patrik Torstensson.
21079 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
21081 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
21082 make work for unaligned access.
21084 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
21086 * class.c: small cleanup (class->fields [i] -> field).
21087 * image.c: check address of metadata is valid.
21089 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
21091 * assembly.h assembly.c (mono_assembly_loaded): New public function to
21092 search the list of loaded assemblies.
21094 * reflection.c (mono_reflection_type_from_name): Use
21095 mono_assembly_loaded instead of mono_image_loaded.
21097 * reflection.c: Fix warnings.
21099 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
21101 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
21102 is dynamic. This is needed since an assembly can contain both dynamic and
21103 non-dynamic images.
21105 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
21108 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
21110 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
21111 to store modules loaded using AddModule.
21113 * reflection.c (mono_image_fill_file_table): Generalize this so it works
21116 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
21118 * reflection.c (mono_image_fill_export_table_from_module): New function to
21119 fill out the EXPORTEDTYPES table from a module.
21121 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
21122 into a separate function. Also handle loaded non-dynamic modules.
21124 * reflection.c (mono_image_basic_init): Fix memory allocation.
21126 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21128 * assembly.c (mono_assembly_load_references): Make this public.
21130 2003-12-19 Martin Baulig <martin@ximian.com>
21132 * class.c (mono_class_initialize_generic): Made this static, take
21133 a `MonoGenericInst *' instead of a `MonoClass *'.
21134 (mono_class_from_generic): Call mono_class_initialize_generic()
21135 unless we're already initialized or being called from
21136 do_mono_metadata_parse_generic_inst().
21138 * class.h (MonoGenericInst): Added `initialized' and
21139 `init_pending' flags.
21141 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
21142 `mono_class_init (gklass)' or mono_class_initialize_generic()
21143 here; set `generic_inst->init_pending' while parsing the
21146 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
21148 * locales.c: include string.h for memxxx prototypes
21150 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
21152 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
21153 constructor when accessing literal fields.
21155 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
21157 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
21159 * reflection.c (assembly_add_resource_manifest): New function to fill
21160 the MANIFESTRESOURCE table.
21162 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
21164 * reflection.h: Update to changes in class layout.
21166 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
21167 Reenable call to mono_runtime_is_shutting_down ().
21169 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
21170 determine if the runtime is shutting down.
21172 2003-12-16 Jackson Harper <jackson@ximian.com>
21174 * icall.c: comment out call to mono_runtime_is_shutting_down to
21177 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
21179 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
21180 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
21182 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
21184 * reflection.c: move definition of swap_with_size
21185 to before its first call
21187 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
21189 * appdomain.c (mono_runtime_is_shutting_down): New public function.
21191 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
21194 * object.c: Fix warnings.
21196 * icall.c (ves_icall_Type_Get...): Only consider inherited static
21197 members if FlattenHierarchy is set.
21199 * reflection.c (mono_image_add_decl_security): New function to emit
21200 declarative security.
21202 * reflection.h reflection.c: Add support for declarative security.
21204 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
21206 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
21208 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
21210 * appdomain.c verify.c: Moved corlib version checking into its own
21211 function in appdomain.c since it needs to create vtables etc.
21213 2003-12-13 Patrik Torstensson <p@rxc.se>
21215 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
21216 instead of unwrapped server.
21218 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
21220 * verify.c (check_corlib): Fix field index.
21222 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
21224 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
21227 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
21229 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
21230 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
21231 cope with sizeof(size_t) != sizeof(guint32).
21233 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21235 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
21236 in case of failure.
21238 2003-12-10 Mark Crichton <crichton@gimp.org>
21240 * icall.c: removed the GetNonZeroBytes. We now handle this case
21243 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
21245 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
21247 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
21250 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
21252 * verify.c (check_corlib): Handle the case when the version field is
21253 initialized by a static constructor.
21255 2003-12-08 Patrik Torstensson <p@rxc.se>
21257 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
21259 2003-12-08 Martin Baulig <martin@ximian.com>
21261 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
21262 a MonoReflectionGenericParameter, also take the parameter index
21263 and name as arguments.
21264 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
21265 (ves_icall_MonoGenericParam_initialize): New interncall.
21266 (ves_icall_Type_make_byref_type): New interncall.
21268 * reflection.h (MonoReflectionGenericParam): Derive from
21269 MonoReflectionType, not just from MonoObject. Added `refobj' and
21272 * reflection.c (mono_reflection_define_generic_parameter): Create
21273 and return a new MonoReflectionGenericParam; don't initialize the
21275 (mono_reflection_initialize_generic_parameter): New public method;
21276 initializes the constraints and creates the `param->pklass'.
21278 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
21280 * reflection.h reflection.c: Use the new fields 'num_types',
21281 'num_fields' and 'num_methods' to track the number of types etc.
21283 * verify.c (check_corlib): Check corlib version number.
21285 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
21287 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
21288 function works on all methods.
21290 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
21292 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
21293 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
21294 the custom_type_info flag of the transparent proxy.
21295 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
21296 objects that supports IRemotingTypeInfo.
21297 * object.h: Added custom_type_info field in transparent proxy.
21299 2003-12-06 Martin Baulig <martin@ximian.com>
21301 * class.c (mono_class_create_from_generic): Removed.
21302 (mono_class_from_generic): Check `ginst->klass' before doing
21303 anything else. This is important to fully support "recursive"
21306 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
21307 empty `generic_inst->klass' before doing anything else.
21309 2003-12-06 Dick Porter <dick@ximian.com>
21314 * locales.c: Use C structs to access class fields. Don't do a
21315 conversion between MonoString and UChar because both are
21316 platform-endian UTF-16. Compare now takes startindex and count
21317 parameters. Add a char overload for IndexOf. Speed up the
21318 invariant string IndexOf.
21320 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
21322 * Makefile.am (monosn_LDADD): Fix parallel build.
21324 2003-12-04 Martin Baulig <martin@ximian.com>
21327 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
21328 (ves_icall_Type_make_array_type): New interncall.
21330 2003-12-04 Martin Baulig <martin@ximian.com>
21332 * locales.c: also change it in the !HAVE_ICU case.
21334 2003-12-04 Dick Porter <dick@ximian.com>
21337 * locales.c: construct_compareinfo is now in CompareInfo, not
21340 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
21342 * image.c (mono_image_load_file_for_image): Cache loaded images in the
21343 image->files array.
21345 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
21348 * assembly.c (mono_assembly_load_references): Only load references
21351 * class.c (mono_class_from_name): Avoid linear search of the
21352 EXPORTEDTYPE table.
21354 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
21356 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
21358 * image.h (MonoImage): Add 'field_cache' field.
21360 * loader.c (mono_field_from_token): Cache field lookups.
21362 * reflection.c (mono_module_get_object): Fix name property.
21364 * icall.c (ves_icall_get_enum_info): Update after changes to
21365 mono_metadata_get_constant_index ().
21367 * icall.c: Get rid of get_type_info icall, use a separate icall for
21368 each type property to avoid needless memory allocations. Fixes #51514.
21370 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
21371 to avoid needless binary searches.
21373 * class.c (class_compute_field_layout): Move the initialization of
21374 field->def_value to mono_class_vtable ().
21376 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
21379 * object.c (mono_object_allocate): Make it inline.
21381 * object.c (mono_object_allocate_spec): Make it inline.
21383 2003-12-02 Dick Porter <dick@ximian.com>
21385 * locales.c (create_NumberFormat): NumberFormatInfo construction.
21386 Patch by Mohammad DAMT (mdamt@cdl2000.com).
21388 2003-12-01 Dick Porter <dick@ximian.com>
21390 * threads.c: Fix signature and call in CreateMutex and
21393 2003-12-01 Dick Porter <dick@ximian.com>
21396 * locales.c: Implement string compares and searching
21398 * object.h: Add extra Thread field
21400 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
21402 * reflection.c (fixup_method): Add support for MonoCMethod.
21404 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
21406 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
21408 * reflection.c (assembly_name_to_aname): Allow extra characters in
21409 assembly names. Fixes #51468.
21411 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
21413 * exception.c (mono_exception_from_name_domain): New helper function.
21415 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
21416 exception object in the correct domain.
21418 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
21419 formatting + make a copy a the input data.
21421 * loader.c (mono_get_method_from_token): Methods which contain
21422 native code do not have entries in the ImplMap.
21424 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
21425 Thanks to Gonzalo for spotting this.
21427 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
21428 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
21430 * assembly.h (mono_assembly_load_from): Split the second part of
21431 assembly loading into a new public function.
21433 * exception.h (mono_get_exception_bad_image_format): New function.
21435 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
21437 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
21438 Enumerate all modules inside a dynamic assembly. Fixes #51293.
21440 * icall.c: Add new icall for creating dynamic methods.
21442 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
21444 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
21446 * reflection.c (mono_reflection_create_dynamic_method): New icall to
21447 create a dynamic method.
21449 * reflection.c (resolve_object): New helper function.
21451 * reflection.c: Generalize ReflectionMethodBuilder and the functions
21452 which manipulate it so they can also work on dynamic methods.
21454 * reflection.c (reflection_method_builder_to_mono_method): Avoid
21455 creating the MonoReflectionMethodAux structure if it is not needed.
21457 * reflection.h verify.c: Update after changes to object layout.
21459 * reflection.c (method_builder_encode_signature): Fix compilation on
21462 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
21464 * appdomain.h: Added support for context static fields. Added static_data
21465 field to MonoAppContext and renamed thread_static_fields to a more
21466 generic special_static_fields in MonoAppDomain, since it can now contain
21467 context static fields.
21468 * domain.c: Updated hashtable name.
21469 * object.c: Replaced field_is_thread_static() for a more generic
21470 field_is_special_static() which also checks for context static attribute.
21471 In mono_class_vtable(), added support for static context fields.
21472 * threads.c: Changed methods that manage thread static fields to more
21473 generic methods so they can be reused both for thread and context static
21475 * threads.h: Declared some new methods.
21477 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
21479 * reflection.h: Update after changes to the managed types.
21481 * reflection.c (encode_custom_modifiers): New helper function.
21483 * reflection.c (method_encode_signature): Emit custom modifiers.
21485 * reflection.c (field_encode_signature): Emit custom modifiers.
21487 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
21489 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
21491 * icall.c (ves_icall_System_ValueType_Equals): New optimized
21494 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
21497 * object.c (mono_field_get_value_object): New function.
21499 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
21502 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
21504 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
21505 return a preallocated out-of-memory exception instance.
21507 * object.c (out_of_memory): Use the new function.
21509 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
21510 flag is before the custom modifiers. Fixes #49802.
21512 2003-11-16 Martin Baulig <martin@ximian.com>
21514 * class.c (mono_class_is_open_constructed_type): Implemented the
21515 MONO_TYPE_GENERICINST case.
21517 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
21519 * assembly.c (mono_assembly_fill_assembly_name): New function to
21520 fill out the MonoAssemblyName structure.
21521 (mono_assembly_open): Use the new function.
21523 * icall.c (fill_reflection_assembly_name): New helper function.
21525 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
21528 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
21530 2003-11-15 Martin Baulig <martin@ximian.com>
21532 * class.c (mono_class_is_open_constructed_type): New public
21533 function; checks whether a type is an open constructed type,
21534 ie. whether it still contains type parameters.
21535 (mono_class_inflate_generic_type): If we're a type parameter and
21536 the inflated type is also a MONO_TYPE_(M)VAR, return the original
21539 * class.h (MonoGenericInst): Added `guint32 is_open'.
21541 * loader.c (method_from_methodspec): Check whether we're an open
21542 or closed constructed type and set `ginst->is_open'.
21544 * reflection.c (mono_reflection_bind_generic_parameters): Check
21545 whether we're an open or closed constructed type and set
21547 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
21548 from open constructed types.
21550 2003-11-15 Martin Baulig <martin@ximian.com>
21552 * reflection.c (mono_reflection_bind_generic_parameters): If we're
21553 a generic instance (instead of a generic type declaration) with
21554 unbound generic parameters, bind them to our actual types.
21556 2003-11-14 Martin Baulig <martin@ximian.com>
21558 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
21560 * reflection.c (mono_reflection_bind_generic_parameters): If we're
21561 an interface type, populate `res->interfaces' with instantiated
21562 versions of all the interfaces we inherit.
21564 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
21566 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
21567 when MONO_PATH is set but doesn't contain the install dir.
21569 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21572 (ves_icall_Type_GetInterfaces): don't return an interface twice when
21573 it's also implemented in base classes. Fixes bug #50927.
21575 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
21577 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
21578 if this method is called from a finalizer. Fixes #50913.
21580 2003-11-12 Miguel de Icaza <miguel@ximian.com>
21582 * threads.c: Implement VolatileRead/VolatileWrite
21584 * icall.c: Add new icalls for VolatileRead/VolatileWrite
21586 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
21588 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
21589 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
21592 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
21593 from Peter Ross (pro@missioncriticalit.com).
21595 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
21597 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
21599 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
21601 * assembly.c (mono_assembly_load_references): Disable check because it
21602 triggers on older corlibs which lots of people have.
21604 2003-11-12 Jackson Harper <jackson@ximian.com>
21606 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
21607 load corlib.dll if mscorlib.dll is not found.
21608 * assembly.h: Remove corlib name define.
21611 * image.c: Change corlib name to mscorlib.
21613 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
21615 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
21617 2003-11-11 Miguel de Icaza <miguel@ximian.com>
21619 * appdomain.h: Added loader_optimization here to sync with the C#
21620 code, and add disallow_binding_redirects field.
21622 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
21624 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
21626 * reflection.c (mono_image_build_metadata): Fix crash on modules
21629 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
21631 * icall.c (ves_icall_get_method_info): Return callingConvention as
21634 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
21635 namespaces from the EXPORTEDTYPE table as well.
21637 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
21638 from all modules inside the assembly.
21640 2003-11-11 Martin Baulig <martin@ximian.com>
21642 * reflection.c (mono_reflection_bind_generic_parameters): Make
21643 this work for interfaces.
21645 2003-11-11 Martin Baulig <martin@ximian.com>
21647 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
21649 2003-11-11 Martin Baulig <martin@ximian.com>
21651 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
21652 "MonoInflatedMethod" and "MonoInflatedCtor".
21654 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
21656 * reflection.c (resolution_scope_from_image): Use the assembly table
21657 from the manifest module, since other modules don't have it.
21659 * debug-helpers.c (mono_type_full_name): New helper function.
21661 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
21663 * image.c (mono_image_load_file_for_image): New public function which
21664 is a replacement for the load_file_for_image in class.c.
21666 * assembly.c (mono_assembly_load_module): A wrapper for the function
21667 above which does assembly association and reference loading too.
21669 * class.c (mono_class_from_name): Call mono_assembly_load_module.
21671 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21673 * appdomain.c: not all of the attributes for the full assembly name
21674 are required and the order doesn't matter. Fixes bug #50787.
21676 2003-11-10 Dick Porter <dick@ximian.com>
21678 * locales.c: Use platform-endian UTF16
21680 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
21682 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
21684 2003-11-10 Martin Baulig <martin@ximian.com>
21687 (mono_metadata_load_generic_params): Make this actually work.
21689 * reflection.c (mono_reflection_bind_generic_parameters): If our
21690 parent is a generic instance, pass all the `types' to it, no
21691 matter whether it has the same number of type parameters or not.
21693 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
21695 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
21697 * assembly.c (mono_assembly_load_references): Move the image<->assembly
21698 assignment code to this function so it gets called recursively for all
21701 * image.c (load_modules): Remove the assembly assignment since it is
21702 now done by mono_assembly_load_references.
21704 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
21705 Add 'module' argument.
21706 (mono_module_get_types): New helper function.
21707 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
21709 2003-11-08 Martin Baulig <martin@ximian.com>
21711 * class.c (mono_class_inflate_generic_method): Interface method
21712 don't have a header.
21714 * reflection.c (mono_image_get_methodspec_token): Take an
21715 additional `MonoGenericInst *' argument instead of reading it from
21716 the header; this is necessary to support interfaces.
21717 (mono_image_create_token): Pass the `MonoGenericInst *' from the
21718 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
21719 (inflated_method_get_object): Take an additional `MonoGenericInst *'
21722 * reflection.h (MonoReflectionInflatedMethod): Added
21723 `MonoGenericInst *ginst'.
21725 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
21727 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
21729 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
21731 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
21733 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
21736 (reflection_methodbuilder_from_method_builder):
21737 (reflection_methodbuilder_from_ctor_builder): New helper functions to
21738 initialize a ReflectionMethodBuilder structure.
21739 (mono_image_get_methodbuilder_token):
21740 (mono_image_get_ctorbuilder_token): New functions to emit memberref
21741 tokens which point to types in another module inside the same assembly.
21743 * reflection.c: Use the new helper functions.
21745 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
21747 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
21748 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
21750 * reflection.c (resolution_scope_from_image): Emit a moduleref if
21753 * reflection.c (mono_image_build_metadata): Emit metadata only for the
21754 current module. Emit the manifest only for the main module.
21756 * reflection.c (mono_image_create_token): Add assertion when a
21757 memberref needs to be created.
21759 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
21761 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
21762 larger buffer for the custom attribute blob. Fixes #50637.
21764 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21766 * threadpool.c: notify listener on async processing handles after
21767 invoking the async callback. Thanks to Zoltan.
21769 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
21771 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
21772 avoid code duplication.
21774 * reflection.h (MonoDynamicImage): New type which is currently unused,
21775 but will be used through the ref.emit code in place of
21776 MonoDynamicAssembly.
21778 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
21781 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
21782 a MonoDynamicImage instead of just a MonoImage.
21784 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
21785 icalls to ModuleBuilder but keep their semantics, so they will work
21786 with moduleb->assemblyb. This will change later.
21788 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
21790 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
21793 * reflection.c (mono_image_build_metadata): Avoid creation of a default
21794 main module, since it is now done by the managed code.
21796 2003-11-03 Martin Baulig <martin@ximian.com>
21798 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
21799 `ginst->klass' here.
21800 (method_encode_methodspec): Don't use the `ginst->generic_method's
21801 klass if it's a generic instance, use `ginst->klass' in this case.
21803 2003-11-03 Martin Baulig <martin@ximian.com>
21805 * reflection.c (mono_image_get_generic_method_param_info):
21806 Removed, use mono_image_get_generic_param_info() instead.
21807 (mono_image_get_type_info): Write the GenericParam table before
21808 the Method table. This is neccessary because in the GenericParam
21809 table, type parameters of the class (ie. '!0' etc.) must come
21810 before the ones from its generic methods (ie. '!!0' etc).
21812 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
21814 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
21816 2003-11-02 Martin Baulig <martin@ximian.com>
21818 * reflection.c (create_generic_typespec): Take a
21819 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
21820 the generic parameters from it.
21822 2003-11-02 Martin Baulig <martin@ximian.com>
21824 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
21825 instead of a `MonoClassField *' since we just need the type.
21826 (create_generic_typespec): New static function. Creates a
21827 TypeSpec token for a generic type declaration.
21828 (mono_image_get_generic_field_token): New static function.
21829 (mono_image_create_token): If we're a FieldBuilder in a generic
21830 type declaration, call mono_image_get_generic_field_token() to get
21833 2003-11-02 Martin Baulig <martin@ximian.com>
21836 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
21837 `MonoReflectionGenericInst *declaring_type' and
21838 `MonoReflectionGenericInst *reflected_type' fields.
21840 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
21841 `MonoReflectionGenericInst *declaring_type' and a
21842 `MonoReflectionGenericInst *reflected_type' argument instead of a
21843 single `MonoReflectionGenericInst *type' one. Set
21844 `res->declaring_type' and `res->reflected_type' from them.
21845 (mono_reflection_inflate_field): Likewise.
21847 2003-11-02 Martin Baulig <martin@ximian.com>
21849 * class.c (mono_class_setup_vtable): Don't store generic methods
21852 2003-11-02 Martin Baulig <martin@ximian.com>
21854 * reflection.h (MonoReflectionGenericInst): Added
21855 `MonoReflectionType *declaring_type'.
21857 * reflection.c (mono_reflection_bind_generic_parameters): Use
21858 `if (tb->parent)' instead of `klass->parent'.
21860 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
21862 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
21863 with an empty ASSEMBLY table.
21865 * reflection.c (mono_image_build_metadata): Avoid using the same loop
21866 variable in the inner and outer loops.
21868 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
21870 * metadata.h (mono_metadata_make_token): Put parentheses around macro
21873 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
21875 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
21876 icalls. Instead, do everything in managed code. This is needed since
21877 it is hard to restore the original domain etc. in unmanaged code in the
21878 presence of undeniable exceptions.
21880 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
21881 New icalls to push and pop appdomain refs.
21883 2003-10-31 Martin Baulig <martin@ximian.com>
21885 * class.c (inflate_generic_type): Renamed to
21886 mono_class_inflate_generic_type() and made it public.
21888 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
21891 * loader.c (mono_field_from_memberref): Also set the retklass for
21894 * fielder.c (mono_image_get_inflated_field_token): New static
21895 method; creates a metadata token for an inflated field.
21896 (mono_image_create_token, fixup_method): Added support for
21897 "MonoInflatedField".
21898 (fieldbuilder_to_mono_class_field): New static function.
21899 (mono_reflection_inflate_field): New public function.
21902 (MonoReflectionGenericInst): Added `MonoArray *fields'.
21903 (MonoReflectionInflatedField): New typedef.
21905 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
21907 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
21908 for Solaris and other platforms without s6_addr16
21910 2003-10-30 Martin Baulig <martin@ximian.com>
21912 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
21913 argument instead of two.
21914 (mono_class_inflate_generic_signature): Likewise.
21915 (inflate_generic_header): Likewise.
21916 (mono_class_inflate_generic_method): Likewise. In addition, if
21917 `ginst->klass' is set, it becomes the new `method->klass'.
21919 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
21922 * reflection.c (encode_generic_method_sig): Write a 0xa as the
21923 first byte. [FIXME]
21924 (method_encode_methodspec): If we have generic parameters, create
21925 a MethodSpec instead of a MethodRef.
21926 (fixup_method): Added support for "MonoInflatedMethod" and
21927 "MonoInflatedCtor".
21928 (mono_image_create_token): Added support for "MonoInflatedMethod"
21929 and "MonoInflatedCtor".
21930 (inflated_method_get_object): New static function; returns a
21931 managed "System.Reflection.MonoInflatedMethod" object.
21932 (mono_reflection_bind_generic_method_parameters): Return a
21933 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
21934 (mono_reflection_inflate_method_or_ctor): Likewise.
21935 (mono_image_get_generic_method_param_info): Initialize unused
21937 (mono_image_get_generic_param_info): Likewise.
21939 * reflection.h (MonoReflectionInflatedMethod): New public
21940 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
21941 "S.R.MonoInflatedCtor" classes.
21943 * loader.c (method_from_memberref): If we're a TypeSpec and it
21944 resolves to a generic instance, inflate the method.
21946 2003-10-28 Dick Porter <dick@ximian.com>
21948 * object.c (mono_runtime_run_main): Convert command-line arguments
21949 into utf8, falling back to the user's locale encoding to do so.
21951 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
21953 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
21956 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
21958 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
21959 up icalls at method definition time. Partially fixes #33569.
21961 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
21963 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
21964 marshalling of arrays. Fixes #50116.
21966 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
21968 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
21969 points to a vtable in the dying appdomain.
21971 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
21972 listeners into unmanaged code inside the lock.
21974 * object.c (mono_class_vtable): Turn off typed allocation in non-root
21975 domains and add some comments.
21977 2003-10-25 Martin Baulig <martin@ximian.com>
21979 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
21981 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
21983 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
21984 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
21985 currently parsing. Create the generic class and store it in
21986 `generic_inst->klass' before parsing the type arguments. This is
21987 required to support "recursive" definitions; see mcs/tests/gen-23.cs
21989 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
21990 to support recursive typespec entries.
21992 * class.c (mono_class_setup_parent): If our parent is a generic
21993 instance, we may get called before it has its name set.
21994 (mono_class_from_generic): Splitted into
21995 mono_class_create_from_generic() and mono_class_initialize_generic().
21997 2003-10-25 Martin Baulig <martin@ximian.com>
21999 * icall.c (ves_icall_Type_BindGenericParameters): Return a
22000 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
22001 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
22002 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
22004 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
22005 (create_typespec): Likewise.
22006 (mono_reflection_bind_generic_parameters): Return a
22007 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
22008 (mono_reflection_inflate_method_or_ctor): New public function.
22010 * reflection.h (MonoReflectionGenericInst): New typedef.
22012 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
22014 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
22015 inside the domain lock. Fixes #49993.
22017 * object.c (mono_class_vtable): When typed allocation is used,
22018 allocate vtables in the GC heap instead of in the mempool, since the
22019 vtables contain GC descriptors which are used by the collector even
22020 after the domain owning the mempool is unloaded.
22022 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
22024 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
22025 reflect what it does. Also invalidate mempools instead of freeing
22026 them if a define is set.
22028 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
22031 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
22032 hold the finalizable objects in this domain.
22034 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
22037 * appdomain.c (mono_domain_set): New function to set the current
22038 appdomain, but only if it is not being unloaded.
22040 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
22041 appdomain which is being unloaded.
22043 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
22044 unloading of the root appdomain.
22046 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
22047 icall to execute a method in another appdomain. Intended as a
22048 replacement for InternalSetDomain, which can confuse the code
22049 generation in the JIT.
22051 * appdomain.c (mono_domain_is_unloading): New function to determine
22052 whenever an appdomain is unloading.
22054 * appdomain.c (mono_domain_unload): New function to correctly unload
22057 * assembly.c (mono_assembly_load_references): Check that an assembly
22058 does not references itself.
22060 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
22061 domain manually, it asks the finalizer thread to do it, then waits for
22062 the result. Also added a timeout.
22064 * icall.c: Register the new icalls.
22066 * threads.h threads.c: Export the mono_gc_stop_world and
22067 mono_gc_start_world functions.
22069 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
22070 function to fill out the mempool with 0x2a.
22072 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
22074 * reflection.h (MonoReflectionMethodAux): New structure to store
22075 information which is rarely used, thus is not in the MonoMethod
22078 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
22079 store the aux info.
22081 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
22082 and marshalling info into the aux structure.
22084 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
22085 from the aux structure.
22087 * loader.c (mono_method_get_param_names): Retrieve the param names from
22090 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
22092 * exception.h exception.c: Add AppDomainUnloadedException && fix
22095 2003-10-21 Dick Porter <dick@ximian.com>
22098 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
22099 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
22101 2003-10-21 Martin Baulig <martin@ximian.com>
22103 * reflection.c (mono_reflection_bind_generic_parameters):
22104 `klass->parent' is NULL for interfaces.
22106 2003-10-21 Martin Baulig <martin@ximian.com>
22108 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
22110 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
22112 * exception.c (mono_exception_from_name_msg): New helper function for
22113 creating exceptions and initializing their message field.
22115 * exception.c: Simplify functions using the new helper.
22117 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
22120 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
22121 mono_raise_exception, since otherwise gcc doesn't generate the function
22122 epilog for raise_exception, confusing the stack unwinding in the JIT.
22125 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
22126 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
22129 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22131 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
22134 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
22136 * icall.c: Removed GetUninitializedObject method because
22137 AllocateUninitializedClassInstance does the same.
22139 2003-10-18 Martin Baulig <martin@ximian.com>
22141 * class.c (inflate_generic_signature): Renamed to
22142 mono_class_inflate_generic_signature() and made it public.
22143 (my_mono_class_from_generic_parameter): New static function; if we
22144 don't already have the generic parameter's MonoClass, create a
22145 very simple one which is just used internally in the runtime and
22146 not passed back to managed code.
22148 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
22150 * metadata.h (MonoMethodSignature): Moved the
22151 `MonoGenericParam *gen_params' to the MonoMethodHeader.
22152 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
22154 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
22155 ves_icall_MonoMethod_GetGenericArguments(); this is now an
22156 interncall on the MonoMethod class, not on MethodInfo.
22157 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
22158 calling mono_reflection_bind_generic_method_parameters() directly.
22160 * loader.c (mono_method_get_signature): If this is a MethodSpec;
22161 return the already computed `method->signature'.
22162 (method_from_methodspec): New static function to load a method
22163 from a MethodSpec entry.
22164 (mono_get_method_from_token): Call the new method_from_methodspec()
22165 for MethodSpec tokens.
22166 (mono_get_method_from_token): If we're a generic method, load the
22169 * reflection.c (mono_image_get_memberref_token): Allow
22170 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
22172 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
22173 (mono_image_create_token): First check whether it's a generic
22174 method (so we'd need to create a MethodSpec), then do the other
22176 (mono_reflection_bind_generic_method_parameters): Return a
22177 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
22178 called directly from the interncall.
22180 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
22182 * reflection.c (load_public_key): Move loading of the public key
22185 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
22187 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
22190 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
22191 culture, hash_alg and public_key. Fixes #49555.
22193 2003-10-17 Martin Baulig <martin@ximian.com>
22195 * class.h (MonoGenericInst): Moved this declaration here and added
22196 `MonoMethod *generic_method'.
22199 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
22200 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
22202 * metadata.c (mono_metadata_type_equal): Two types of
22203 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
22204 index; ie. don't compare the address of the `MonoGenericParam'
22206 (mono_metadata_load_generic_params): Removed the `MonoMethod
22209 * metadata.h (MonoGenericInst): Moved declaration to class.h.
22210 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
22212 * reflection.c (method_encode_signature): Encode the number of
22213 generic parameters.
22214 (encode_generic_method_sig): New static function.
22215 (method_encode_methodspec): New static function; creates an entry
22216 in the MethodSpec table for a generic method.
22217 (mono_image_get_methodspec_token): New static function.
22218 (mono_image_create_token): Call mono_image_get_methodspec_token()
22219 for generic methods.
22220 (mono_reflection_bind_generic_method_parameters): New public
22221 function. Instantiates a generic method.
22223 2003-10-16 Martin Baulig <martin@ximian.com>
22225 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
22226 *gen_params' here from MonoMethodHeader.
22228 * metadata.c (mono_metadata_parse_method_signature): If we have
22229 generic parameters, initialize `method->gen_params' and then set
22230 the correct `type->data.generic_param' in all the parameters.
22232 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
22234 * threads.c (mono_threads_get_default_stacksize): New function to
22235 return the default stacksize.
22237 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
22238 termination of the finalizer thread, since the previous method had
22239 race conditions. Fixes #49628.
22241 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
22242 as for the other managed threads.
22244 2003-10-16 Martin Baulig <martin@ximian.com>
22246 * class.c (inflate_generic_signature): Copy `generic_param_count'
22249 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
22252 * metadata.c (mono_metadata_parse_method_signature): Actually set
22253 the `method->generic_param_count' here.
22254 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
22256 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
22258 * object.h: Add a new field to TypedRef to simplify the implementation
22259 of the REFANY opcodes in the JIT.
22261 * icall.c: Make use of the new field.
22263 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
22266 2003-10-15 Martin Baulig <martin@ximian.com>
22268 * class.c (mono_class_from_gen_param): Renamed to
22269 mono_class_from_generic_parameter() and moved most of the
22270 functionality from mono_reflection_define_generic_parameter()
22271 here; ie. we create a "real" class here.
22272 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
22273 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
22274 previously been called.
22276 * class.h (MonoGenericParam): Moved the declaration of this struct
22277 here from metadata.h and added `MonoMethod *method'.
22279 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
22282 * loader.c (mono_get_method_from_token): If we have any generic
22283 parameters, call mono_metadata_load_generic_params() to read them
22284 from the MONO_TABLE_GENERICPAR.
22286 * metadata.c (mono_metadata_load_generic_params): Added
22287 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
22289 * metadata.h (MonoMethodSignature): Replaced
22290 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
22291 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
22293 * reflection.c (mono_reflection_define_generic_parameter): Moved
22294 most of the functionality into the new
22295 mono_class_from_generic_parameter(); set the `method' field if
22296 we're a method parameter.
22298 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
22300 * marshal.c (emit_struct_conv): if native size is 0
22303 2003-10-14 Martin Baulig <martin@ximian.com>
22305 * icall.c: The generics API has changed in the spec since it was
22306 added to System.Type; these modifications make it match the spec
22308 (ves_icall_Type_GetGenericParameters): Renamed to
22309 `ves_icall_Type_GetGenericArguments'.
22310 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
22311 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
22312 `ves_icall_MonoType_get_HasGenericArguments'.
22313 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
22314 `ves_icall_MonoType_get_IsGenericParameter'.
22315 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
22316 this is no interncall anymore.
22317 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
22318 `ves_icall_TypeBuilder_get_IsGenericParameter'.
22320 2003-10-14 Martin Baulig <martin@ximian.com>
22322 * reflection.c (mono_reflection_bind_generic_parameters): Also
22323 inflate generic methods if we're reading the class from IL.
22325 2003-10-13 Martin Baulig <martin@ximian.com>
22327 * reflection.c (mono_reflection_define_generic_parameter): This
22328 method isn't called directly from the icall anymore; take a
22329 `MonoReflectionAssemblyBuilder *' so we can use this for type and
22330 method generic parameters.
22331 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
22332 (method_builder_encode_signature): Encode generic parameters.
22333 (mono_image_get_method_info): Write generic params to the
22334 MONO_TABLE_GENERICPARAM table.
22336 * reflection.h (MonoReflectionMethodBuilder): Added
22337 `MonoArray *generic_params'.
22339 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
22341 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
22342 wrapper for mono_reflection_define_generic_parameter().
22343 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
22345 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
22347 * marshal.h: Add missing function to fix build.
22349 * marshal.c (mono_marshal_get_native_wrapper): Add support for
22350 the SetLastError pinvoke attribute.
22352 * marshal.c (mono_marshal_set_last_error): New helper function called
22353 by the generated code.
22355 * marshal.c (mono_mb_emit_branch): New helper function.
22357 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
22359 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
22360 classes as parameters and return values of delegates. Fixes #29256.
22362 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
22364 * locales.c: use gint32 in non HAVE_ICU case
22366 2003-10-11 Martin Baulig <martin@ximian.com>
22368 * mono-debug.c (mono_debug_add_method): Added a workaround for
22371 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
22373 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
22374 delegates passed to native code must use the STDCALL calling
22375 convention. Fixes #35987.
22377 2003-10-10 Martin Baulig <martin@ximian.com>
22379 * class.c (inflate_generic_type): If we're inflating for a generic
22380 type instance (and not for a generic method), return
22381 MONO_TYPE_MVAR unchanged.
22383 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22385 * string-icalls.c: Join ignores null strings in the source array.
22386 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
22387 * threads.c: GetAvailableTheads is slightly more accurate.
22389 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
22391 * threads.h threads.c : add mono_threads_set_default_stacksize
22392 and pass default to CreateThread calls.
22394 2003-10-09 Dick Porter <dick@ximian.com>
22398 * locales.c: Internal calls for constructing CultureInfo and
22399 related objects from libicu (if its available.)
22401 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
22403 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
22405 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22407 * threadpool.c: added an argument to async_invoke_thread that is the
22408 item to process, pass the MonoAsyncResult to the thread start function
22409 when creating a new thread. This way we don't need to acquire any lock
22410 when we're creating a new thread. Readded a semaphore for faster
22411 response times (instead of that Sleep i added).
22413 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
22415 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
22416 get daylight change dates better on Windows, fix handling
22417 of platforms without tm_gmtoff.
22419 2003-10-06 Martin Baulig <martin@ximian.com>
22421 * class.c (inflate_generic_method): Renamed to
22422 mono_class_inflate_generic_method() and made public.
22423 (mono_class_init): Don't inflate the generic methods here.
22424 (mono_class_from_generic): Added `gboolean inflate_methods'
22425 argument. Inflate the methods here.
22427 * loader.c (mono_method_get_param_names): Ignore instances of
22428 generic types for the moment.
22430 * reflection.c (fixup_method): Added support for inflated methods.
22431 (mono_image_create_token): Use mono_image_get_methodref_token()
22432 for inflated methods.
22433 (mono_custom_attrs_from_param): Ignore instances of generic types
22435 (mono_reflection_bind_generic_parameters): New public function.
22436 Moved all the functionality from
22437 ves_icall_Type_BindGenericParameters() here and added support for
22439 (mono_reflection_define_generic_parameter): Initialize
22440 `klass->methods' here.
22442 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
22443 functionality into mono_reflection_define_generic_parameter().
22444 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
22445 TypeBuilder, return that TypeBuilder.
22447 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22449 * appdomain.c: removed mono_delegate_semaphore.
22452 (mono_thread_pool_add): moved hash table creation inside and the thread
22453 creation outside of the critical region.
22454 (mono_thread_pool_finish): removed obsolete code.
22455 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
22456 continue or exit the thread depending on the queue.
22458 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
22460 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
22461 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
22462 handle more bool marshalling options
22464 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
22466 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
22467 arrays of structs. Also add a more descriptive error message when
22468 a structure member is marshalled as LPArray.
22470 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
22472 * marshal.c (mono_marshal_get_native_wrapper): Add support for
22473 marshalling arrays of complex types. Fixes #29098. Also remove an
22474 usused and incomplete function.
22476 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
22478 * gc.c: report heap_size - free_bytes as total memory allocated
22481 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
22483 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
22484 fix timezone handling problems on Windows.
22486 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
22487 asserts when the year is outside the range handled by ms the functions.
22489 * class.c (setup_interface_offsets): If the class is an interface,
22490 fill out its interface_offsets slot.
22492 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22494 * threadpool.c: mark threadpool threads as background.
22496 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
22498 * decimal.c - define DECINLINE to nothing if not using GCC
22500 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
22502 * assembly.c: More refcount fixes.
22504 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22506 * string-icalls.c: if we're not trimming, return the same string.
22507 When not splitting, don't create a new string.
22509 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22512 (mono_image_open): increment the ref_count inside the critical section.
22514 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
22516 * image.c (mono_image_open): Fix reference counting bug.
22518 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
22520 * marshal.c (mono_marshal_type_size) struct alignment changed for
22521 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
22522 64bits. Avoid leak in mono_marshal_get_native_wrapper when
22523 mono_lookup_pinvoke_call throws.
22525 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
22527 * reflection.c (mono_reflection_parse_type): Fix #49114.
22529 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
22530 temporary workaround for cygwin header problem.
22532 * object.c (mono_object_isinst): Synchronize this with the code
22533 generated by the JIT for casts.
22535 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
22537 * reflection.c (encode_type): Fix #38332.
22539 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
22541 * marshal.c (mono_marshal_method_from_wrapper): New function to return
22542 the original method from the wrapper method.
22544 2003-09-25 Martin Baulig <martin@ximian.com>
22546 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
22547 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
22548 (ves_icall_Type_get_IsGenericInstance): New interncall.
22550 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
22552 * object.c: fix cast warning in big endian code.
22554 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
22556 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
22558 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22560 * assembly.c: don't call check_env from mono_assembly_load. It's
22561 already done once in mono_assemblies_init and may cause headaches when
22562 multiple threads are loading assemblies.
22564 2003-09-19 Martin Baulig <martin@ximian.com>
22566 * reflection.c (mono_reflection_define_generic_parameter): Don't
22567 allocate `klass->methods', set `klass->flags' to
22568 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
22570 2003-09-18 Martin Baulig <martin@ximian.com>
22572 * class.c (mono_class_init): Don't create `class->methods' if it's
22573 already initialized.
22575 * metadata.c (mono_metadata_load_generic_params): Make this
22578 * reflection.c (mono_reflection_define_generic_parameter): Set
22579 parent class and interfaces from the constraints.
22581 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
22582 to keep this struct in sync with the declaration in TypeBuilder.cs.
22584 2003-09-17 Martin Baulig <martin@ximian.com>
22586 * metadata.h (MonoType): Replaced the data's `int type_param'
22587 field with `MonoGenericParam *generic_param'.
22588 (MonoGenericParam): Added `MonoClass *klass'.
22590 * class.c (mono_class_from_gen_param): Removed the
22591 `MonoImage *image' and `int type_num' arguments.
22593 * metadata.c (mono_metadata_parse_generic_param): New static
22594 method; creates a MonoGenericParam which just contains the index.
22595 (do_mono_metadata_parse_type): Call
22596 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
22599 * reflection.c (mono_image_typedef_or_ref): Generic type
22600 parameters may be in the same assembly, but never use a typedef
22602 (mono_reflection_define_generic_parameter): We're now creating a
22603 "real" class for the type parameter; it's now safe to call
22604 mono_class_from_mono_type() on the class'es type, it'll do the
22607 2003-09-16 Martin Baulig <martin@ximian.com>
22609 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
22610 `symfile->range_entry_size' and `symfile->class_entry_size' here;
22611 the `symfile' data structure must be fully initialized before it
22612 gets added to the table.
22614 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
22616 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
22618 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
22619 class init trampolines.
22621 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
22623 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
22624 to the built-in profiler to turn off time and allocation profiling
22627 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
22629 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
22632 * debug-helpers.c (mono_method_full_name): Print the wrapper type
22633 in human readable form.
22635 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
22637 * reflection.c icall.c: Fixed warnings.
22639 * image.c (load_class_names): Use a temporary hash table to hold the
22640 namespaces in order to avoid doing many string comparisons.
22642 * image.h: Fix typo.
22644 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
22645 Pass NULL instead of g_direct_equal to the GHashTable constructor
22646 since the NULL case is short-circuited inside g_hash_table_lookup,
22647 leading to better performance.
22649 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
22650 obtain the first custom attribute for a given index. Depends on the
22651 CustomAttribute table being sorted by the parent field.
22653 * reflection.c (mono_custom_attrs_from_index): Use the new function
22654 for better performance.
22656 2003-09-07 Martin Baulig <martin@ximian.com>
22658 * class.c (mono_class_init): If we're a generic instance, inflate
22659 all our methods instead of loading them from the image.
22660 (mono_class_from_generic): Set `class->methods = gklass->methods'.
22662 2003-09-07 Martin Baulig <martin@ximian.com>
22664 * mono-debug-debugger.c: Added support for constructors.
22666 2003-09-06 Martin Baulig <martin@ximian.com>
22668 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
22671 * reflection.c (mono_reflection_setup_generic_class): Call
22672 ensure_runtime_vtable() to create the vtable.
22674 2003-09-05 Martin Baulig <martin@ximian.com>
22676 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
22679 2003-09-04 Martin Baulig <martin@ximian.com>
22681 * reflection.c (mono_reflection_define_generic_parameter): Generic
22682 parameters start with zero.
22684 2003-09-04 Martin Baulig <martin@ximian.com>
22686 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
22688 * reflection.h (MonoReflectionGenericParam): New typedef.
22689 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
22690 the generic parameters from the managed TypeBuilder.
22692 * reflection.c (mono_reflection_define_generic_parameter): New function.
22693 (mono_reflection_create_runtime_class): Encode generic parameters.
22694 (mono_reflection_setup_generic_class): New function; this is
22695 called after adding adding all generic params to the TypeBuilder.
22696 (encode_type): Added MONO_TYPE_VAR.
22698 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
22700 * class.h class.c (mono_class_needs_cctor_run): Moved this method
22703 * assembly.h assembly.c: Moved the AOT loading code into an assembly
22706 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
22708 * reflection.h reflection.c class.h class.c: Delete duplicate
22709 definition of mono_type_get_name () from reflection.c and export the
22712 * class.c: Class loading fixes from Bernie Solomon
22713 (bernard@ugsolutions.com).
22715 * reflection.c: Endianness fixes from Bernie Solomon
22716 (bernard@ugsolutions.com).
22718 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
22720 * assembly.h assembly.c: Define a file format version for AOT
22723 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
22725 * appdomain.h (MonoJitInfo): New field to determine whenever the
22726 code is domain neutral.
22728 2003-08-31 Miguel de Icaza <miguel@ximian.com>
22730 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
22732 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
22734 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
22735 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
22736 Avoid caching the result since strings must be domain specific. Fixes
22739 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
22741 * marshal.c (mono_marshal_init): Make this callable multiple times
22742 since it is hard to find a correct place to call it.
22744 * object.c (mono_runtime_class_init): Execute static constructors in
22745 the correct appdomain.
22747 * image.c (build_guid_table): Handle the case when multiple images have
22750 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22752 * icall.c: added a couple of icalls for System.Web.
22754 2003-08-28 Martin Baulig <martin@ximian.com>
22756 * icall.c (ves_icall_Type_BindGenericParameters): Use
22757 `klass->generic_inst' instead of `&klass->byval_arg' in the
22758 mono_type_get_object() call. The returned type must be
22759 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
22761 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
22765 * object.c (mono_class_proxy_vtable): Make it thread safe.
22767 * pedump.c: Fix warning.
22769 * object.c appdomain.h: Get rid of metadata_section.
22770 It is no longer needed and it was causing deadlocks with domain->lock.
22772 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
22774 2003-08-26 Martin Baulig <martin@ximian.com>
22776 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
22778 2003-08-26 Martin Baulig <martin@ximian.com>
22780 * pedump.c (main): Call mono_metadata_init(),
22781 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
22782 and mono_loader_init().
22784 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
22786 * loader.h: Add missing include to fix build.
22788 * image.h: mono_image_load_references is no more.
22790 * assembly.c: Reworked assembly loading to make it really thread safe.
22791 After these changes, the assembly returned by mono_assembly_open is
22792 fully initialized, i.e. all its references assemblies are loaded.
22794 * assembly.c (mono_image_load_references): Renamed to
22795 mono_assembly_load_references, and made private, since clients no
22796 longer need to call it.
22798 * class.c: Removed calls to mono_assembly_load_references, since it was
22799 a source of deadlocks.
22801 * loader.h loader.c class.h class.c: Protect data structures using a
22802 new lock, the loader lock.
22804 * class.c (mono_class_setup_vtable): Create temporary hash tables and
22805 GPtrArrays only when needed.
22807 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
22808 into empty structures by mcs. Fixes pinvoke7.cs.
22810 * domain.c (mono_init): Call a new initialization function.
22812 * appdomain.c (mono_runtime_init): Call the new initializer function
22813 of the marshal module.
22815 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
22816 inserted into empty structures by mcs. Fixes pinvoke7.cs.
22818 * marshal.h marshal.c: Added locks around the wrapper caches to make
22819 this module thread safe.
22821 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
22822 this argument. Fixes pinvoke1.exe.
22824 2003-08-25 Lluis Sanchez <lluis@ximian.com>
22826 * object.h: Added call_type field to MonoMethodMessage and the corresponding
22827 enumeration of values. Removed fields to store remote call output values in
22828 MonoAsyncResult. Not needed any more.
22829 * object.c: Initialize call_type and async_result fields in mono_message_init.
22830 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
22831 dispatching the message.
22832 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
22833 async call to finish. To do it use a message with EndInvoke call type.
22835 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
22837 * loader.h loader.c (mono_method_hash_marhal_info): New function which
22838 determines whenever a method has marshalling info.
22840 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22842 * assembly.c: fix the build on windows.
22844 2003-08-22 Lluis Sanchez <lluis@ximian.com>
22846 * object.cs: Fixed bug #47785.
22848 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
22850 * string-icalls.c (StringReplace): If their are no occurances of
22851 the old string found return a reference to the supplied
22852 string. This saves some memory and matches MS behavoir.
22854 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22856 * socket-io.c: fixed compilation for systems that define AF_INET6
22857 and don't define SOL_IP/SOL_IPV6.
22859 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
22861 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
22862 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
22864 * rawbuffer.c rawbuffer.h: Make this module thread safe.
22866 * domain.c: Make this module thread safe.
22868 * domain.c (mono_init): Call new initialization function.
22870 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
22871 reference types too. Fixes #38812.
22873 * image.c (mono_image_init): Fixed warnings.
22875 * class.c (mono_class_from_typeref): Handle assembly load failure
22878 * appdomain.c (add_assemblies_to_domain): Handle the case when
22879 the references of an assembly are not yet loaded.
22881 * metadata.c image.c assembly.c: Moved initialization of global
22882 variables to a separate function called at startup since lazy
22883 initialization of these variables is not thread safe.
22885 * image.c assembly.c: Made this module thread safe by adding locks in
22886 the appropriate places.
22888 * domain.c (mono_init): Call the new initialization functions of the
22891 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
22893 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
22894 make a direct call. It is proxy's work to make the call asynchronous.
22895 mono_delegate_end_invoke(): If the targe is a proxy, just collect
22897 * object.cs: mono_method_call_message_new(): read AsyncResult and
22898 state object from parameters list, if this info is requested.
22899 * object.h: Added fields to store remote call output values in
22900 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
22902 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22904 * object.h: add needed fields to MonoThread.
22905 * threads.c, threads.h: allow registering a function to cleanup data
22906 allocated per thread by the JIT.
22908 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22910 * loader.h: portability fix by Bernie Solomon
22911 * <bernard@ugsolutions.com>.
22913 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
22915 * reflection.h reflection.c (mono_param_get_objects): Changed this to
22916 return a MonoArray. This simplifies the code and also ensures that
22917 the cache allways contains an object reference as a value.
22919 * icall.c (ves_icall_get_parameter_info): Simplified using the new
22922 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22924 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
22925 fixes a problem with byte ordering when getting the address family for
22928 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
22930 * .cvsignore: Added monosn.
22932 * reflection.h reflection.c loader.c: Added support for parameter
22933 marshalling to dynamically created types. Fixes #47295.
22935 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
22937 * rand.c: remove useless warnings.
22939 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22941 * class.c: implemented ldtoken for methods and fieldrefs.
22943 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22945 * threadpool.c: when mono_async_invoke was called, no one took care of
22946 monitoring the queue. So if the method invoked took some time and we
22947 got new async invoke requests after 500 ms (the thread created waited
22948 that long in WaitForSingleObject), the new async invoke was not called
22949 until the previous one finished.
22951 This is fixed now. Thanks to Totte for helping with it.
22953 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22955 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
22957 2003-08-11 Martin Baulig <martin@ximian.com>
22959 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
22961 2003-08-06 Martin Baulig <martin@ximian.com>
22963 * mono-debug-debugger.c: Added support for static fields,
22964 properties and methods.
22966 2003-08-06 Martin Baulig <martin@ximian.com>
22968 * mono-debug-debugger.c: Don't store the MonoString's vtable to
22969 make this work for applications with multiple application domains.
22971 2003-08-04 Martin Baulig <martin@ximian.com>
22973 * mono-debug-debugger.c: Completely reworked the type support; the
22974 most important thing is that we're now just using one single
22975 `MonoType' instance per type.
22977 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
22979 * mono-endian.h, mono-endian.c, icall.c: Added icall
22980 ves_icall_System_Double_AssertEndianity to assert double word endianity
22981 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
22983 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
22985 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
22986 support, icalls and fixes.
22988 2003-07-31 Miguel de Icaza <miguel@ximian.com>
22990 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
22991 classes that are a punctuation character in .NET is not the same a
22994 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22996 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
22998 2003-07-29 Miguel de Icaza <miguel@ximian.com>
23000 * icall.c: Add new MemCopy internalcall.
23001 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
23002 Simplified code; It is not necessary to handle all the cases here,
23003 as the C# code takes care of it. Only handle the case of the name
23004 resource embedded into the assembly.
23006 Changed signature to return the data pointer and the size of the
23009 2003-07-26 Miguel de Icaza <miguel@ximian.com>
23011 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
23012 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
23014 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
23016 * socket-io.c: ignore EINTR error in select.
23018 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
23020 * class.h, class.c: removed unused subclasses field in MonoClass.
23022 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
23024 * icall.c: improve fix of get_base_definition(). If the parent class
23025 doesn't have the mehod, look at the parent of the parent.
23026 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
23027 to check if a parameter is an in or out parameter
23028 (PARAM_ATTRIBUTE_IN is not set by default).
23029 mono_method_return_message_restore(): Use mono_class_value_size to
23030 get the size of a value type. mono_type_stack_size (parameterType)
23031 does not return the correct value if parameterType is byRef.
23032 mono_load_remote_field(), mono_load_remote_field_new(),
23033 mono_store_remote_field(), mono_store_remote_field_new():
23034 raise exception if the remote call returns an exception.
23036 2003-07-28 Martin Baulig <martin@ximian.com>
23038 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
23039 method. This is a wrapper around mono_runtime_invoke() which
23040 boxes the instance object if neccessary.
23042 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
23044 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
23045 metadata.h, row-indexes.h, verify.c: first cut of generics support.
23047 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
23049 * icall.c: disable mcs bug workaround.
23051 2003-07-21 Miguel de Icaza <miguel@ximian.com>
23053 * object.c (mono_runtime_class_init): Take the metadata_section
23054 mutex before obtaining the domain mutex.
23056 * appdomain.h: Added definition of metadata_section mutex here.
23058 * object.c: define metadata_mutex here.
23060 2003-07-24 Ravi Pratap <ravi@ximian.com>
23062 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
23065 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
23067 * reflection.c: Fix bug #46669
23069 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23074 * object.h: fill in the type name for TypeLoadException.
23076 2003-07-23 Ravi Pratap <ravi@ximian.com>
23078 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
23079 relationship between TypeBuilders while compiling corlib) and bug
23080 45993 (Array types returned from the runtime while compiling
23081 corlib were from the loaded corlib).
23083 2003-07-22 Martin Baulig <martin@ximian.com>
23085 * mono-debug-debugger.c: Reworked the type support a bit more;
23086 distinguish between types and classes.
23088 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
23090 * icall.c: add IsArrayImpl icall.
23092 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
23094 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
23095 initializing real_size only once. Also fix bug #46602.
23097 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
23099 * object.c: Renamed mono_metadata_section to metadata_section.
23101 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
23103 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
23104 empty array if the type is an array. Fixed.
23105 ves_icall_MonoMethod_get_base_definition: if the base method
23106 is abstract, get the MethodInfo from the list of methods of
23108 * reflection.c: ParameterInfo.PositionImpl should be zero-based
23109 and it was 1-based. Fixed in mono_param_get_objects.
23111 2003-07-20 Martin Baulig <martin@ximian.com>
23113 * mono-debug.h: Set version number to 31.
23114 (mono_debug_init): Added `MonoDomain *' argument.
23116 * mono-debug-debugger.c: Reworked the type support; explicitly
23117 tell the debugger about builtin types; pass the `klass' address to
23120 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
23122 * image.c: Allow new metadata tables to be loaded without a
23123 warning. Also update the warning message to give the new constant value.
23125 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
23127 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
23128 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
23129 array type representation changes.
23131 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
23133 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
23134 on Environment.Exit () call.
23136 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23138 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
23139 requires a matching corlib.
23141 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
23143 * Changelog: My editor decided to add a CR to each line. Sorry about that.
23144 Committed again without the CRs.
23146 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
23148 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
23149 getting it from the "this" socket instance. Did not work
23150 if the socket is a subclass of Socket.
23151 Also fixed bug #35371.
23153 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
23155 * metadata.c: fixed size for TypedByRef.
23156 * loader.c: when searching for a method, consider the vararg amrker.
23157 * unicode.c, decimal.c: constify some arrays.
23159 2003-07-15 Dick Porter <dick@ximian.com>
23161 * socket-io.c: Fixed compilation for gcc < 3.2.
23163 Fixed compilation for machines that don't have AF_INET6 (thanks to
23164 Bernie Solomon <bernard@ugsolutions.com> for that part.)
23166 Fixed compile warnings.
23168 Fixed formatting and line endings.
23170 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
23173 * socket-io.c: Added IPv6 support.
23175 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
23177 * class.c (mono_class_is_assignable_from): New function to implement
23178 the is_assignable_from logic. Used by mono_object_isinst,
23179 Type::IsAssignableFrom () and the interpreter.
23181 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
23182 Object, even interfaces.
23184 * object.c (mono_object_isinst): Implement in terms of
23185 is_assignable_from.
23187 * icall.c (ves_icall_type_is_assignable_from): New icall.
23189 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
23191 * domain.c (foreach_domain): fix compiler warning.
23193 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
23195 * image.c (load_metadata_ptrs): use g_strndup because strndup is
23196 not available on all plattforms
23198 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
23200 * image.h image.c: Store the metadata version string in MonoImage.
23201 * icall.c: New icall to retrieve the image version.
23202 * reflection.c (create_dynamic_image): Fill in the image version field
23203 * reflection.c (build_compressed_metadata): Use the image version
23204 from the image structure.
23206 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23208 * appdomain.c: modified comment.
23209 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
23210 That will be its last iteration when mono_gc_cleanup is called from
23211 mono_runtime_cleanup and before the domain is unloaded.
23215 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
23217 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
23220 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
23222 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
23223 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
23224 Bernie Solomon <bernard@ugsolutions.com>.
23226 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
23228 * object.c, object.h: provide mono_object_new_fast() for faster
23229 allocation in some special cases.
23231 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
23233 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
23234 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
23236 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
23238 * threadpool.c: fix leaks.
23240 2003-07-01 Dick Porter <dick@ximian.com>
23242 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
23243 using MonoGHashTables. Fixes threadpool bug posted to list.
23245 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
23247 * image.h, image.c: added support to load an assembly from a byte array.
23248 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
23249 assembly bundle support.
23251 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
23253 * threadpool.c (mono_thread_pool_add): keep a reference to the
23254 AsyncResult to prevent GC
23256 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
23258 * class.c: leak fix.
23260 2003-06-25 Dick Porter <dick@ximian.com>
23262 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
23263 for the async object, the WaitHandle object will close the handle.
23266 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
23268 * class.c: in mono_array_class_get (), lookup from the hash with the
23269 same type we insert: this works around a bug in
23270 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
23271 lluis. The real fix will have to wait for after the release.
23273 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23275 * icall.c: fix memory leak when getting type members.
23277 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
23279 * reflection.c: added more pubtoken special cases.
23281 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
23283 * class.c: handle field offset correctly when class size
23284 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
23286 2003-06-20 Martin Baulig <martin@ximian.com>
23288 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
23291 2003-06-20 Martin Baulig <martin@ximian.com>
23293 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
23295 2003-06-20 Martin Baulig <martin@ximian.com>
23297 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
23298 just distinguish between variables in registers and variables at
23299 an offset relative to a register.
23301 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23303 * icall.c: #ifdef out latest changes until mcs is fixed.
23305 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
23307 * icall.c: return members in metadata order.
23309 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
23311 * icall.c: avoid infinite loop in GetTimeZoneData.
23313 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
23315 * icall.c: added Marshal.Prelink/All icalls.
23317 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
23319 * object.c, object.h: fix warnings and do some overflow checking
23320 when creating arrays.
23322 2003-06-17 Dick Porter <dick@ximian.com>
23325 * file-io.c: File attributes need to be tweaked slightly when
23326 passed from the managed to the w32 world.
23328 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
23329 * profiler.h profiler-private.h profiler.c: Rework last patch
23330 based on suggestion by Paolo.
23332 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
23334 * profiler.h profiler-private.h profiler.c: Added infrastructure for
23335 instruction level coverage data collection.
23336 * profiler.h profiler.c (: Added new callback function which can be
23337 used by the profiler to limit which functions should have coverage
23339 * profiler.c (mono_profiler_load): Call g_module_build_path to
23340 generate the file name of the profiler library.
23342 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
23344 * profiler.c, profiler.h, profiler-private.h: added basic block
23345 coverage profiling API.
23347 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
23349 * reflection.c (mono_reflection_create_runtime_class): Add support
23350 for events in dynamically generated code.
23352 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
23355 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
23357 * icall.c: when getting timezone info, return reasonable values if we
23358 can't get the actual data.
23360 2003-06-14 Dick Porter <dick@ximian.com>
23362 * threads.c (start_wrapper): Remove the reference to the thread
23363 object in the TLS data, so the thread object can be finalized.
23364 This won't be reached if the thread threw an uncaught exception,
23365 so those thread handles will stay referenced :-( (This is due to
23366 missing support for scanning thread-specific data in the Boehm GC
23367 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
23369 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
23371 * reflection.c: ensure streams and tables are first allocated with
23372 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
23374 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
23376 * icall.c: fixed GetElementType for byrefs (bug# 44792).
23378 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
23380 * reflection.c (mono_reflection_create_runtime_class): Add support for
23381 properties to dynamically created classes.
23382 * reflection.c: Fix a few places where non-MonoObjects were inserted
23383 into the tokens hashtable.
23385 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
23387 * object.c: some support to handle out of memory exceptions.
23389 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
23391 * marshal.c (mono_marshal_get_native_wrapper): support reference
23394 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
23396 * object.h, object.c: more portability stuff from Bernie Solomon.
23397 Unexport mono_object_allocate(). Added mono_object_unbox ().
23398 Set exitcode when an unhandled exception is thrown.
23400 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
23402 * marshal.c (mono_marshal_get_native_wrapper): use custom
23403 marshaler for return types.
23405 2003-06-10 Dick Porter <dick@ximian.com>
23407 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
23408 ip_mreq is available
23410 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
23412 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
23413 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
23414 by Bernie Solomon <bernard@ugsolutions.com>.
23416 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
23418 * gc.c (mono_gc_init): Avoid error message on shutdown when
23419 GC_DONT_GC=1 is used.
23421 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
23422 New icall to return the GUID of a module.
23424 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
23426 * class.c: ensure instance size always includes the parent's size
23427 even whem class size is set explicitly (fixes bug#44294).
23429 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
23431 * profiler.h, profiler.c: made the simple profiler thread-safe,
23432 get more accurate timing info. Allow the loading of an
23433 externally-developed profiler module.
23435 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
23437 * marshal.c (mono_marshal_get_native_wrapper): improved
23438 class/byref arguments.
23439 (mono_marshal_get_native_wrapper): better string marshaling support.
23441 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
23443 * class.c: ensure .pack and .size are handled correctly and
23444 simplified layout of static fields.
23446 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
23449 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
23451 * loader.c (mono_lookup_pinvoke_call): look for modules in the
23452 current directory (fix bug 44008)
23454 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
23456 * marshal.c (mono_marshal_get_native_wrapper): started support for
23458 (mono_delegate_to_ftnptr): consider marshalling specifications
23460 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
23462 * reflection.c, reflection.h: emit custom marshal info.
23464 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23466 * object.c: free the GError.
23467 * icall.c: added CloseEvent_internal.
23469 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
23472 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
23474 * loader.c (mono_method_get_signature): Add support for dynamic
23477 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
23479 * reflection.c: fixed bug #43905.
23481 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
23483 * class.c, domain.c, icall.c, metadata.h, object.h: support for
23484 handling TypedReference and ArgIterator.
23485 * loader.c, loader.h: added function to get signature at call site.
23487 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
23489 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
23490 data readonly. Buglets and warning fixes. Some MethodSpec support.
23492 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
23494 * class.h, class.c, object.c: remove relative numbering support.
23496 2003-05-26 Miguel de Icaza <miguel@ximian.com>
23498 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
23499 free the string, until we get a chance to fix Gtk#
23501 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23503 * marshal.c: revert last patch.
23505 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
23507 * icall.c: updates for new mono_class_vtable() not calling
23508 the type constructor anymore.
23510 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
23512 * object.h, object.c: separate vtable creation from type
23513 initialization. Make running the .cctor thread safe.
23515 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
23517 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
23519 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
23521 * loader.c (mono_get_method): consider calling convention
23523 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
23525 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
23526 to return the invisible global type for a module.
23528 * reflection.c (mono_image_build_metadata): Emit global fields too.
23530 2003-05-20 Peter Williams <peterw@ximian.com>
23532 * loader.c (mono_lookup_internal_call): Add a few newlines.
23534 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
23536 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
23539 * appdomain.c (set_domain_search_path): Recalculate search path when
23540 AppDomainSetup.PrivateBinPath changes.
23542 * object.c (mono_class_compute_gc_descriptor): It turns out some
23543 parts of the class libs (like System.Thread) holds pointers to
23544 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
23545 to treat native int a pointer type here.
23547 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
23549 * appdomain.h, domain.c: add hashtable for jump target resolution.
23551 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
23553 * reflection.h reflection.c icall.c: Added new icalls
23554 GetManifestResourceInfoInternal, GetModulesInternal and support
23557 2003-05-16 Dick Porter <dick@ximian.com>
23561 * file-io.c: Implement System.IO.MonoIO::GetTempPath
23563 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
23565 * object.c: mono_store_remote_field: little fix to previous patch.
23567 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
23569 * class.c: add constructors to array classes.
23570 * icall.c: special case array construction for InternalInvoke (),
23572 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
23574 * class.h class.c reflection.c object.c: Added support for field
23575 defaults in dynamically generated classes.
23577 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
23579 * reflection.c: properly encode charset for ddlimport.
23581 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
23583 * threads.c: allow compiling without GC.
23585 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
23587 * appdomain.h, object.c, object.h, threads.c, threads.h: added
23588 handling of thread static data.
23590 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23592 * reflection.h, reflection.c: added mono_custom_attrs_free ().
23594 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
23596 * class.c (mono_array_class_get): always set the serializable flags
23597 (mono_array_class_get): always set the SEALED attribute for array types
23599 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
23601 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
23602 attributes (fix for bug 42021).
23604 2003-05-12 Dick Porter <dick@ximian.com>
23606 * gc.c: Don't run finalizers when the finalizer thread is
23607 finishing up, because the default domain has already been
23610 2003-05-11 Miguel de Icaza <miguel@ximian.com>
23612 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
23613 value is null, we should throw an exception. This is slightly
23614 different than the other conventions used for the constructor.
23616 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23618 * socket-io.c: fixed windows build.
23620 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23622 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
23624 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
23626 * object.c (mono_string_new_wrapper): Compatibility fix for MS
23629 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
23631 * class.c (mono_class_layout_fields): Add experimental GC aware
23632 auto layout facility. Requires class library changes to work correctly.
23634 (mono_class_setup_vtable): Avoid overriding explicit interface
23635 method implementations. Fixes iface3.exe test.
23637 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
23639 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
23640 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
23642 * metadata.h: Add new type classification macro which determines
23643 whenever the type holds an object reference.
23645 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
23647 * marshal.c (mono_marshal_get_native_wrapper): cleanups
23649 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
23651 * gc.c (finalizer_thread): Work around a GC bug.
23653 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
23655 * marshal.c (emit_struct_conv): allow unions
23657 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
23659 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
23661 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
23663 2003-05-06 Martin Baulig <martin@ximian.com>
23665 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
23667 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23670 (Select_internal): allow NULLs, don't create arrays if not needed.
23671 Coupled with Socket.cs changes.
23674 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
23675 register a finalizer for it that will close the semaphore handle. This
23676 fixes the leak and make Lupus' test run with > 4080 loops.
23678 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
23680 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
23681 Jerome Laban (bug #42287)
23683 2003-05-02 Martin Baulig <martin@ximian.com>
23685 * debug-mono-symfile.h
23686 (MonoSymbolFile): Moved declaration into mono-debug.h.
23687 (MonoDebugMethodJitInfo): Likewise.
23688 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
23690 (_mono_debug_address_from_il_offset): Take a
23691 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
23694 (MonoDebugDomainData): New struct.
23695 (mono_debug_get_domain_data): New function.
23696 (mono_debug_add_method): Take an additional `MonoDomain *'
23698 (mono_debug_source_location_from_address): Likewise.
23699 (mono_debug_il_offset_from_address): Likewise.
23700 (mono_debug_address_from_il_offset): Likewise.
23702 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
23704 * reflection.c: one more check for null type in custom attrs.
23706 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23708 * reflection.c: avoid warning (comparison is always false due to limited
23709 range of data type).
23711 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23713 * icall.c: throw an exception in Type.GetField if the argument 'name'
23716 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
23718 * reflection.c: fixed handling of enums in named arguments to custom
23719 attributes (bug #42123).
23721 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
23723 * reflection.c: use the right array element type and handle
23724 a null for a Type argument, too.
23726 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
23728 * reflection.c: handle arrays as arguments to custom attributes.
23730 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
23732 * reflection.c: handle a string value in a custom attr
23733 ctor that takes an object.
23735 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
23737 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
23740 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
23742 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
23744 2003-04-27 Martin Baulig <martin@ximian.com>
23746 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
23747 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
23748 MONO_DEBUGGER_EVENT_BREAKPOINT.
23749 (mono_breakpoint_trampoline_code): Removed.
23750 (mono_debugger_event_handler): The last argument is now a
23752 (mono_debugger_insert_breakpoint_full): Removed the
23753 `use_trampoline' argument.
23754 (mono_debugger_method_has_breakpoint): Likewise.
23755 (mono_debugger_trampoline_breakpoint_callback): Renamed to
23756 mono_debugger_breakpoint_callback(); take the method and
23757 breakpoint number as arguments.
23759 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
23761 * metadata.c: fix off by one when loading parameters attributes.
23763 2003-04-24 Martin Baulig <martin@ximian.com>
23765 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
23767 2003-04-24 Martin Baulig <martin@ximian.com>
23769 * mono-debug-debugger.c: Moved all code which interacts with the
23770 Mono Debugger here.
23772 * debug-mono-symfile.c: This code now just deals with the symbol
23773 file itself, the debugger code is now in mono-debug-debugger.c.
23775 2003-04-23 Martin Baulig <martin@ximian.com>
23777 * mono-debug.c (mono_debug_source_location_from_il_offset):
23778 New method; like mono_debug_source_location_from_address(), but
23779 takes an IL offset instead of a machine address.
23781 2003-04-23 Martin Baulig <martin@ximian.com>
23783 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
23784 `line' field; this is now computed by the debugger.
23786 2003-04-23 Martin Baulig <martin@ximian.com>
23788 * mono-debug.[ch]: New files. This is the new debugging interface.
23790 * mono-debug-debugger.[ch]: New files. Moved all code which
23791 interacts with the Mono Debugger here.
23793 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
23795 * domain.c (mono_init): initialize mono_defaults.monitor_class
23797 2003-04-21 Miguel de Icaza <miguel@ximian.com>
23799 * reflection.c (method_encode_code): Add a spicy exception to help
23800 future compiler authors.
23802 2003-04-21 Martin Baulig <martin@ximian.com>
23805 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
23806 Make this work with relative pathnames; g_filename_to_uri() needs
23807 an absolute filename.
23809 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
23811 * icall.c: Track name changes in Object and ValueType.
23813 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
23815 * metadata.c (mono_type_stack_size): size should be a multiple of
23818 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23821 (internal_domain_finalize): moved into mono_domain_finalize. No need
23822 to create another thread because the finalizers will be run in the
23825 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
23826 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
23827 to be run (MS does this too).
23829 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
23831 * object.c (mono_class_compute_gc_descriptor): Update comment.
23833 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
23835 * image.h: Add synchronized wrapper cache.
23837 * image.c (do_mono_image_open): Initialize cache.
23839 * reflection.c (create_dynamic_mono_image): Initialize cache.
23841 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23843 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
23844 ves_icall_System_Buffer_ByteLengthInternal.
23846 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
23848 * reflection.c: setup klass->nested_in earlier. Allow
23849 a dash in the assembly name.
23851 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
23853 * metadata.c (mono_type_to_unmanaged): dont access
23854 type->data.klass for MONO_TYPE_OBJECT
23855 (mono_type_to_unmanaged): consider System.Delegate class
23857 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
23859 * class.c: just setup supertypes in the proper place instead of
23860 initializing the full element class for arrays.
23862 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
23864 * class.c: ensure the element class of arrays is initialized.
23865 Setup the supertype info for array classes, too.
23867 2003-04-14 Miguel de Icaza <miguel@ximian.com>
23869 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
23871 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23873 * Makefile.am: re-added -m option when running cygpath. This way,
23874 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
23876 * mono-config.c: same codepath for locating mono config file for WIN32
23878 * assembly.c: if mono_assembly_setrootdir is called, don't override
23881 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23883 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
23884 MONO_ASSEMBLIES variable.
23886 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
23888 * icall.c: added Assembly::GetNamespaces() icall.
23890 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23892 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
23894 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
23896 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
23897 * object.c: fixed bug in the construction of vtable for proxies
23899 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
23901 * object.c (mono_array_new): Mark mono_array_new as an icall.
23903 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23905 * class.c: fixed test for public method when overriding interfaces.
23908 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23910 * appdomain.h, domain.c: added mono_domain_foreach() to
23911 be able to access the currently loaded appdomains.
23912 * object.c: make string interning work across sppdomains.
23913 Mark some functions for use as icalls.
23915 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
23917 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
23919 * reflection.h reflection.c: Allocate long living data using
23920 GC_MALLOC_ATOMIC so the collector does not need to scan it.
23922 * reflection.c: Double the allocation size in streams instead of
23923 increasing it, to prevent unneccesary copying on large assemblies.
23925 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
23926 creation if the assembly does not have the Run flag set.
23928 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
23930 * class.h: avoid the C++ keywords in header files (Jerome Laban
23931 spotted and fixed this).
23933 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23936 (mono_unhandled_exception): fill in the arguments for the
23937 UnhandledException event. Only trigger that event for the default
23938 domain (as MS does).
23940 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
23942 * object.c: Improve typed allocation stuff based on suggestions from
23943 Paolo. Also turn it on if the GC library supports it.
23945 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
23947 * object.c object.h class.h: Added experimental typed allocation
23948 facility using the interfaces in gc_gcj.h.
23950 * os/gc_wrapper.h: Added new include files.
23952 2003-04-03 Martin Baulig <martin@ximian.com>
23954 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
23955 which is not yet enabled by default.
23957 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
23959 (mono_gc_lock, mono_gc_unlock): New static functions.
23961 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
23962 functions; stop/start the world for the garbage collector. This
23963 is using the windows API; we need to complete the SuspendThread()/
23964 ResumeThread() implementation in the io-layer to make this work on Unix.
23965 (mono_gc_push_all_stacks): New public function; tells the garbage
23966 collector about the stack pointers from all managed threads.
23968 2003-04-03 Martin Baulig <martin@ximian.com>
23970 * object.h (MonoThread): Added `gpointer stack_ptr'.
23972 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
23974 2003-04-03 Martin Baulig <martin@ximian.com>
23976 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
23978 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
23980 * reflection.c (typebuilder_setup_fields): Initialize field.first and
23983 2003-04-02 Miguel de Icaza <miguel@ximian.com>
23985 * loader.c (mono_lookup_internal_call): Report the corlib that is
23988 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
23990 * icall.c (ves_icall_type_GetTypeCode): fixed check for
23991 System.DBNull (it's class not valuetype).
23993 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
23995 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
23996 if the array method was already assigned a token (fixes bug#40646).
23998 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
24000 * reflection.c (mono_reflection_get_type): Attempt type resolve even
24001 if no assembly is given.
24003 2003-04-01 Miguel de Icaza <miguel@ximian.com>
24005 * metadata.h: Added the new tables.
24007 * row-indexes.h: Added definitions for new tables.
24009 * metadata.c: Add schemas for new tables, and add support for
24010 computing the sizes of them.
24012 * class.c: Update for handling the new type cases.
24014 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
24016 * metadata.h (MONO_TYPE_IS_VOID): new macro
24018 2003-03-31 Martin Baulig <martin@ximian.com>
24020 * threads.h (MonoThreadCallbacks): Added `thread_created'.
24022 * threads.c (mono_thread_new_init): Call `thread_created' in the
24023 mono_thread_callbacks.
24025 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
24027 * loader.h: added marshalbyrefobject_class to mono_defaults
24028 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
24029 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
24030 generation of output parameters.
24031 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
24032 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
24033 contextbound and the target object belongs to the context of the caller.
24034 * object.h: added context and unwrapped_server variables in MonoRealProxy.
24035 * object.c: Implemented support for interfaces and abstract classes
24036 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
24037 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
24039 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
24041 * class.h class.c (mono_class_is_subclass_of): New function.
24043 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
24044 routines for most common case (calls from ArrayList::ToArray).
24046 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
24047 routine so programs which call Environment::Exit() can be profiled.
24049 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
24050 Added MONO_ARCH_SAVE_REGS.
24052 * icall.c (ves_icall_type_is_subtype_of): Use new function.
24054 2003-03-29 Miguel de Icaza <miguel@ximian.com>
24056 * blob.h: Add a couple of new MonoType types definitions.
24058 * tabledefs.h: Add a couple of new call convs.
24060 2003-03-27 Zoltan Varga <vargaz@freemail.h>
24062 * reflection.h (MonoReflectionDynamicAssembly): track changes in
24063 the layout of the class.
24065 * reflection.c (alloc_table): double the size on overflow to avoid
24066 unnecessary copying.
24068 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
24069 avoid filling out metadata tables and blobs. Also set mb->ilgen to
24070 null so it can be garbage collected.
24072 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
24074 * reflection.c (mono_reflection_get_type): Return the resolved type
24075 only if it is in the assembly we searched.
24077 * reflection.c (ensure_runtime_vtable): Initialize method slots.
24079 * class.c (mono_class_setup_vtable): Set the slot of the overriding
24082 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24085 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
24086 the right one is 'file:///blah', but MS allows it.
24088 (mono_assembly_open): allow 'file://blah'
24090 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
24092 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
24094 * socket-io.c: fixes bug #40310.
24096 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
24098 * reflection.c (mono_reflection_parse_type): handle deeply nested
24101 * reflection.c (mono_image_create_token): Use unique token values
24102 since they will be put into a hash table.
24104 * class.c (mono_class_setup_vtable): If a method occurs in more than
24105 one place in the vtable, and it gets overriden, then change the
24106 other occurances too.
24108 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
24109 object as return type.
24111 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
24113 * icall.c: Deleted "ToString" implementation for double and float
24114 because they are full implemented in managed code.
24116 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
24118 * reflection.c, reflection.h: implemented and exported functions
24119 to retrieve info about custom attributes.
24121 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24123 * appdomain.c: moved Uri handling to assembly.c
24124 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
24125 work when using a file Uri in *nix and windows.
24127 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
24128 GetReferencedAssemblies.
24130 2003-03-18 Dick Porter <dick@ximian.com>
24132 * icall.c: Rename a couple of internal calls
24134 * threads.c: Set the thread state to Stopped when a thread exits.
24137 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
24139 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
24142 * object.c (mono_class_vtable): fix warning.
24144 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
24146 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
24148 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
24150 (method_encode_clauses): Create exception info structures in the right
24152 (mono_reflection_setup_internal_class): Initialize supertypes field.
24154 * class.c object.c: Handle interfaces which implement other interfaces
24157 * class.h class.c: Move the supertypes array initialization code into
24158 a separate function so it can be used for dynamic types too. Also call
24159 it earlier, in mono_class_init(), since it can be used before the
24160 type is initialized.
24162 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24166 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
24171 * object.c: remove warnings.
24173 2003-03-13 Martin Baulig <martin@ximian.com>
24175 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
24176 (MonoDebugLexicalBlockEntry): New types.
24178 * debug-mono-symfile.c
24179 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
24181 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24183 * process.c: ret can be any non-zero value accroding to MS doc.
24185 2003-03-07 Miguel de Icaza <miguel@ximian.com>
24187 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
24188 fixing a warning for a miss-used prototype, would have cause
24189 random memory corruption.
24191 2003-03-07 Martin Baulig <martin@ximian.com>
24193 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
24194 getting really annoying ....
24196 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
24198 * reflection.c (fixup_method): added support for array methods.
24200 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
24202 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
24203 (pointed out by Michael Adams).
24205 2003-03-04 Dick Porter <dick@ximian.com>
24207 * icall.c: Temporarily reverted the Double and Single ToString()
24208 change, because it broke nunit.
24210 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
24212 * object.h, threads.h: make include files compatible with C++
24213 (patch by Jerome Laban <jlaban@wanadoo.fr>).
24215 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
24217 * icall.c: Erased ToString helper functions for Double and Single.
24218 Now, that implementations ar all in managed code (Double and Single
24221 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
24223 * appdomain.c: Added method for initializing the default context of
24224 a domain. Added internal call for getting the default context.
24225 * appdomain.h: Added context variable in MonoDomain struct.
24226 * domain.c: mono_domain_set also sets the default context of the domain
24227 * icall.c: Mapped internal method InternalGetDefaultContext.
24228 * object.c: mono_object_get_virtual_method returns always a remoting
24229 wrapper if the object is a transparent proxy.
24230 mono_runtime_invoke_array: when creating an object by calling the
24231 constructor, if the created object is a proxy, then the constructor should
24232 be called using the a remoting wrapper.
24234 2003-03-03 Dick Porter <dick@ximian.com>
24236 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
24237 variable so it compiles on solaris. Problem spotted by
24238 Christopher Taylor <ct@cs.clemson.edu>
24240 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24243 (get_info_from_assembly_name): don't leak value.
24246 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
24249 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
24251 * assembly.c: export mono_image_load_references ().
24252 * class.c: handle function pointers. mono_class_from_name() now
24253 supports nested type names directly.
24255 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
24257 * reflection.h reflection.c: Encode already created dynamic methods
24258 and fields correctly as a DEF instead of a REF.
24260 * reflection.c: Get rid of the force_ref argument to
24261 mono_image_typedef_or_ref since it was wrong in the first place.
24263 * string-icalls.c: add error checking to string constructors according
24266 * reflection.c: Emit types in the order their TypeBuilders were
24267 created. Previously, a new table index was assigned to each type before
24268 the tables were emitted. This was wrong because the signature blob
24269 might already refer to a type by its original table index.
24271 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
24273 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
24276 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24278 * Makefile.am: make assemblies dir have \ instead of / on windows.
24280 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
24282 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
24283 iterate over the NESTEDCLASS table using a linear search since the
24284 table is not guaranteed to be sorted by the secondary key.
24286 * class.c (mono_class_create_from_typedef): fixed up call to
24287 mono_metadata_nesting_typedef.
24289 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
24291 * marshal.c (mono_string_to_byvalstr): clear the memory as
24292 suggested by Jerome Laban <jlaban@wanadoo.fr>
24294 2003-02-26 Dick Porter <dick@ximian.com>
24296 * process.c: Cope with padding in .rsrc blocks
24298 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
24300 * metadata.h: reverted the filter_len change, it breaks reflection
24302 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
24304 * metadata.h: added a new field to store the filter_len
24307 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
24309 * reflection.c: handle custom attributes for types and members
24310 created with Reflection.Emit (bug#38422).
24312 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
24314 * reflection.c: define RTSpecialName automatically for constructors for
24315 compatibility with MS.NET.
24317 * reflection.c (mono_reflection_create_runtime_class): initialize
24318 nested_in field of dynamically created classes.
24320 2003-02-22 Martin Baulig <martin@ximian.com>
24322 * debug-mono-symfile.h: Incremented version number.
24324 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
24326 * object.h icall.c process.c: fix warnings.
24328 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
24330 * appdomain.h appdomain.c:
24331 (mono_domain_try_type_resolve): split the
24332 name_or_tb argument into a name and a tb argument.
24333 (mono_domain_has_type_resolve): new function to check whenever the
24334 application has registered a TypeResolve event handler.
24336 * icall.c reflection.h reflection.c: move the type resolve logic into
24337 mono_reflection_get_type () so it will be invoked when
24338 Assembly::GetType () is called.
24341 (mono_reflection_get_type): renamed to get_type_internal.
24342 (mono_reflection_get_type): fixed type name generation so it works
24343 for nested types too.
24344 (mono_reflection_get_type): call has_type_resolve () to avoid the
24345 costly type name generation if there is no resolve event handler.
24347 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
24349 * class.c, image.c: load exported types from file references.
24351 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
24353 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
24354 used to cache the managed methods used to create proxies and make
24355 remote invocation of methods.
24356 * class.h: Added in MonoVTable a flag to indicate that a class needs
24357 to be remotely created.
24358 * object.c: Modified the method mono_class_vtable(). It now initializes
24359 the remote flag of the vtable. Modified mono_object_new_specific(),
24360 so now it checks the remote flag.
24361 * icall.c: Added a couple of internal methods, one for enabling instance
24362 creation interception for a type, and one for creating objects bypassing
24365 2003-02-18 Martin Baulig <martin@ximian.com>
24367 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
24368 New interncall to get a method's metadata token.
24370 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
24371 New interncall for the debugger.
24373 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
24375 * class.c (mono_class_setup_vtable): allocate supertype array
24377 2003-02-18 Martin Baulig <martin@ximian.com>
24379 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
24381 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24384 (assembly_name_to_aname): jump over unknown properties (i've found
24385 something like: 'type, assembly, version=xxx, custom=null, public...',
24386 so now will ignore custom=null and still get the rest of the values).
24388 2003-02-17 Dick Porter <dick@ximian.com>
24390 * threads.c: Have Thread.Start() wait for a semaphore to signal
24391 that the thread has set up all its local data. This fixes bug
24392 34323, where Abort() raced the new thread's TLS data.
24394 Also removes the handle_store() call from start_wrapper, because
24395 threads are now always created suspended and there is no longer a
24396 race between the parent and child threads to store the info.
24398 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
24400 * image.c: explain the #- heap issue in a message, hopefully
24401 avoiding FAQs on mono-list.
24403 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24406 (GetEntryAssembly): if the domain has not invoked
24407 AppDomain.ExecuteAssembly yet, return the assembly of the default
24410 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
24412 * class.c (mono_ldtoken): make it work in dynamic assemblies.
24414 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
24416 * metadata.c, reflection.c: simple speedup to type hash
24419 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
24421 * image.c, image.h, class.c, assembly.c: move module loading
24422 to MonoImage. When loading metadata, consider alignemnet from
24423 the start of metadata, not from the metadata address in memory.
24425 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
24427 * reflection.c (mono_reflection_get_custom_attrs): Added support for
24428 AssemblyBuilder objects. Factored out custom attribute creation into
24429 a separate function.
24430 (create_custom_attr): new function to create custom attributes.
24432 2003-02-12 Miguel de Icaza <miguel@ximian.com>
24434 * Makefile.am: Got tired of typing the full pathname to pedump.
24435 Until there is another option, am installing this.
24437 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
24439 * class.c (class_compute_field_layout): always set field->parent
24440 (mono_ldtoken): use mono_defaults.fieldhandle_class;
24442 2003-02-11 Dick Porter <dick@ximian.com>
24445 * monitor.c: Rewrote Monitor, making lock much faster and
24446 Pulse/Wait work as specified. Also uses much fewer handles, and only
24447 creates them as needed.
24449 * exception.c: Added SynchronizationLockException
24451 * threads.c: Deleted old Monitor implementation. The new one is
24454 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
24456 * class.c: handled TypedReference type code. Set the correct size for
24457 class data. Setup interface_offsets for interface classes, too.
24459 2003-02-09 Martin Baulig <martin@ximian.com>
24461 * debug-mono-symfile.h: Reflect latest symbol writer changes.
24463 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
24465 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
24466 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
24467 * object.c: fixed mono_object_get_virtual_method () for interfaces.
24468 * verify.c: check for code that runs after the end of the method.
24470 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
24472 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
24473 "System.Math::Round2".
24474 * sysmath.h: Added Floor, Round and Round2 definitions.
24475 * sysmath.c: Modified certain functions that were not 100% compliant
24476 with MS.NET (math precision) and added the implementation of Floor,
24479 2003-02-07 Martin Baulig <martin@ximian.com>
24481 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
24483 2003-02-07 Martin Baulig <martin@ximian.com>
24485 * debug-mono-symfile.c: Reflected latest symwriter changes.
24486 (mono_debug_create_mono_symbol_file): Removed.
24487 (mono_debug_open_mono_symbol_file): Take an argument which
24488 specifies whether to create a dynamic symbol file.
24490 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
24492 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
24494 2003-02-05 Martin Baulig <martin@ximian.com>
24496 * reflection.c (mono_image_build_metadata): Make this public,
24497 protect it against being called multiple times, don't create
24498 resources and don't build the compressed metadata here.
24499 (mono_image_create_pefile): Do this here.
24502 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
24504 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24506 * socket-io.c: fixed bug #36322.
24508 2003-02-06 Piers Haken <piersh@friskit.com>
24512 * debug-mono-symfile.c:
24518 * socket-io.c: warning cleanups
24520 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
24522 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
24523 function. works like remoting invoke, but does a check for the Proxy first.
24525 2003-02-05 Miguel de Icaza <miguel@ximian.com>
24527 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
24529 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
24531 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
24533 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
24534 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
24536 * object.c (mono_store_remote_field_new): used by the new jit
24537 instead of mono_store_remote_field
24538 (mono_load_remote_field_new): used by the new jit
24539 instead of mono_load_remote_field
24541 2003-02-05 Patrik Torstensson
24543 * appdomain.c: changed unload to take the domain id instead
24546 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
24549 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24551 * appdomain.c: don't look for assemblies in ApplicationBase if
24552 PrivateBinPathProbe is set.
24554 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24556 * object.c: make the first argument in main_args contain the absolute
24557 path to the assembly. Fixes bug #37511.
24559 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24561 * icall.c: get correct UTC offset for countries not using daylight
24562 time saving. Fixes bug #30030.
24564 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24566 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
24567 and 1 are the family).
24569 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
24571 * icall.c (ves_icall_InternalExecute): removed wrong assertion
24573 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
24575 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
24577 * reflection.c: added support for SignatureHelper tokens, which is
24578 needed by the Calli opcode.
24580 * reflection.h: track changes to SignatureHelper class.
24582 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
24584 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24586 * appdomain.c: fixed loading assemblies from PrivateBinPath.
24588 2003-02-03 Patrik Torstensson
24589 * appdomain.[c|h], domain.c :
24590 - Added support for getting a domain via domain id
24591 - Support for setting and getting domain from System.AppDomain
24592 (used in cross appdomain channel)
24593 - Added support for get/set for a MonoAppContext on a thread
24594 (Context class in System.Runtime.Remoting.Contexts),
24595 - Removed hack in Get/SetData and ExecuteAssembly.
24597 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
24598 the managed world to get control when a proxy is created.
24600 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
24602 2003-02-03 Miguel de Icaza <miguel@ximian.com>
24605 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
24606 Populate the codebase field as well.
24608 2003-02-02 Martin Baulig <martin@ximian.com>
24610 * debug-mono-symfile.c
24611 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
24612 (mono_debug_symfile_add_method): Allow interncalls.
24614 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24616 * icall.c: throw parse exception if strtod fails or the string is empty.
24618 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
24620 * marshal.c: handle object type separately from defined
24623 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
24625 * marshal.c: handle NATIVE_LPSTR for strings when it's
24626 explicitly specified.
24628 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
24630 * reflection.c, reflection.h, icall.c: setup the reflection
24631 handle cache for ModuleBuilders and AssemblyBuilders.
24633 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
24635 * reflection.c (reflection_methodbuilder_to_mono_method): set
24638 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24640 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
24642 2003-01-29 Dick Porter <dick@ximian.com>
24644 * threads.c: No need for the fake_thread kludge now that Thread
24645 doesn't run a class constructor
24647 2003-01-29 Dick Porter <dick@ximian.com>
24649 * threads.c: Use g_direct_hash instead of the rather bogus
24652 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
24654 * marshal.c (mono_marshal_get_native_wrapper): add check for null
24655 (fix pinvoke12.exe)
24656 (mono_marshal_get_struct_to_ptr): generate valid IL code
24657 (mono_marshal_get_ptr_to_struct): generate valid IL code
24658 (*): correctly set sig->pinvoke, we need to memdup the signature
24661 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
24663 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
24664 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
24666 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
24668 * profiler.c: provide more callers information.
24670 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
24672 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
24674 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
24676 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
24678 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24680 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
24681 exception instead of going into an infinite loop on dates which it
24684 * string-icalls.c (ves_icall_System_String_get_Chars): raise
24685 out-of-range exception if needed.
24687 * class.c (mono_class_setup_vtable): allow a virtual method to provide
24688 an implementation for an interface method and to override an inherited
24689 method at the same time.
24690 Imagine a scenario when a virtual method is used to override a
24691 virtual abstract method in a parent class, and this same method
24692 provides an implementation for an method inherited from an interface.
24693 In this case, the interface resolution code will set im->slot, which
24694 means that the virtual method override pass will skip this method
24695 which means a pointer to the abstract method inherited from the parent
24696 will remain in the vtable of this non-abstract class.
24698 * class.c: (mono_class_setup_vtable): continue search for a real
24699 method if only an abstract method is found.
24701 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
24703 * reflection.c: add size to encoding for ByValStr and ByValArray
24704 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
24706 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24708 * class.c (mono_class_setup_vtable): pass the override info as an
24711 * class.c (mono_class_setup_vtable): set the slot of overriding methods
24714 * reflection.c (ensure_runtime_vtable); add support for method
24717 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24719 * reflection.c (resolution_scope_from_image): Hack to work to work with
24720 dynamic assemblies.
24722 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
24723 added a 'force_ref' argument to force this function to allways return
24724 a TypeRef. This is needed by mono_image_get_memberref_token ().
24726 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24728 * reflection.c (mono_image_get_type_info): interfaces really don't have
24731 * reflection.c (mono_image_basic_init): fill out missing fields of
24734 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
24735 dynamic assemblies. This is required so dynamic assemblies show up in
24736 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
24737 Type::GetType() etc. This is consistent with MS behaviour.
24739 * image.c image.h reflection.c: add newly created classes to the name
24740 cache so mono_class_get () will find them.
24742 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24744 First part of changes to get IKVM.NET running under mono.
24746 * appdomain.h, appdomain.c: added new function
24747 mono_domain_try_type_resolve() which will emit TypeResolve events.
24748 This function will call AppDomain::DoTypeResolve to do the actual work.
24750 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
24751 moved existing code dealing with dynamic tokens to a new function
24752 called mono_reflection_lookup_dynamic_token (). This function will
24753 raise TypeResolve events when appropriate. Since reflection.c is not
24754 part of libmetadata, a new hook function called
24755 mono_lookup_dynamic_token() is added to class.c which will call this.
24757 * assembly.h assembly.c: make the invoke_load_hook function public,
24758 so it can be called for dynamic assemblies.
24760 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
24762 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
24765 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
24766 MonoGHashTable, since it contains pointers to objects which the GC
24769 * assembly.c (search_loaded): remove unused variable.
24771 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
24773 * object.c: fixed issue exposed by gcc-generated IL programs
24774 that use RVA data for pointers.
24776 2003-01-25 Martin Baulig <martin@ximian.com>
24778 * threads.c (start_wrapper): Moved the initialization of
24779 `start_func' above the mono_new_thread_init() call to which we
24780 pass it as argument.
24782 2003-01-24 Martin Baulig <martin@ximian.com>
24784 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
24785 the MonoThread pointer.
24787 2003-01-21 Miguel de Icaza <miguel@ximian.com>
24789 * icall.c: Rename `PowImpl' to Pow.
24791 2003-01-23 Dick Porter <dick@ximian.com>
24793 * threads.c (start_wrapper): Create a Thread object if needed, so
24794 the Main() thread can do the class initialisation in a subthread
24795 that has been set up to allow managed code execution.
24797 Pass the thread ID instead of the MonoThread pointer to the thread
24798 start and attach callbacks. This change is required, because the
24799 jit thread start callback must be called _before_ the Thread
24800 object can be created.
24802 (mono_thread_init): Removed much object creation code that is no
24803 longer needed. No managed code is called from here now.
24805 * object.c (mono_runtime_exec_managed_code): Create a subthread
24806 for Main, and call back to the runtime to use it.
24807 Set the exit code when Main exits.
24809 * gc.c: Make sure domain finalisation happens in a subthread.
24810 Re-enable threaded GC, fixing bug 31333 (again).
24812 * environment.c: System.Environment internall calls (so far just
24813 ExitCode is here, the others are still in icall.c)
24815 * appdomain.c (mono_runtime_cleanup): All threads running managed
24816 code should have finished before mono_runtime_cleanup() is
24817 reached, so no need to clean up threads.
24819 2003-01-22 Martin Baulig <martin@ximian.com>
24821 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
24822 `gpointer func' arguments.
24823 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
24824 but added `MonoThread *thread' argument.
24825 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
24827 * threads.c (mono_new_thread_init): Added `gpointer func' argument
24828 and pass it to the mono_thread_start_cb callback.
24829 (mono_install_thread_callbacks): New public function to install a
24830 set of callbacks which are set by the debugger.
24831 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
24833 2003-01-22 Martin Baulig <martin@ximian.com>
24835 * Makefile.am: Install debug-mono-symfile.h.
24837 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
24839 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
24841 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
24843 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
24844 * class.c (mono_ptr_class_get): correctly set access levels of pointers
24845 (mono_array_class_get): correctly set access levels of arrays
24847 2003-01-20 Patrik Torstensson
24848 * image.h (MonoAssemblyName): changed major, minor, build, revision
24849 from signed to unsigned.
24851 2003-01-20 sean kasun <skasun@azstarnet.com>
24853 * reflection.c (load_cattr_value): Now this handles
24854 MONO_TYPE_SZARRAY. Fixes bug #35629
24856 2003-01-20 Miguel de Icaza <miguel@ximian.com>
24858 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
24861 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24863 * decimal.c: fixed bug #26056.
24865 2003-01-17 Martin Baulig <martin@ximian.com>
24867 * gc.c: Raise an ExecutionEngineException instead of using g_error().
24869 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24872 (mono_get_exception_type_initialization): new function.
24874 * object.c: throw a TypeInitializationException when an exception is
24875 thrown invoking the class constructor.
24877 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24879 * reflection.c: fixed attribute reading.
24881 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24884 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
24885 provided, look for the type in the calling assembly and then in
24886 mscorlib; if the assembly name is provided, only try that one.
24888 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
24890 * object.c: register the vtable before there is a chance it's
24891 queried again recursively.
24893 2003-01-13 Duncan Mak <duncan@ximian.com>
24895 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
24898 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
24900 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
24902 2003-01-11 Martin Baulig <martin@ximian.com>
24904 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
24905 this to 20 for the release.
24907 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
24909 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
24911 * loader.c (mono_method_get_marshal_info): bug fix
24913 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
24914 structures with explicit layout
24916 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
24918 * profiler.c: made the output more readable (and sorted).
24919 Added caller information for the allocation profiler.
24921 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
24923 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
24925 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24927 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
24928 to get value types.
24930 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
24932 * object.c, profiler.h, profiler.c, profiler-private.h:
24933 Added object allocation profiler.
24935 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
24937 * reflection.h, reflection.c: handle global methods.
24938 Compress blob entries.
24940 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
24942 * marshal.c: fix compilation.
24944 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
24946 * loader.c (mono_method_get_marshal_info): impl.
24948 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
24950 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24952 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
24953 for reference types.
24955 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
24957 * loader.c: fixed off by one error in loaded parameter names.
24959 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
24961 * marshal.c (mono_marshal_get_icall_wrapper): like
24962 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
24963 instead of a MonoMethod.
24965 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24967 * decimal.c: fixed bug #36537.
24969 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
24971 * marshal.c: throw a missing method exception if a
24972 P/Invoke method is not found.
24974 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
24976 * icall.c: allow a null this for constructors.
24978 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
24980 * icall.c: raise the proper exceptions if the arguments to the
24981 internal Invoke are incorrect.
24983 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
24985 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
24987 2003-01-03 Martin Baulig <martin@ximian.com>
24989 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
24991 2002-12-31 Martin Baulig <martin@ximian.com>
24993 * debug-mono-symfile.c: Completely rewrote the type section.
24994 Instead of using individual malloc()ed fields, we use one big
24995 continuous memory area and offsets into this area.
24996 See the comments in the source code for details.
24998 2002-12-30 Martin Baulig <martin@ximian.com>
25000 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
25002 2002-12-30 Martin Baulig <martin@ximian.com>
25004 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
25005 line number table in this data blob instead of using an external
25008 2002-12-28 Martin Baulig <martin@ximian.com>
25010 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
25012 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
25014 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
25015 as a boxed return type.
25017 2002-12-21 Miguel de Icaza <miguel@ximian.com>
25020 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
25021 g_build_filename to properly get separators on the filename created.
25023 * object.h: Small change, introduce MonoMarshalByRefObject to
25024 track the layout of that structure in the C# universe as we make
25027 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
25029 * object.c: removed assert to allow static fields on interfaces.
25030 * loader.c: a TypeSpec may be used for any type, not just arrays.
25032 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
25034 * class.c, class.h: added mono_class_array_element_size ().
25035 Ignore static methods in interfaces.
25037 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25039 * threads.c: fixed the build under cygwin.
25041 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
25043 * reflection.c: handle nullref constants. Allocate keys for
25044 reflection handles with the GC.
25046 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
25048 * threads.c, threads.h: added mono_thread_get_abort_signal()
25049 to get a suitable signal for thread abort.
25051 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
25053 * metadata.c: fix handling of ExportedType table.
25055 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25057 * icall.c: added WriteWindowsDebugString internal call.
25059 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25061 * reflection.h: added fields to match C# implementation.
25063 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25065 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
25067 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
25069 * gc.h, gc-internal.h: Rename header for GC internal calls to
25070 gc-internal.h from gc.h as to not clash with Boehm GC having its
25071 header installed as <gc.h> in outside include paths.
25072 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
25073 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
25075 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25077 * icall.c: assign minor, build and revision in FillName.
25079 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
25081 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
25082 Added support for running code generated by Reflection.Emit.
25084 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25086 * appdomain.c: check for NULL argument in LoadFrom.
25088 2002-12-10 Dick Porter <dick@ximian.com>
25090 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
25092 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25094 * appdomain.c: fix buglet when building exe file name. Handle full
25095 assembly name (needed after latest changes to AssemblyName).
25097 (mono_image_close): free some hashtables.
25099 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
25101 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
25102 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
25103 on some systems (redhat 7.3)
25105 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
25107 * threads.c: delete the critical section of a sync block,
25108 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
25110 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
25112 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
25114 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25116 * appdomain.[ch]: handle the assembly preload event to try loading the
25117 assemblies using the paths we have in the current domain.
25119 * assembly.[ch]: created an assembly preload hook that is called to try
25120 loading the assembly by other means that the ones provided here.
25122 * domain.c: initialize the domain search path.
25124 From now on, assemblies (TODO: except corlib and System) are loaded
25125 according to these rules when using mono_assembly_load ():
25127 1. It tries to load the assembly from the ApplicationBase
25128 of the current domain appending .dll and .exe (TODO: have to
25129 try loading from name/name.dll and name/name.exe).
25131 2. It tries the search path specified in PrivateBinPath for the
25132 current domain (if any).
25134 3. Previous behavior.
25136 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
25138 * icall.c: implemented GetInterfaceMap() related icall.
25139 * domain.c, loader.h: load MethodInfo in mono_defaults.
25141 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
25143 * gc.c: disable the finalizer thread for now, untill all the issues
25144 with it are resolved.
25146 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
25148 * string-icalls.c: handle embedded nulls in string ctor when the
25149 length is specified.
25151 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
25153 * class.c: look for explicit interface implementation in parent
25156 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
25158 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
25160 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
25162 * gc.c: protect handles with a critical section.
25164 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25167 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
25168 parameters. If no assembly specified, try getting the type from all
25169 the assemblies in the current domain, else, load the assembly and get
25172 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25174 * marshal.c: applied patch from Aleksey Demakov that fixes
25175 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
25177 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25179 * icall.c: fixed get_location.
25181 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
25183 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
25184 declarations to make it work with older gcc.
25186 * loader.c (mono_get_method): set signature->pinvoke for native calls
25188 2002-11-20 Dick Porter <dick@ximian.com>
25190 * threads.c (mono_thread_init): Set the main thread's handle
25192 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
25194 * gc.c: allow compilation without GC support. Changed to match the
25197 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
25199 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
25201 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
25203 * reflection.c: set a public key token on the core assemblies.
25205 2002-11-18 Dick Porter <dick@ximian.com>
25207 * threads.c: Split out some thread initialisation so that other
25208 files can set the start callback function.
25210 * gc.c: Run finalisers in a separate thread, to avoid stack
25211 overflow. Fixes bug 31333.
25213 * appdomain.c: Set up GC finalisation thread.
25217 * domain.c: Use gc.h macros for GC_malloc
25219 2002-11-15 Dick Porter <dick@ximian.com>
25223 * appdomain.c: Removed mono_runtime_init_with_attach(),
25224 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
25225 merging the extra parameter with the existing function. Removed
25226 unneeded code in mono_thread_attach().
25228 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
25230 * image.c (mono_image_loaded_by_guid): a method to get loaded
25232 (load_metadata_ptrs): we store the guid as string.
25234 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
25236 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
25238 * metadata.c (mono_guid_to_string): imported method form Zoltan
25239 Varga (slightly modified)
25241 * assembly.c (mono_assembly_open): load precompiled code
25243 * loader.h (MonoMethod): we store the method token for use in the
25246 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25248 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
25249 the hook function called when an assembly is loaded.
25251 * domain.c: Modified file.
25252 (mono_domain_assembly_load): removed hash table insertion of assemblies.
25256 2002-11-07 Miguel de Icaza <miguel@ximian.com>
25258 * reflection.c: Map PEFileKind to the value expected by the WinNT
25261 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25263 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
25264 Read until the buffer is filled completely.
25266 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25268 * icall.c: implemented MonoType.InternalGetEvent ().
25270 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25272 * appdomain.c: implemented InitAppDomainSetup. Delayed
25273 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
25274 the entry_assembly.
25276 * assembly.c: base_dir is now an absolute path ending with
25279 * icall.c: modified get_location according to the above changes.
25281 * object.c: init AppDomain.SetupInformation for the default domain after
25282 we have the entry assembly.
25284 * domain.c: when unloading a domain, setup = NULL.
25286 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
25288 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
25290 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
25292 * object.h, object.c: introduced mono_object_get_virtual_method ()
25293 to lookup the method invoked on an object when a callvirt is done on
25295 * icall.c: make MethodInfo::Invoke() always do a virtual call.
25297 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25299 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
25300 current domain when loaded an assembly and failed to load it.
25302 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
25304 2002-10-31 Dick Porter <dick@ximian.com>
25308 * file-io.c: Return the error status in a parameter, as the
25309 GetLastError() value has long since been blown away if we try and
25310 look it up in a subsequent internal call invocation. Delete the
25311 GetLastError() internal call, because it's useless.
25313 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
25315 * class.[ch]: added cast_class to fix bug 29517
25317 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
25319 * marshal.c: create valid IL code in the filter clause:
25320 the new JIT is less forgiving:-)
25322 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25324 * icall.c: removed get_property internal call.
25326 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
25328 * appdomain.h domain.c: Added an ID to appdomains.
25330 * threads.c threads.h icall.c: Implement icall
25331 Thread:GetDomainID(), and remove unused icall
25332 CurrentThreadDomain_internal.
25334 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25336 * icall.c: Don't recurse through the base types in GetConstructor.
25339 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
25341 * mempool.h, mempool.c: added mono_mempool_empty() and
25342 mono_mempool_stats().
25344 2002-10-23 Dick Porter <dick@ximian.com>
25348 * icall.c: Added MonoIO.GetFileType internal call
25350 2002-10-17 Dick Porter <dick@ximian.com>
25352 * appdomain.c (mono_runtime_cleanup): Don't signal the async
25353 delegate semaphore before waiting for all threads to finish,
25354 because new threads can also call async delegates. Fixes bug
25357 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
25358 of 3 seconds, in case another async job is queued. (This part is
25359 needed because the bug fix reintroduced the 3s exit lag.) This
25360 makes the mono_runtime_shutdown flag superfluous.
25362 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
25364 * reflection.c: include ehader size in method section headers.
25365 Really check for suplicated modules entries.
25367 2002-10-17 Martin Baulig <martin@gnome.org>
25369 * debug-mono-symfile.c: Added back support for locals.
25371 2002-10-14 Martin Baulig <martin@gnome.org>
25373 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
25376 2002-10-14 Martin Baulig <martin@gnome.org>
25378 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
25379 mono_class_get() instead of looking in the class cache.
25381 2002-10-13 Martin Baulig <martin@gnome.org>
25383 * debug-mono-symfile.c: Set version number to 28, include the
25384 signature in method names.
25386 2002-10-13 Martin Baulig <martin@gnome.org>
25388 * debug-mono-symfile.h: Set version number to 27.
25390 2002-10-11 Martin Baulig <martin@gnome.org>
25392 * gc.c: Don't register/unregister NULL pointers as disappearing links.
25394 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
25396 * metadata.c, metadata.h: added helper function to allocate signatures.
25398 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25400 * icall.c: added internal call to get the location of machine.config.
25402 2002-10-08 Martin Baulig <martin@gnome.org>
25404 * debug-mono-symfile.c: Ignore classes with a pending init for the
25407 2002-10-03 Dick Porter <dick@ximian.com>
25409 * threads.c: Freebsd pthread_t is a pointer
25411 2002-10-03 Dick Porter <dick@ximian.com>
25413 * socket-io.c: Implemented GetHostName_internal
25415 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25418 (mono_config_parse_file): don't leak the text.
25420 2002-10-02 Martin Baulig <martin@gnome.org>
25422 * debug-mono-symfile.c: Added support for methods.
25424 2002-10-01 Martin Baulig <martin@gnome.org>
25426 * debug-mono-symfile.c: Don't emit methods and line numbers for
25427 the dynamic symbol file, just write the type table. We can easily
25428 have an external helper program which creates a symbol file for an
25431 2002-10-01 Dick Porter <dick@ximian.com>
25433 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
25434 Only add the handle to the cleanup array when we're about to
25435 launch the thread. Bug 31425 deadlocked when the test was run on
25438 2002-10-01 Martin Baulig <martin@gnome.org>
25440 * debug-mono-symfile.c: Added support for properties.
25442 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
25444 * reflection.c: unaligned store fix from Mark Crichton
25445 <crichton@gimp.org>.
25447 2002-09-27 Martin Baulig <martin@gnome.org>
25449 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
25452 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
25454 * assembly.h, assembly.c: use a sane API to hook into the assembly
25455 loading process instead of a useless special-purpouse hack
25456 (ngen needs a hook, too, for example).
25458 2002-09-27 Dick Porter <dick@ximian.com>
25460 * threads.c (mono_thread_init): Call GetCurrentProcess() so
25461 io-layer can set up some process handle info. Not needed on w32,
25462 but doesn't hurt either.
25464 * process.c: Pass the program name in the second parameter to
25465 CreateProcess, so the path is searched. Include the working
25466 directory. Implemented process name, process enumeration, and some
25467 process detail internal calls.
25469 * icall.c: Added internal calls for process lookup, and some
25472 2002-09-26 Martin Baulig <martin@gnome.org>
25474 * assembly.c (mono_install_open_assembly_hook): New global
25475 function to install a function to be invoked each time a new
25476 assembly is loaded.
25477 (mono_assembly_open): Run this callback function if set.
25479 * debug-mono-symfile.c: Put back line numbers for the dynamic
25480 symbol file and also record the .il file as source file. This
25481 allows us to install the temporary symbol file as `file.dbg' just
25482 like a compiler-generated one.
25484 2002-09-26 Nick Zigarovich <nick@chemlab.org>
25486 * Corrected typo in gc.c (BOHEM vs BOEHM).
25488 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25490 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
25491 GetProperties. Also avoid calling g_slist_length in GetProperties and
25494 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
25496 * reflection.c: avoid unaligned stores (bug spotted by
25497 Mark Crichton <crichton@gimp.org>).
25499 2002-09-25 Martin Baulig <martin@gnome.org>
25501 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
25502 instead of guint64 for addresses and added prologue/epilogue info.
25504 2002-09-25 Martin Baulig <martin@gnome.org>
25506 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
25507 store line number info. For the dynamic symbol file, we only need
25508 to provide the JIT generated dynamic line number info for the dynamic
25511 2002-09-25 Martin Baulig <martin@gnome.org>
25513 * debug-mono-symfile.h: Incremented version number.
25515 2002-09-24 Martin Baulig <martin@gnome.org>
25517 * class.c (mono_debugger_class_init_func): New global function
25519 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
25522 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
25523 function. This is called via the mono_debugger_class_init_func
25524 hook to add all types to the dynamic type table.
25525 (ves_icall_MonoDebugger_GetType): New interncall to get a class
25526 from its metadata token.
25528 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
25529 New interncall for the debugger.
25531 2002-09-24 Nick Drochak <ndrochak@gol.com>
25533 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
25534 before using it in case it is null.
25536 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
25538 * metadata.c: allow custom modifiers in local var signatures
25539 (bug spotted by Zoltan Varga).
25541 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
25543 * class.c: deal with the <Module> class that may have a NULL vtable.
25544 Eliminate warnings.
25546 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
25548 * image.c, image.h: more strong name helpers.
25549 * monosn.c: more work: convert pem keys to cryptoapi format.
25551 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
25553 * string-icalls.c: speedup IndexOf.
25555 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
25557 * icall.c: updates from Zoltan.2.Varga@nokia.com.
25559 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
25561 * icall.c: cleanup: use mono_object_domain ().
25563 2002-09-23 Martin Baulig <martin@gnome.org>
25565 * debug-mono-symfile.c: Improved type support.
25567 2002-09-22 Martin Baulig <martin@gnome.org>
25569 * debug-mono-symfile.c: Added support for reference types and strings.
25571 2002-09-22 Martin Baulig <martin@gnome.org>
25573 * debug-mono-symfile.c: Started to work on the type table.
25575 2002-09-21 Martin Baulig <martin@gnome.org>
25577 * debug-mono-symfile.c: Largely reworked the symbol table format.
25578 The symbol table is now incrementally updated each time a new
25579 method is added. We're now also using our own magic and version
25580 so that you don't need to recompile all your classes if the
25581 dynamic table changes.
25582 (mono_debug_update_mono_symbol_file): Removed.
25583 (mono_debug_symfile_add_method): New function to add a method.
25585 2002-09-21 Martin Baulig <martin@gnome.org>
25588 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
25591 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
25592 New interncall to get a method from its metadata token.
25594 2002-09-21 Martin Baulig <martin@gnome.org>
25596 * debug-mono-symfile.c: Create type table.
25598 2002-09-20 Martin Baulig <martin@gnome.org>
25600 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
25602 2002-09-20 Martin Baulig <martin@gnome.org>
25604 * debug-mono-symfile.c: Provide information about params and locals.
25606 2002-09-20 Martin Baulig <martin@gnome.org>
25608 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
25611 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
25612 interncall to get a method from its metadata token.
25614 2002-09-20 Martin Baulig <martin@gnome.org>
25616 * debug-mono-symfile.c: Added a few checks for method->header
25617 being non-NULL. This should never happen, but for the moment
25618 let's use a g_warning() rather than a g_assert().
25620 2002-09-19 Mark Crichton <crichton@gimp.org>
25622 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
25623 even if support for it isn't present. Added an #ifdef to fix this.
25625 * socket-io.c: Added checks back for Solaris support.
25627 2002-09-19 Martin Baulig <martin@gnome.org>
25629 * debug-mono-symfile.c (read_string, write_string): Reflect latest
25630 changes in the symbol file format.
25632 2002-09-18 Martin Baulig <martin@gnome.org>
25634 * debug-mono-symfile.c: Set version number to 21.
25636 2002-09-18 Dick Porter <dick@ximian.com>
25638 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
25639 on netbsd. Fixes bug 30051.
25641 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25644 (set_version_from_string): little fix.
25646 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
25648 * monosn.c, Makefile.am: added strong name utility.
25649 * reflection.h, reflection.c: implemented delayed signing,
25650 locale, version and hash id assembly attributes.
25652 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
25654 * loader.c, metadata.c: load param attributes in signatures.
25656 2002-09-16 Martin Baulig <martin@gnome.org>
25658 * debug-mono-symfile.c: Added string table with all method names.
25660 2002-09-14 Martin Baulig <martin@gnome.org>
25662 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
25663 fast method lookup.
25665 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
25667 * reflection.c: record the public key token of referenced assemblies.
25669 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
25671 * image.c, image.h: added functions to get the strong name and the
25672 public key of an assembly.
25673 * pedump.c: use them.
25675 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
25677 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
25679 2002-09-12 Miguel de Icaza <miguel@ximian.com>
25681 * marshal.c (mono_marshal_get_managed_wrapper): Added
25684 2002-09-11 Martin Baulig <martin@gnome.org>
25686 * gc.c: Call GC_unregister_disappearing_link() on all links when
25687 finalizing them, this is necessary to aviod a crash in boehm's
25690 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
25692 * gc.c: handle GetTarget for finalized objects spotted and fixed by
25695 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
25697 * icall.c: implemented MonoType::Module.
25698 * reflection.c, reflection.h: mono_module_get_object () from
25699 Tomi Pakarinen <tomi.pakarinen@welho.com>.
25701 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
25703 * icall.c: ignore overridden methods in GetMethods ().
25704 Fix for FieldInfo::SetValue().
25705 * object.c: handle float/double in runtime invoke.
25707 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
25709 * object.c: allow a constructor to be called again on an object.
25711 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
25713 * class.h, class.c: move field layout code to it's own function and
25714 export it. Get an interface id earlier. Move fields in MonoClass
25715 so they are more cache friendly and align the bitfields.
25716 * loader.c: temporary handle get_param_names() for a runtime method.
25717 * reflection.c, reflection.h: more code to handle runtime creation of
25720 2002-09-09 Martin Baulig <martin@gnome.org>
25722 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
25723 signature with the pinvoke field being set for the actual call.
25725 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
25727 * icall.c: removed some unused icalls. Start of map of glib charsets
25728 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
25730 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
25732 * debug-helpers.c: break infinite loop (found and fixed by
25733 Holger Arnold <harnold@gmx.de>).
25735 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
25737 * icall.c: target may be null in create_delegate.
25739 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
25741 * marshal.c: handle a boolean return type.
25743 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
25745 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
25747 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
25749 * gc.c: fix weakreferences.
25751 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
25753 * icall.c: added icall to get default codepage.
25755 2002-09-03 Dick Porter <dick@ximian.com>
25758 * threads.c: Use MonoThread instead of MonoObject where
25761 Store running thread objects in a hash table, so that we have all
25762 the info to hand when waiting for them to finish
25763 (means we don't need OpenThread() any more, so mingw builds should
25764 be fully functional again.)
25767 * object.h: Added thread ID to MonoThread
25769 2002-09-03 Martin Baulig <martin@gnome.org>
25771 * icall.c (System.Reflection.Assembly::get_location): New interncall.
25773 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25775 * icall.c: fixed leak in get_temp_path. Thanks lupus.
25777 2002-09-03 Martin Baulig <martin@gnome.org>
25779 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
25780 argument to store the end address of the disassembled instruction.
25782 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
25783 here from debug-symfile.h.
25784 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
25785 JIT into this struct.
25786 (MonoSymbolFile): Added `char *image_file' field.
25787 (MonoDebugGetMethodFunc): Removed.
25788 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
25789 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
25790 (mono_debug_find_method): New method.
25792 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
25793 create a full symbol file.
25794 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
25795 and static symbol files.
25796 (mono_debug_find_method): The symbol file keeps an internal method hash,
25797 call this to get a MonoDebugMethodInfo from a MonoMethod.
25799 * debug-symfile.[ch]: Removed.
25801 2002-08-29 Miguel de Icaza <miguel@ximian.com>
25803 * image.c (do_mono_image_open): Remove linker version check.
25805 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
25807 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
25808 wrappers for instance methods.
25810 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25812 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
25814 2002-08-28 Dick Porter <dick@ximian.com>
25816 * Makefile.am: Export HOST_CC for w32 builds
25818 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
25820 * file-io.c process.c: MonoString are null terminated, no
25821 need for mono_string_to_utf16() anymore.
25823 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
25825 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
25827 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
25829 * icall.c, reflection.h: speedup System.MonoType.
25831 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
25833 * reflection.c: allow null as the value of a string argument in
25834 custom attributes constructors.
25836 2002-08-27 Martin Baulig <martin@gnome.org>
25838 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
25839 `trampoline_address' field.
25841 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
25843 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
25844 check (fixes bug #29486)
25846 2002-08-27 Martin Baulig <martin@gnome.org>
25848 * debug-mono-symfile.c: Changed the file format in a way that allows us
25849 open it read-only and to use a specially malloced area for all the
25850 dynamic data. We can now also generate a symbol file on-the-fly if we're
25851 debugging IL code and there is no MCS generated symbol file for it.
25853 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
25855 * object.c: added a define for a good string and array
25856 creation speedup (not enabled by default because we need to deal with
25859 2002-08-26 Martin Baulig <martin@gnome.org>
25861 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
25862 function to create a dynamic symbol file. This is used by the
25863 debugger to create a symbol file for IL code on-the-fly.
25865 2002-08-26 Martin Baulig <martin@gnome.org>
25867 * loader.c (mono_lookup_pinvoke_call): Include the error message
25868 from g_module_error() in the error message.
25870 2002-08-24 Martin Baulig <martin@gnome.org>
25872 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
25873 function to update the symbol file. The symbol file is mmap()ed
25874 writable, but private. This allows us to install the symbol file
25875 together with the assembly.
25877 2002-08-24 Martin Baulig <martin@gnome.org>
25879 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
25880 but they can read the new symbol file format which mcs is now creating.
25882 * debug-symfile.c (mono_debug_find_source_location): Moved to
25883 debug-mono-symfile.c; this is now operating on the new symbol file.
25885 2002-08-23 Martin Baulig <martin@gnome.org>
25887 * debug-helpers.c (mono_method_desc_from_method): New function to get
25888 a MonoMethodDesc from a MonoMethod.
25890 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
25892 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
25893 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
25895 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
25897 * string-icalls.[ch]: make helper methods static.
25899 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25901 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
25902 types to it and to SetValueInternal.
25904 * object.c: Moved handle_enum label to its proper place. This was the
25907 This time i compiled mcs and gtk-sharp and they both work.
25909 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25911 * icall.c: reverted partially my previous patch until
25912 object.c:set_value handles enums correcly.
25914 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25917 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
25918 (ves_icall_System_Environment_get_MachineName): removed warning when
25919 compiling under cygwin.
25921 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
25923 * object.c: fixed field_get_value() for reference types.
25925 2002-08-22 Dick Porter <dick@ximian.com>
25927 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
25928 Don't free a buffer while it's still needed. Patch from Jonathan
25929 Liger <Jonathan.liger@wanadoo.fr>
25931 2002-08-21 Miguel de Icaza <miguel@ximian.com>
25933 * icall.c (ves_icall_System_Environment_get_Platform): Add new
25936 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
25938 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
25939 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
25941 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
25942 we call unmanaged code which throws exceptions.
25944 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
25946 * appdomain.h: added per-domain entry_assembly.
25947 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
25949 * icall.c: Assembly::GetEntryAssembly icall.
25950 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
25951 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
25953 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
25955 * appdomain.h, gc.c: added mono_domain_finalize ().
25957 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25960 (mono_print_unhandled_exception): changed g_warning by g_printerr
25961 because g_log has a 1024 characters limit (yeah, i got a big stack
25962 trace). Don't print exception name, that should be in ToString
25965 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25967 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
25968 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
25970 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25973 (mono_print_unhandled_exception): after previous commit, i realized
25974 that MS calls ToString on the exception. I changed this function to
25975 do that. This way we get stack_trace for free.
25977 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25980 (mono_print_unhandled_exception): invoke Message property instead of
25981 getting 'message' field from Exception. Don't allocate memory for
25982 'trace' and 'message' if not needed.
25984 2002-08-18 Dick Porter <dick@ximian.com>
25986 * unicode.c: Fix asserts to match Encoder.cs checks
25988 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
25990 * marshal.c: fix unaligned store issue and a few wrong
25991 opcode argument types.
25993 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25995 * icall.c: added GetUninitializedObjectInternal internal call.
25997 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
25999 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
26000 to the right domain.
26002 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
26004 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
26006 * class.c (class_compute_field_layout): set blittable to false for Strings
26008 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
26010 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26012 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
26013 first chunk of code to create types at runtime. Code to
26014 handle ReflectedType/DeclaringType. Make reflection handles
26017 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
26019 * class.c: set correct name in arrays.
26021 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
26023 * appdomain.c (mono_domain_transfer_object): make it work with
26024 valuetypes. bug fixes.
26026 2002-08-12 Dick Porter <dick@ximian.com>
26028 * object.h: Rename some parameters to avoid c++ keywords (Patch
26029 from Joseph Wenninger <kde@jowenn.at>)
26031 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
26033 * icall.c: added icall to implement Assembly.GetFile*.
26035 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
26037 * reflection.h, reflection.c: code to embed managed resources.
26039 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
26041 * class.c: move all the type size stuff into
26042 class_compute_field_layout().
26044 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26046 * class.c: ensure enums have always the correct instance size.
26047 * unicode.c: remove wrong assert.
26049 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
26051 * assembly.c: fix mem corruption issue.
26052 * image.h, image.c: added mono_image_get_resource () to access
26054 * icall.c: implemented Assembly.EntryPoint property and some
26055 Managed Resources related internalcalls.
26058 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26060 * image.c, image.h: impemented mono_image_get_entry_point ().
26061 * appdomain.c: use mono_image_get_entry_point.
26063 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
26065 * reflection.c: support the object type argument when loading
26068 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
26070 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
26071 String as return type.
26073 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
26075 * reflection.c: fix encoding of named args for custom attrs to match
26076 the ms implementation. Read them back when instantiating custom
26079 2002-08-02 Radek Doulik <rodo@ximian.com>
26081 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
26082 by Dietmar as quick fix
26083 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
26084 16 as stack size, used on more places as quick fix before Dietmar
26085 will fix it properly
26087 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
26089 * object.h, object.c: added accessors for fields and properties.
26091 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
26093 * class.c, class.h: made mono_class_get_field_from_name ()
26094 loop on parent types.
26095 Added mono_class_get_property_from_name ().
26097 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26099 * class.c, class.h: move the code to setup the type vtable in its own
26100 function so that it can be reused also for types created at runtime.
26101 Eliminate the "class" identifier from the header file.
26102 * reflection.c: setup the vtable for enums so that we can create
26103 objects for use in SetConstant ().
26105 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
26107 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
26108 instead of the delegate itself as this pointer (bug #28383)
26110 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
26112 * marshal.c (mono_marshal_get_managed_wrapper): added return type
26115 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26117 * loader.c: don't set the pinvoke bit on icalls.
26119 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
26121 * debug-helpers.c (mono_method_full_name): only print a number to
26122 indicate wrapper type (so that the output is more readable in traces).
26124 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
26126 * class.c (mono_class_init): include method override patch from Paolo
26128 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
26130 * icall.c: fixed GetTypeCode().
26132 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
26134 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
26135 use real delegate invoke function to make it work with multicast
26136 delegates (fix bug# 28291).
26138 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26140 * object.c: load constant strings.
26142 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
26144 * reflection.c: no magic numbers.
26145 * tabledefs.h: security action enum.
26147 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
26149 * assembly.c: fix possible memory corruption.
26151 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
26153 * reflection.h, reflection.c: added support for linking resources.
26154 * verify.c: check we have an updated corlib.
26156 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
26158 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
26160 (mono_marshal_string_array): null terminate unmanaged string arrays.
26161 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
26163 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26165 * icall.c: Type.GetType () can now return also types from the
26168 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26170 * loader.h, loader.c: stack walking support.
26171 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
26172 GetCallingAssembly.
26174 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
26176 * marshal.c: added optimisations for blittable types
26178 * class.c (mono_array_class_get): do not set blittable attribute on arrays
26179 (mono_class_setup_mono_type): set blittable attribute for single
26182 * marshal.c (mono_string_utf8_to_builder): impl.
26183 (mono_string_builder_to_utf8): impl.
26184 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
26186 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
26188 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
26189 (mono_marshal_get_managed_wrapper): impl. byref types
26191 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26194 (search_method): don't display debug message.
26196 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
26198 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
26200 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
26202 * appdomain.c: set the missing filename when throwing exception.
26204 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
26206 * metadata.c (mono_type_size): code cleanup
26207 (mono_type_stack_size): removed some test code
26209 2002-07-21 Miguel de Icaza <miguel@ximian.com>
26211 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
26212 mono_get_exception_file_not_found now.
26214 * exception.c (mono_exception_from_name_two_strings): New version
26215 that will call a constructor with two string arguments.
26216 (mono_get_exception_file_not_found): New helper routine, used to
26217 report file-not-found errors.
26219 2002-07-20 Dick Porter <dick@ximian.com>
26222 * process.c: Pass file handles to CreateProcess
26226 * file-io.c: Implemented CreatePipe
26228 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
26230 * metadata.c (mono_get_param_info): set alignment for value types
26232 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26234 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
26235 Constify mono_domain_assembly_open().
26236 * loader.c: handle null namespace in icalls.
26238 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
26240 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
26241 (emit_str_to_ptr_conv): marshal object as structs
26243 * metadata.c (mono_type_to_unmanaged): marshal object as structs
26245 * marshal.c (mono_marshal_get_runtime_invoke): support value types
26247 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
26249 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
26250 (mono_marshal_get_native_wrapper): we an now return value types
26252 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26254 * verify.c: more checks implemented.
26256 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
26258 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
26260 (mono_marshal_get_native_wrapper): allow byref arguments
26261 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
26262 impl. PtrToStringXXX methods
26263 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
26264 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
26265 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
26266 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
26267 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
26269 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26271 * reflection.c: fix buglet in parsing an assembly name.
26273 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
26275 * marshal.c (emit_ptr_to_str_conv): first impl.
26277 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
26279 * object.c, class.h: cache the vtable in the class as suggested by
26280 vargaz@freemail.hu (Zoltan Varga).
26282 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26284 * class.h, loader.c: added mono_field_from_token().
26285 * verify.c: first cut of type checking code.
26287 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
26289 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
26291 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
26293 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
26295 (mono_marshal_get_remoting_invoke): impl.
26296 (mono_delegate_begin_invoke): impl.
26297 (mono_mb_emit_save_args): impl.
26298 (mono_delegate_end_invoke): impl.
26299 (mono_marshal_get_delegate_begin_invoke):
26300 (mono_marshal_get_delegate_end_invoke):
26301 (mono_marshal_get_delegate_invoke): generate a special name for
26302 those methods (including the signature) and associate them whith
26303 the delegate class.
26305 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
26308 (mono_reflection_type_from_name): now it has a MonoImage parameter
26309 which is used as the default image to search the type in. If the image
26310 is NULL or getting the type from it fails, it defaults to corlib.
26312 * icall.c: changed 1 call to mono_reflection_type_from_name to match
26315 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26317 * reflection.c: update the parameter table index.
26319 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
26321 * domain.c: don't include the mark byte in the string hash.
26323 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
26325 * icall.cs: icall for Type.GetTypeCode ().
26326 * verify: a couple of fixes and disabled local initialization checks.
26328 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
26330 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
26332 * debug-helpers.c (mono_method_full_name): print the type of the
26335 * metadata.c (mono_signature_hash): a hash function for signatures
26336 (mono_signature_hash): better hash algorithm
26338 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
26340 * debug-helpers.c (mono_method_full_name): this can now generate
26341 method names with signatures
26343 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
26344 method dont have this pointers.
26346 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26348 * reflection.c: fixup typebuilder tokens.
26349 * image.c: fix buglet.
26350 * marshal.h: remove whitespace.
26351 * metadata.h, metadata.c: reinstate code that was removed.
26352 * verify.c: handle catch directives and fix another couple of bugs.
26354 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
26356 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
26357 (mono_marshal_get_native_wrapper): make it comp. with the old code
26358 (mono_marshal_get_native_wrapper): support boolean
26359 (mono_marshal_get_managed_wrapper): support more types
26361 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
26363 * class.c (class_compute_field_layout): compute class->blittable attribute.
26365 2002-07-09 Dick Porter <dick@ximian.com>
26367 * threads.c: Make the thread cleaning up cope with threads that
26370 2002-07-08 Radek Doulik <rodo@ximian.com>
26372 * reflection.c (method_encode_code): use non-translated values to
26373 compute finally_start, this fixes exception handling on ppc, yay!
26375 * decimal.h (struct signscale): fix endianess
26377 2002-07-07 Radek Doulik <rodo@ximian.com>
26379 * reflection.c: swap box_val and not val
26381 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26383 * reflection.c, reflection.h: handle full assembly info in type name.
26384 Handle Type arguments when loading custom attributes.
26385 * icall.c: updated to use new mono_reflection_type_from_name () method.
26387 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26390 (method_from_memberref): also print assembly name when method not found.
26392 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26395 (ves_icall_TypeGetProperties): fixed bug #27473.
26397 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26399 * reflection.c: display image name and token when cannot find the
26400 .ctor for an attribute.
26402 2002-07-05 Martin Baulig <martin@gnome.org>
26404 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
26406 2002-07-04 Dick Porter <dick@ximian.com>
26408 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
26409 compile on mingw. This will cause mingw builds to not wait for
26410 subthreads to terminate after the main thread does. I've lodged a
26411 bug with the mingw developers for them to wrap OpenThread().
26413 2002-07-03 Dick Porter <dick@ximian.com>
26415 * threads.c: Store thread IDs instead of handles, because
26416 GetCurrentThread() returns a pseudohandle and therefore stores
26417 useless values. mono_thread_cleanup() continues checking the
26418 array of threads until it is empty, to cope with subthreads
26419 spawning new threads after the main thread has finished.
26423 * profiler-private.h: Pass the thread ID to thread profiler
26424 functions, instead of a handle
26426 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
26428 * verify.c: fixes to make it more usable.
26429 * pedump.c: added --verify code to verify IL code in an assembly.
26431 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26433 * reflection.c: turn errors into warnings to allow compiling corlib.
26435 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
26437 * reflection.c: add special cases to compile corlib.
26439 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26441 * reflection.c: handle properties with only a set method.
26443 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
26445 * opcodes.h: add enum with opcodes in opval order.
26447 2002-07-01 Dick Porter <dick@ximian.com>
26450 * object.c (mono_runtime_run_main): Removed unneeded argument
26452 2002-06-28 Martin Baulig <martin@gnome.org>
26454 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
26456 2002-06-27 Dick Porter <dick@ximian.com>
26458 * threads.c: Store the handle in both the parent thread and in the
26459 subthread, to minimise the time between starting a new thread and
26462 2002-06-26 Dick Porter <dick@ximian.com>
26464 * appdomain.c (mono_runtime_cleanup): Close the socket library
26465 after all the threads have finished, not before
26467 2002-06-26 Martin Baulig <martin@gnome.org>
26469 * debug-symfile.c (mono_debug_find_source_location): Added
26470 `guint32 *line_number' argument. If it's not NULL, store the line number
26471 there and return the file name without the line number.
26473 2002-06-25 Dick Porter <dick@ximian.com>
26477 * process.c: Process forking and other support functions
26479 2002-06-25 Dick Porter <dick@ximian.com>
26481 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
26482 things dont happen when the image is closed.
26483 (mono_image_lookup_resource): Walk the resource section looking
26484 for a particular entry
26486 * cil-coff.h: PE resource section decoding
26488 2002-06-25 Dick Porter <dick@ximian.com>
26492 (mono_assembly_foreach): Accessor functions to walk the list of
26494 (mono_assembly_set_main):
26495 (mono_assembly_get_main): Process methods need to know which
26496 assembly is the "main" one
26498 * object.c (mono_runtime_run_main): Record the main assembly
26500 * debug-helpers.c: Fix typo
26502 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
26504 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
26505 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
26507 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
26509 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
26511 2002-06-21 Miguel de Icaza <miguel@ximian.com>
26513 * image.c (do_mono_image_open): Initialize reference count,
26514 otherwise we leak the MonoImage.
26516 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26518 * reflection.c: small tweak to handle self-hosting.
26520 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
26522 * reflection.c: fix type name parse code.
26524 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26526 * reflection.c: break out of the loop.
26527 * image.c: special case corlib.
26529 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26531 * reflection.c: add all the custom attrs at the end to ensure the
26532 ctors have been properly initialized when the attributes are defined
26533 in the current assembly.
26535 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26537 * reflection.c: handle correctly multiple-nested types.
26539 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
26541 * row-indexes.h: fix typos.
26542 * reflection.c: adjust for typos and fix method_def_or_ref
26543 encoding in MethodImpl table.
26545 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
26547 * reflection.c: fix entry point patching (thanks Serge!).
26549 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
26551 * verify.c: add check for System.Exception
26553 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
26555 * image.c, class.c: minifix for code just c&p'ed.
26556 * reflection.c: warning fix.
26557 * object.h, loader.h, domain.c: load also StringBuilder.
26559 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
26561 * marshal.h, marshal.c: some support code to handle complex marshaling.
26563 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26565 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
26566 Better signatures with vtable error dump.
26568 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
26570 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
26572 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
26574 * icall.c (ves_icall_Type_GetField): impl.
26576 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26578 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
26579 to retrieve a marshal description blob for a field or param.
26581 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
26583 * reflection.h, reflection.c: change order of nested type emission
26584 to avoid table corruption. The NestedTypes table is sorted.
26585 * icall.c: change order of GetConstructor results to workaround mcs bug.
26587 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
26589 * reflection.h, reflection.c: handle field and param marshal
26592 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26594 * icall.c, marshal.c marshal.h: more Marshal class implementation.
26596 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26598 * reflection.c: fix call convention.
26600 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26602 * reflection.h, reflection.c: mono_image_get_memberref_token()
26603 takes a type instead of a class, now. Added
26604 mono_image_get_array_token() to create tokens for the special
26605 multi-dim array methods.
26607 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26609 * assembly.c: handle modules (no assembly table). Split
26610 loading references in its own function.
26611 * class.c: handle moduleref resolution scope.
26612 * image.c, image.h: cache module name in image.
26614 2002-06-07 Martin Baulig <martin@gnome.org>
26616 * reflection.c (mono_image_get_type_info): Only add a class layout entry
26617 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
26619 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
26621 * icall.c: more signature fixes that used uint instead of int.
26623 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26625 * reflection.c: fixed signature of field refs.
26627 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
26629 * class.c, reflection.c: handle typerefs of nested types
26630 (both on read and when writing files).
26632 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
26634 * icall.c: fix method signatures that tried to workaround the previous
26637 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
26639 * debug-helpers.c: fix typo.
26641 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
26643 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
26644 rewrote the PE/COFF writing code (our programs are understood by the
26647 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
26649 * gc.c, gc.h, icall.c: weakreference support.
26651 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26653 * Makefile.am, mono-config.c: use $(sysconfdir).
26655 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26657 * icall.c: changed default precision of Double.ToString() to 15.
26658 Fixed memory leak. Unified with Single.ToString.
26660 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
26662 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
26664 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26666 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
26667 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
26668 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
26671 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26673 * debug-symfile.c, sysmath.c: yet more compilation fixes.
26675 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26677 * reflection.c, socket-io.c: more compilation fixes.
26679 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26681 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
26682 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
26683 unicode.c: warning and compiler compatibility fixes.
26685 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26687 * class.h, metadata.c: fixed warnings/compilation errors.
26689 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
26691 * Makefile.am, mono-config.c, mono-config.h: configuration file
26693 * loader.c, loader.h: make Dll mapping configurable at runtime in the
26694 config file. Export methods to insert and lookup mappings.
26696 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
26698 * reflection.c: handle types and boxed objects in custom attr
26701 2002-05-30 Martin Baulig <martin@gnome.org>
26704 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
26706 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
26708 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
26709 to lookup the implmap row for a P/Invoke method.
26710 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
26711 P/Invoke method from the runtime on an as needed basis.
26713 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
26715 * metadata.c (mono_metadata_parse_signature): impl.
26717 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26719 * class.c: handle .pack directive.
26721 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26723 * object.c: initialize static fields with RVA data.
26725 2002-05-25 Martin Baulig <martin@gnome.org>
26728 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
26730 2002-05-24 Martin Baulig <martin@gnome.org>
26733 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
26734 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
26735 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
26737 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26739 * object.c: special case string ctros in invoke.
26740 * gc.c: silly whitespace changes.
26742 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
26744 * threadpool.[ch]: impl. a threadpool that can
26745 be used by mint and mono.
26747 2002-05-22 Martin Baulig <martin@gnome.org>
26749 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
26750 The first argument is now a `MonoReflectionModuleBuilder *', the return
26751 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
26752 `methods' field to get the method builder. The `token' argument is the
26755 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
26756 invalid characters instead of g_assert_not_reached()ing. This seems
26757 to be the behaviour of mscorlib.
26759 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
26761 * object.c (mono_runtime_invoke_array): applied patch from Rachel
26762 Hestilow to fix bug #25104
26764 2002-05-21 Martin Baulig <martin@gnome.org>
26766 * debug-symfile.c (mono_debug_find_source_location): New function.
26767 Looks up an IL offset in the line number table and returns the source
26768 location as a string.
26770 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26773 (mono_double_ToStringImpl): changed %f by %g until we have something
26776 2002-05-21 Nick Drochak <ndrochak@gol.com>
26778 * icall.c : Use different name for Math.Pow's icall. Needed to check
26779 parameters first in C#.
26781 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26783 * icall.c, reflection.h: added icall to get info about an event.
26785 2002-05-20 Radek Doulik <rodo@ximian.com>
26787 * object.c (mono_value_box): don't use memcpy for boxing on BIG
26789 (mono_value_box): don't use memcpy for small sizes on
26790 architectures with unaligned access
26792 2002-05-20 Martin Baulig <martin@gnome.org>
26794 * reflection.c (mono_reflection_setup_internal_class): Don't crash
26795 if `tb->parent == NULL'.
26796 (mono_reflection_create_internal_class): New function. This is
26797 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
26800 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
26803 2002-05-19 Martin Baulig <martin@gnome.org>
26805 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
26806 argument to get the length, don't default to the array length.
26808 2002-05-18 Miguel de Icaza <miguel@ximian.com>
26810 * assembly.c (mono_assembly_setrootdir): New function used to
26811 override the MONO_ASSEMBLIES directory.
26813 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26815 * icall.c: ValueType_GetHashCode() initialize local var.
26817 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26819 * reflection.c: sort custom attributes table.
26821 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26823 * reflection.c: support named args in custom attributes (write support).
26825 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26827 * reflection.c: fix finally position calculation.
26829 2002-05-15 Radek Doulik <rodo@ximian.com>
26831 * reflection.c: fixed endianess at many places
26833 * icall.c (ves_icall_InitializeArray): comment out debug msg
26835 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
26837 * object.c (mono_unhandled_exception): new function to handle
26838 unhandled exceptions.
26839 (mono_unhandled_exception): call the UnhandledException event.
26840 (mono_runtime_delegate_invoke): impl.
26842 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
26844 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
26845 returns the RVA, not the direct pointer to the data. Handle the case
26846 when the class size is fixed.
26848 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
26850 * reflection.c: fix some endianess issues.
26852 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
26854 * object.c (mono_runtime_invoke): is now able to catch exceptions.
26856 * threads.c (mono_thread_init): added a callback which is invoked
26859 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
26861 * icall.c: make GetHashCode return non-negative values.
26863 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
26865 * object.c, icall.c, gc.c: revert to address-based hashcode.
26867 2002-05-13 Miguel de Icaza <miguel@ximian.com>
26869 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
26871 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
26873 * icall.c, class.c: special case <Module>.
26875 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
26877 * icall.c: fix bug in GetNow().
26879 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
26881 * object.c (mono_runtime_class_init): make sure that we call all
26882 static class constructors.
26884 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26886 * reflection.c: sort methodsemantics table.
26888 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26890 * reflection.h, reflection.c: honour init locals setting.
26892 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
26894 * icall.c: copied Double ToStringImpl for Single ToStringImpl
26896 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
26898 * reflection.c: support ContructorBuilders in attribute blob creation.
26900 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
26902 * reflection.c: some changes to build a binary that can be run
26903 directly in windows.
26905 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
26907 * loader.c: print a big message when an icall can't be found.
26909 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26911 * string-icalls.c: fix bug 24248.
26913 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
26915 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
26916 icall.c, reflection.h: separate assembly loading by pathname and by
26917 assembly name. Use the MONO_PATH env var to search for assemblies.
26919 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
26921 * assembly.c, image.h: add some support for assemblies
26922 with multiple modules.
26923 * class.c, class.h: export mono_class_from_typeref().
26924 * loader.c: remove duplicated code and use mono_class_from_typeref(),
26927 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
26929 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
26930 documentation says (the ECMA one is correct).
26932 2002-05-02 Dick Porter <dick@ximian.com>
26934 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
26935 Don't name the synchronisation mutex.
26937 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
26940 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
26941 Make the prototypes match.
26942 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
26946 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
26947 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
26948 all systems have tm.tm_zone, so use strftime() with %Z to print
26949 the timezone abreviation into a temp string.
26951 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
26952 rather than mono_array_addr() on a MonoString on Big Endian
26955 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
26957 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
26960 2002-04-30 Dick Porter <dick@ximian.com>
26962 * socket-io.c: Cope with SOCKET being an integer rather than a
26965 * threads.c: Added Thread_free_internal, to deal with thread
26966 handle cleanup. Moved calls to handle_store() and handle_remove()
26967 to start_wrapper(), so each can only be called once. Allocate
26968 synchronisation blocks with GC_malloc(), and use GC finalisation
26969 to close the handles.
26971 * icall.c: added System.Threading.Thread::Thread_free_internal
26973 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26975 * icall.c: support Environment.Exit, CommandLineArgs().
26977 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26979 * object.c, object.h: added mono_runtime_run_main () and
26980 mono_runtime_get_main_args () for use in System.Environment.
26982 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
26984 * gc.c: fix thinko, enable actual finalization since the jit is now
26987 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26989 * gc.c, object.c: take into account that an object may be offset wrt the address
26990 returned by GC_malloc().
26992 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
26994 * image.c: handle files without entries in the assembly table (modules).
26996 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
26998 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
26999 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
27000 allowed to be null when it's System.Object class setup.
27002 2002-04-27 Martin Baulig <martin@gnome.org>
27004 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
27005 if `tb->parent == NULL' rather than crashing.
27007 2002-04-28 Nick Drochak <ndrochak@gol.com>
27009 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
27010 calling acos() where asin() should have been called.
27012 2002-04-26 Martin Baulig <martin@gnome.org>
27014 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
27015 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
27016 there's a subdirectory called `System', but we don't want to read that
27017 subdirectory as an assembly.
27019 2002-04-25 Martin Baulig <martin@gnome.org>
27021 * debug-symfile.c: Reflect latest MonoString changes.
27023 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
27025 * rand.c, rand.h: instance method icalls need to have an explicit
27026 this pointer as first argument in the C implementation.
27028 2002-04-25 Nick Drochak <ndrochak@gol.com>
27030 * icall.c: Fix typo in map for GetNonZeroBytes
27032 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
27034 * string-icalls.c : String does now passes unit tests without any
27035 errors, the following changes has been made:
27037 Implemented replace methods.
27038 Renaming of methods to (try) follow the standard.
27039 Fixed compare ordinal
27040 Made all memory allocated directly to function instead of via icall function.
27041 Small performance fix in is_in_array function
27043 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
27045 c (mono_string_Internal_ctor_charp_int_int):
27046 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
27047 sindex < 0, throw ArgumentOutOfRangeException instead of
27048 ArgumentNullException.
27050 Added new check for length == 0, however
27051 I need to make it return String.Empty from the C code.
27053 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
27054 that calculate the length for us here.
27056 (mono_string_Internal_ctor_sbytep_int_int): Replaced
27057 mono_string_new_utf16 with mono_string_new, since value is utf8.
27059 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27061 * object.c: register the object for finalization if needed.
27062 Allocate one more char in the string for the terminating 0 char.
27064 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
27066 * class.c, class.h, image.c: check if a type implemenst a destructor.
27067 Use the proper key for array class lookups.
27068 * icall.c: register the icalls in the System.GC class.
27069 * gc.c, gc.h: GC-related functions and icalls.
27071 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27075 * unicode.c: free some strings gotten from mono_string_to_utf8 and
27076 changed a couple of free () by g_free ().
27078 * decimal.c: one-liner in the comments for decimal2string ().
27080 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
27082 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
27084 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
27086 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
27087 * object.c (mono_runtime_invoke_array) : handle null in params
27089 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
27091 * string-icalls.c: fixed bug in split (one off bug)
27093 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
27095 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
27096 * icalls.c: added String::Equals as internal method
27098 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
27100 * threads.c: fixed bug in the double interlocked functions
27102 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
27104 * threads.c: implemented all of the new interlocked icalls.
27105 * string-icalls.c: fix a bug in insert.
27106 * icalls.c: added the icalls for interlocked, removed old string functions.
27108 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
27110 * loader.c: fix off-by-one error when reading argument names.
27112 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27114 * profiler.c: win32 counter implementation (untested).
27115 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
27116 (the latter needs testing and more complete impl. from win32 folks).
27118 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
27120 * object.c: mono_array_new_full workaround mono_array_class_get
27123 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
27125 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
27126 * object.h (mono_string_chars): Changed casting type.
27128 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
27130 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
27131 method signatures to use gunichar2 instead of gint16.
27133 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
27135 * object.h, object.c: domain-specific versions of mono_object_new and
27138 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
27140 * object.c: changed String layout
27142 * string-icalls.c (mono_string_Internal_ctor_chara): added
27143 internal string constructors.
27145 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
27147 * threads.c: pass 'this' to the thread start routine.
27149 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27151 * string-icalls.c: fix IndexOf and LastIndexOf. Now
27152 InternalCompareStr don't call twice mono_string_cmp_char for the last
27153 character. Improved performance in mono_string_cmp_char.
27155 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
27157 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
27158 code into its own library: libmonoruntime.
27160 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
27162 * object.h, object.c: changed array format so that szarrays do not
27163 require a bounds structure.
27164 * icall.c, appdomain.c: support for new szarray format.
27166 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
27168 * metadata.c: compare also the retuns type when comparing signatures:
27169 we didn't do this as an optimization since really overloaded methods
27170 must differ also in the arguments, but this doesn't work with
27171 low-level IL code (or when using explicit conversion operators: see
27172 bug#23498 for an example).
27174 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
27176 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
27178 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
27180 * icall.c: make MonoType::GetElementType its own icall.
27182 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
27184 * icall.c: remove MonoMethod_get_Name().
27185 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
27188 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
27190 * string-icalls.c: optimized a few methods.
27192 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
27194 * icall.c: added all new string internal calls
27195 * string-icalls.c: added, new string internal call implementation.
27196 * object.c: added mono_string_new_size for allocating a string a size
27198 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
27200 * object.c (mono_object_isinst): use the same code as in the
27201 optimized x86 version.
27203 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
27205 * profiler.c: TSC-based timer code (faster and more accurate).
27206 Not hooked up in configure, yet (set USE_X86TSC to 1).
27208 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
27210 * profiler.c, profiler.h: track time spent compiling methods.
27211 * threads.c: track thread creation/destruction.
27213 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
27215 * profiler.c, profiler.h, profiler-private.h: profiling interface
27216 and sample implementation. Moved here so that it can be used also by
27219 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
27221 * reflection.c, reflection.h: keep types and other handles separate in
27222 the hash tables for referred tokens. Add guid for modules.
27224 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
27226 * assembly.c: fix bugs found with valgrind.
27227 * metadata.h, metadata.c: added mono_metadata_guid_heap().
27229 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
27231 * threads: added icall support for getting current domain for
27234 2002-04-13 Martin Baulig <martin@gnome.org>
27236 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
27237 (MonoDebugVarInfo): Added `index' field for register based addresses.
27238 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
27239 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
27240 `MonoDebugVarInfo *params' and `guint32 this_offset' with
27241 `MonoDebugVarInfo *this_var'.
27243 * debug-symfile.c (relocate_variable): New static function to write
27244 a location description for a local variable or method parameter.
27246 2002-04-12 Martin Baulig <martin@gnome.org>
27248 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
27249 stack offset and begin/end scope address of a local variable.
27250 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
27251 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
27252 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
27254 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
27255 Added new relocation types for start/end scope of a local variable.
27257 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
27259 * object.h: add mono_object_domain() macro.
27260 * reflection.c: handle typespecs.
27261 * icall.c: MonoMethod::get_Name() implementation.
27263 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27265 * icall.c: String::GetHashCode() icall implementation.
27267 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27269 * icall.c: String::IndexOfAny icall.
27270 * object.c, object.h: make array->max_length more useful.
27271 Intrduced mono_object_class() and mono_string_length() macros.
27273 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27275 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
27276 instead of g_unichar_isdigit.
27278 2002-04-11 Nick Drochak <ndrochak@gol.com>
27280 * icall.c: Implement a simple Double.ToString().
27282 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
27284 * appdomain.h: only io-layer.h is supposed to be included.
27285 * icall.c: explicitly import environ. Fix warning.
27287 2002-04-10 Nick Drochak <ndrochak@gol.com>
27289 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
27290 return true even if it's not Daylight Savings time.
27291 Only return false for the case where the function isn't
27292 implemented for a plaform (read Windows).
27294 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
27296 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
27299 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
27301 * mempool.c (mono_mempool_alloc): only use g_malloc when
27302 absolutely necessary.
27304 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
27306 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
27308 * class.c (mono_class_vtable): use domain mempool to allocate vtable
27309 (mono_class_proxy_vtable): use domain mempool
27311 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
27313 * appdomain.h, appdomain.c: split initialization that requires the
27314 execution engine support into mono_runtime_init().
27316 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
27318 * class.c (mono_class_init): don't include vtable inside MonoClass
27319 to save some memory, gather some statistics.
27320 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
27322 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
27324 * icall.c: internalcall implementation for ValueType.Equals().
27326 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
27328 * object.c (mono_message_init): moved
27329 (mono_runtime_exec_main): new arch. independent impl.
27330 (mono_runtime_invoke_array): new method - like
27331 mono_runtime_invoke, but you can pass an array of objects.
27332 (mono_remoting_invoke): new arch. independent impl.
27333 (mono_message_invoke): new arch. independent impl.
27334 (mono_runtime_class_init): new arch. independent impl.
27335 (mono_runtime_object_init): new arch. independent impl.
27337 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
27339 * metadata.c, object.c, reflection.c: documented the exported
27342 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
27344 * icall.c: simpler code to pass the assembly builder data to corlib.
27345 Implement GetNestedTypes() internalcall.
27347 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
27349 * class.c: warn if a type can't be loaded.
27351 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
27353 * image.h: typedef MonoImageOpenStatus
27354 * types.h: removed unused file
27356 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
27358 * icall.c: Enum_ToObject accepts enum value arguments.
27360 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
27362 * class.c: move initialization of properties, events and nested
27363 classes, so that they happen for interfaces, too.
27365 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
27367 * icall.c: cleanup some ugly casts in Array_SetValue*.
27369 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
27371 * icall.c: the values array fro enums is of the correct type, now.
27372 Implement (correctly) getFullName instead of assQualifiedName for
27374 * reflection.h, reflection.c: added mono_type_get_name ().
27376 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
27378 * assembly.c, image.h: for each MonoImage, record from wich assembly
27380 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
27381 Make Type.Assembly work.
27383 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
27385 * debug-symfile.h: use char* instead of gpointer to avoid
27388 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
27390 * icall.c (ves_icall_InternalExecute): impl. FielSetter
27391 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
27393 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
27395 * icall.c (mono_message_init): impl. (code cleanup)
27396 (ves_icall_InternalExecute): impl. FieldGetter
27398 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
27399 defined we call all (non-static)methods through the vtable.
27401 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
27403 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
27404 finalizer even though the memory is still referenced (and the chunk of
27405 memory is not freed).
27407 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
27409 * assembly.c: fix brokeness.
27411 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
27413 * class.c: kill some warnings. Check explicit interface method
27414 implementation also without considering the namespace.
27415 Load also literal strings in static class data.
27417 2002-03-29 Miguel de Icaza <miguel@ximian.com>
27419 * assembly.c (default_assembly_name_resolver): Kill memory leak.
27420 (default_assembly_name_resolver): Make the resolver take the
27421 "base" directory where the assembly was originally defined, so we
27422 can load DLLs that are in the same directory as the assembly that
27423 is being referenced.
27425 2002-03-28 Dick Porter <dick@ximian.com>
27431 * unicode.c: Warning cleanups
27433 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
27435 * object.h, reflection.h: use the correct type instead of MonoObject.
27437 2002-03-28 Martin Baulig <martin@gnome.org>
27439 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
27440 (mono_debug_update_symbol_file): Initialize classes if necessary.
27442 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
27444 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
27445 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
27447 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
27449 * assembly.h: fix function prototype.
27450 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
27451 * mono-endian.h: use const cast.
27453 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
27455 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
27457 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
27459 * loader.c: don't assert when a typeref can't be loaded, give
27460 a chance to the runtime to trow an exception instead.
27461 * loader.h: fix warning.
27463 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
27465 * class.c (mono_class_proxy_vtable): added proxy support
27467 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
27469 * icall.c: removed last of PAL calls, added System.Environment
27470 * file-io.h, file-io.c: MonoIO implementation
27471 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
27473 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
27475 * appdomain.c: do not use the byte marker in ldstr table lookup.
27476 * debug-helpers.c: allow two ':' to separate class and method name.
27477 * object.c: allocate arrays bounds with the GC, too.
27478 * verify: add a few more checks.
27480 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
27482 * reflection.c: output also literal strings. Allocate parameter data
27483 with GC_malloc() (thanks, Martin, for catching this!).
27485 2002-03-26 Martin Baulig <martin@gnome.org>
27487 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
27488 include the `this' offset in the `param_offsets'.
27490 2002-03-25 Martin Baulig <martin@gnome.org>
27492 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
27493 mono_debug_get_class() function to get the classes. Added new
27494 relocation types for arrays and strings.
27495 (mono_debug_get_class): New static function to search in all
27496 referenced assemblies for a metadata token.
27498 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
27500 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
27502 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
27503 hold gc-allocated objects. Make the string heap a stream like the
27504 others. Removed duplicated code when writing stream info.
27505 Added asserts to catch possible buffer overflows. Set the sorted map
27506 for tables that need sorting. Added some documentation.
27508 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
27510 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
27511 for interned strings and vtables.
27513 2002-03-24 Martin Baulig <martin@gnome.org>
27515 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
27516 it in the array since it was created with g_slist_prepend().
27518 2002-03-24 Martin Baulig <martin@gnome.org>
27520 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
27521 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
27522 (mono_debug_method_from_token): Renamed to
27523 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
27524 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
27526 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
27529 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
27531 2002-03-24 Martin Baulig <martin@gnome.org>
27533 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
27534 (mono_debug_method_from_token): New func.
27536 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
27537 New interncall, calls mono_debug_local_type_from_signature().
27538 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
27539 calls mono_debug_method_from_token().
27541 2002-03-23 Martin Baulig <martin@gnome.org>
27543 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
27544 specifies the number of bytes to be converted, not the array size.
27545 Return the number of chars, not the number of bytes.
27546 (ves_icall_iconv_get_chars): The `byteCount' argument
27547 specifies the number of bytes to be converted, not the array size.
27549 2002-03-23 Martin Baulig <martin@gnome.org>
27551 * reflection.h (MonoReflectionSigHelper): New type.
27553 * reflection.c (mono_reflection_sighelper_get_signature_local),
27554 (mono_reflection_sighelper_get_signature_local): New functions.
27556 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
27557 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
27560 2002-03-23 Martin Baulig <martin@gnome.org>
27562 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
27563 is_writeable is set.
27564 (mono_raw_buffer_update): New function to write the modified map
27567 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
27569 * debug-symfile.c (mono_debug_update_symbol_file): Call
27570 mono_raw_buffer_update() when done writing.
27572 2002-03-23 Martin Baulig <martin@gnome.org>
27574 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
27576 * debug-symfile.c: Added support for arguments and local variables.
27578 2002-03-23 Dick Porter <dick@ximian.com>
27580 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
27581 protected by ifdefs, hence breaking the w32 build.
27583 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
27585 * object.c: implement is_interned() the right way.
27587 2002-03-21 Martin Baulig <martin@gnome.org>
27589 * debug-symfile.[ch]: New files to handle debugging information
27590 files. There's also support to dynamically update these symbol
27591 files to include machine dependent information.
27593 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
27595 * threads.c (mono_thread_create): new function to create thread
27598 2002-03-20 Martin Baulig <martin@gnome.org>
27600 * icall.c (ves_icall_InternalInvoke): Create a new object if the
27601 method is a constructor.
27602 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
27603 points to ves_icall_InternalInvoke().
27605 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
27607 * file-io.c: Flush shouldn't throw exceptions.
27609 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
27611 * file-io.c: FileStream flush support; FileSetLength now
27612 restores file pointer.
27614 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
27616 * class.c: set image for pointer classes.
27618 2002/03/19 Nick Drochak <ndrochak@gol.com>
27620 * sysmath.c: Forgot one.
27622 2002-03-18 Miguel de Icaza <miguel@ximian.com>
27624 * sysmath.c: Avoid redefining existing names.
27626 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
27628 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
27629 handled by runtime as icall rather than dllimport from libm.so
27630 * file-io.c, file-io.h: fixed handle argument type.
27632 2002-03-18 Dick Porter <dick@ximian.com>
27634 * reflection.c (mono_image_get_type_info): rename interface to
27635 iface, because of "#define interface struct" on windows.
27637 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
27639 * class.c, class.h: rename and export mono_ptr_class_get().
27640 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
27641 * reflection.c, reflection.h, icall.c: better/saner type name
27642 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
27645 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
27647 * class.c (mono_class_init): removed hardcoded GHC_SLOT
27649 * icall.c (ves_icall_InternalInvoke): impl.
27651 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
27653 * reflection.c: output the interface map table, too.
27655 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
27657 * class.c (class_compute_field_layout): separate computation of
27658 static field layout
27660 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
27662 * icall.c: added System.Buffer support.
27663 * file-io.c: moved file icalls from PAL to FileStream.
27665 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
27667 * icall.c (ves_icall_System_Object_GetHashCode): impl.
27669 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
27671 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
27673 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
27675 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
27677 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
27679 * debug-helpers.{c,h}: moved here from monograph some useful functions
27680 to locate a method by name/signature in a class or image. Included
27681 also a small and flexible IL disassembler.
27683 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
27685 * reflection.c: fixup tokens in methods with small header size, too.
27687 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
27689 * object.c (mono_string_to_utf8): remove assert(!error), instead
27692 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
27694 * icall.c: update to the new mono_Array_class_get interface.
27696 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
27698 * appdomain.c, object.c: Boehm-GC enable.
27699 * icall.c: make get_data_chunk() support split data requests.
27700 Ensure a class is initialized in more cases. Return only the first
27701 property found in GetProperties() or the compiler gets confused.
27702 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
27703 * reflection.h, reflection.c: add fixup mechanism for field and method
27704 tokens. Initialize assembly->typeref in a single place. Output
27705 properties after events. Support custom attributes for events, too.
27706 Typo fix for paramter custom attrs.
27708 2002-03-07 Martin Baulig <martin@gnome.org>
27710 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
27712 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
27714 * class.c (mono_array_class_get): fix. for multi. dim. arrays
27716 2002-03-06 Martin Baulig <martin@gnome.org>
27718 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
27719 non-zero lower bounds. See testcases #F10-#F13.
27721 2002-03-05 Martin Baulig <martin@gnome.org>
27723 * exception.c (mono_get_exception_argument_out_of_range): New exception.
27725 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
27726 ves_icall_System_Array_GetValue(), only calculate the absolute array position
27728 (ves_icall_System_Array_SetValue): Likewise.
27729 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
27730 as argument and does the actual work. This function is used when copying a
27731 multi-dimensional array.
27732 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
27733 now do all the widening conversions of value types.
27734 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
27736 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
27738 * class.c: remove some magic numbers and use the smbolic names,
27739 instead. Added init_events() to load event info at class init time.
27740 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
27741 and mono_metadata_methods_from_event().
27742 * reflection.h, reflection.c: added support for writing out the evnets
27743 related information.
27745 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
27747 * reflection.h, icall.c: use a different method (GetInterfaces)
27748 to gather interface info and add isbyref, isprimitive and
27749 ispointer to the ves_icall_get_type_info() return value.
27751 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
27753 * class.h: stared adding support for events.
27754 * icall.c: split find_members implementation. Added debug icall to get
27755 the address of an object.
27756 * reflection.c: handle TypeBuilders in mono_type_get_object().
27758 2002-03-01 Martin Baulig <martin@gnome.org>
27760 * icall.c (ves_icall_System_Array_GetLength): This must throw an
27761 ArgumentOutOfRangeException(), not an ArgumentException().
27762 (ves_icall_System_Array_GetLowerBound): Likewise.
27763 (ves_icall_System_Array_GetValue): Improved argument checking.
27764 (ves_icall_System_Array_SetValue): Improved argument checking.
27766 2002-03-01 Martin Baulig <martin@gnome.org>
27768 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
27769 called with invalid arguments rather than just dying with g_assert().
27770 (ves_icall_System_Array_SetValue): Likewise.
27771 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
27772 raise a NotImplementedException instead.
27773 (ves_icall_System_Array_GetLength): Added argument checking.
27774 (ves_icall_System_Array_GetLowerBound): Added argument checking.
27776 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
27778 * object.h (mono_assert): new macros mono_assert and
27779 mono_assert_not_reached
27781 2002-02-28 Martin Baulig <martin@gnome.org>
27783 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
27784 and "System::String::IsInterned" to "System::String::_IsInterned".
27786 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
27788 * icall.c: remove hacks for typebuilder. Added icall to create a
27789 modified type from a tybebuilder.
27790 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
27791 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
27792 to create a backing MonoClass for a TypeBuilder.
27794 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
27796 * class.c, class.h: more refactoring of class init.
27797 Export mono_class_setup_mono_type() and mono_class_setup_parent().
27799 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
27801 * marshal.c, marshal.h: start of marshaling interface.
27803 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
27805 * icall.c: fix order in assembly qualified name icall.
27807 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
27809 * class.c: do not free str, since we store it in the hash table.
27810 * reflection.h: add label field to MonoILExceptionInfo.
27811 * reflection.c: handle references to more than one assembly. Handle
27812 case when there isn't a module created in the assembly.
27814 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
27816 * class.c: Fix typo. Start refactoring of class init code.
27818 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
27820 * appdomain.c: exit with 1 on error.
27821 * class.c: we already have the name in MonoClassField.
27822 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
27823 MonoStreamHeader instead of an offset of image->raw_metadata.
27825 2002-02-26 Miguel de Icaza <miguel@ximian.com>
27827 * appdomain.c (mono_init): Be even more descriptive about the error.
27829 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
27831 * appdomain.c: give the user an informative message when corlib can't
27834 2002-02-26 Martin Baulig <martin@gnome.org>
27836 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
27837 New icall to get the time zone data.
27839 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
27841 * reflection.c: set virtual and raw size of section correctly.
27842 * threads.c: transfer domain information to newly created threads.
27844 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
27846 * class.c: when instancing a class in a domain, load the default
27847 vaules for static fields from the constant table. Fix System.Enum to
27849 * icall.c: implement Object::GetType() internalcall. Implemented
27850 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
27851 Fixed checking of binding flags in find_members().
27852 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
27853 * reflection.c: handle enumerations when writing to the constant
27854 table. Use a different object cache for types.
27857 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
27859 * object.c (mono_object_isinst): fix for arrays
27861 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
27863 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
27865 * object.c: don't use mprotect () and fix intern pool hash table
27866 lookup for big endian systems.
27868 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
27870 * icall.c: change type_is_subtype_of () signature.
27872 2002-02-21 Mark Crichton <crichton@gimp.org>
27874 * rand.c, rand.h: Added random number generator for
27875 System.Security.Cryptography classes.
27877 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
27879 * icall.c: Added System.Security.Cryptography calls.
27881 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
27883 * class.c, icall.c, metadata.c: better support for pointer types.
27884 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
27885 * reflection.c: Add support for getting custom attrs for properties
27886 and simplify some code.
27888 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
27890 * icall.c: change getToken () and add custom attribute GetBlob()helper
27892 * reflection.h: add custom attrs array to the reflection builder structures.
27893 * reflection.c: encode and emit custom attributes for all the relevant
27894 reflection objects. Cache fieldref and methodref tokens. Change
27895 mono_image_create_token() interface to take a MonoDynamicAssembly.
27896 More complete custom attributes decoder. Load custom attributes for
27897 Assembly, Field, Method and Constructor objects, too. Make the
27898 returned array an Attribute[] one, not object[]. Added
27899 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
27900 custom attribute constructor.
27902 2002-02-20 Dick Porter <dick@ximian.com>
27906 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
27907 problem code out for now).
27909 2002-02-19 Radek Doulik <rodo@ximian.com>
27911 * object.c (mono_ldstr): use hash table to avoid multiple swapping
27913 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
27915 * icall.c: register the GetCustomAttributes method.
27916 * object.c, object.h: add mono_string_new_len ().
27917 * reflection.h, reflection.c: added mono_runtime_invoke(),
27918 mono_install_runtime_invoke(). Added
27919 mono_reflection_get_custom_attrs () to load custom attributes and
27920 create the attribute objects.
27922 2002-02-19 Dick Porter <dick@ximian.com>
27923 * threads-dummy-types.c:
27924 * threads-dummy-types.h:
27927 * threads-pthread-types.c:
27928 * threads-pthread-types.h:
27929 * threads-pthread.c:
27930 * threads-pthread.h: Deleted obsolete files
27932 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
27934 * class.c (mono_class_vtable): runtime init the class when we
27935 allocate static class data.
27937 * icall.c (ves_icall_System_Array_SetValue): check for null values.
27939 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
27940 and String - but we will need generic marshalling support in the
27942 (mono_init): set the domain name in a ms compatible way
27944 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
27947 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
27949 * object.c (mono_array_clone): use alloca() instead of g_malloc
27952 * appdomain.c (mono_domain_unload): impl.
27954 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
27956 * appdomain.c, object.c: fix intern pool implementation.
27957 * class.c: fix alignment code.
27959 2002-02-16 Radek Doulik <rodo@ximian.com>
27961 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
27962 and s2 > s1, just copy lower bytes to be compatible with little
27963 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
27964 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
27966 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
27967 force big_endian to be 1 for big endian machines
27968 (ves_icall_iconv_new_decoder): ditto
27970 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
27972 * socket-io.c (convert_sockopt_level_and_name): If the system
27973 doesn't define SOL_IP or SOL_TCP, get them by hand using
27974 getprotobyname() and caching the values (because this could be a
27976 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
27977 Use the appropriate struct when the system does support it. Ie,
27978 not all systems have struct ip_mreqn so use struct ip_mreq when
27981 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
27983 * reflection.c: handle finally clauses.
27985 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
27987 * socket-io.c: use g_snprintf() instead of snprintf.
27989 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
27991 * reflection.c (mono_param_get_objects): Cast second argument to
27992 mono_method_get_param_names to a const char** to silence the
27995 * appdomain.c (mono_domain_assembly_open): Put parens around the
27996 truth statement in the for-loop.
27998 * unicode.c (iconv_convert): Got rid of a compiler warning about
27999 int i being unused when the system has a new iconv.
28000 (iconv_get_length): Same.
28002 * image.c (load_class_names): Cast the second argument to
28003 g_hash_table_insert() to char* to hush compiler warnings about the
28005 (mono_image_open): Same here.
28007 * socket-io.c: Don't conditionally include sys/filio.h or
28008 sys/sockio.h here anymore since we now get them from
28009 io-layer/io-layer.h
28010 (inet_pton): If the system doesn't support inet_aton, implement
28011 using inet_addr and also #define INADDR_NONE if it isn't defined
28014 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
28016 * metadata.c, metadata.h: added function to get packing and size info
28018 * reflection.h, reflection.c: handle field RVA data. Save info about
28019 the table layout if needed. Assign typedef indexes to all the types
28020 before dumping the info about them to avoid forward reference problems.
28022 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
28024 * socket-io.c (convert_sockopt_level_and_name): ifdef
28025 SO_ACCEPTCONN because it is not defined on my system (old debian)
28027 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
28029 * opcode.c: use stddef.h to get NULL.
28031 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
28033 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
28034 for FIONBIO, FIONREAD and SIOCATMARK.
28035 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
28036 define INADDR_NONE and besides, inet_addr() is deprecated and
28037 should not be used. Use inet_pton() instead - it also has the
28038 added bonus that it can easily handle IPv6 addresses as well.
28039 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
28041 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
28043 * decimal.c: remove _MSC_VER conditional.
28045 2002-02-13 Dick Porter <dick@ximian.com>
28048 * icall.c: Internal calls for Blocking, Select, Shutdown,
28049 GetSocketOption and SetSocketOption
28051 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28053 * assembly.cs: better resolver: use it instead of some kludgy
28056 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
28058 * reflection.c: the best way to speed-up the compiler is to avoid
28061 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
28063 * class.c (mono_class_vtable): changed the object layout
28064 (obj->vtable->class).
28065 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
28067 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
28069 * assembly.c: look for assemblies in the assembly dir, too.
28071 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
28073 * class.c: fix thinko in mono_class_from_type().
28075 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
28077 * exception.h, exception.c: added TypeLoadException.
28078 * object.h, object.c: added mono_array_clone ().
28079 * icall.c: handle throwOnError in AssemblyGetType().
28080 Added Array.Clone().
28081 * opcode.h, opcode.c: use a single value for the opcode val.
28082 Compile fix for non-gcc compilers.
28084 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
28086 * opcodes.c, opcodes.h: export interesting info about opcodes.
28088 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
28090 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
28093 * class.c (class_compute_field_layout): set element_class for enums
28094 (mono_class_create_from_typedef): set element_class for normal classes
28096 * icall.c (ves_icall_System_Enum_get_value): impl.
28098 * class.c (mono_class_create_from_typedef): do not set valuetype
28099 flag for System.ValueType and System.Enum
28101 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
28103 * unicode.c (iconv_convert): fix big endian problem.
28105 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
28107 * class.c: add asserts if we are ever going to scribble over memory.
28108 * socket-io.c: not all systems have AF_IRDA defined.
28110 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
28112 * class.c (class_compute_field_layout): do not consider static
28113 fields to compute alignment
28115 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
28117 * appdomain.c (mono_appdomain_get): impl.
28118 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
28120 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
28122 * icall.c: ignore "file://" prefix when loading an assembly.
28124 2002-01-23 Dick Porter <dick@ximian.com>
28128 * Makefile.am: Added socket support
28130 2002-01-23 Miguel de Icaza <miguel@ximian.com>
28132 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
28133 code back. This should return the assemblies that are loaded by
28134 the runtime on behalf of an application domain.
28136 The current implementation is still broken, it just returns every
28137 assembly loaded, but until we get real applications domain this
28140 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
28142 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
28145 2002-01-23 Miguel de Icaza <miguel@ximian.com>
28147 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
28148 the mono_class_from_name lookup.
28149 (ves_icall_get_parameter_info): ditto.
28150 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
28152 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
28154 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
28156 * class.c: load also nested classes on class init.
28157 System.ValueType instance methods gets passed boxed
28158 values, unless methods in derived classed that get a pointer to the
28160 * icall.c: use better name parsing code in GetType().
28161 * image.c, image.h: add mono_image_loaded ().
28162 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
28163 * reflection.c, reflection.h: added mono_reflection_parse_type().
28165 2002-01-22 Veronica De Santis <veron78@interfree.it>
28167 * icall.c : Added mapping of internal calls for Manual and Auto reset events
28168 * threads.c : Added the implementation of internal calls for events
28169 * threads.h : Added prototypes of internal calls for events
28171 2002-01-21 Radek Doulik <rodo@ximian.com>
28173 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
28175 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
28177 * class.c (mono_class_init): set min_align to 1 (instead of 0)
28178 (mono_class_value_size): use min_align
28180 2002-01-20 Dick Porter <dick@ximian.com>
28183 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
28184 so it compiles on w32.
28186 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
28188 * metadata.c (mono_type_stack_size): impl.
28190 * class.c (mono_class_get_field): impl. memberref token
28192 2002-01-16 Veronica De Santis <veron78@@interfree.it>
28194 * icall.h : Added the internal calls mapping for CreateMutex_internal
28195 and ReleaseMutex_internal.
28196 * threads.h : Added the prototype of mutexes internal calls.
28197 * threads.c : Added the implementations of mutexes internal calls.
28199 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
28201 * metaparse.h: removed unused file.
28202 * reflection.c, reflection.h: added stream_data_align () function
28203 to align data in streams and keep stream aligned. Add support for
28204 exception support in method headers.
28206 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
28208 * unicode.c: make iconv_convert () return the number of bytess written
28209 in the output buffer.
28211 2002-01-15 Dick Porter <dick@ximian.com>
28212 * threads.c: Make the runtime's idea of infinite timeouts coincide
28213 with the class library's
28215 Fix a particularly egregious bug in mono_thread_cleanup(). That
28216 code was so utterly bogus it must have been written on a Monday.
28218 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
28220 * reflection.h: add subtypes field to TypeBuilder.
28221 * reflection.c: encode constants for literal fields.
28222 Handle subtypes. Fix user string token (and add a zero byte)
28225 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
28227 * class.c (mono_class_init): bug fix: assign slot numbers for
28230 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
28232 * reflection.c: don't try to output a code RVA for abstract methods.
28233 Small fixes for method header format. Output parameter info to the
28234 ParamDef table. Save method overriding info to MethodImpl table.
28235 Fix property support. Allow typedef.extends to be a type in the
28237 * verify.c: fix off-by-one error.
28239 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
28241 * class.c: fix mono_class_from_mono_type () for szarray types.
28242 Remove unused cache check in mono_class_from_type_spec().
28243 * icall.c: *type_from_name () functions handle simple arrays and byref.
28244 * reflection.c: handle byref and szarray types. Handle methods without
28245 body (gets P/Invoke compilation working). Handle types and fields in
28247 * reflection.h: add rank to MonoTypeInfo.
28249 2002-01-10 Dick Porter <dick@ximian.com>
28251 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
28254 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
28256 * icall.c: initialize class in type_from_handle ().
28257 Loop also in parent classes for get_method ().
28258 * reflection.c: properly encode class and valuetype types.
28259 Start on encoding TypeBuilder types. Handle fieldrefs.
28260 Use correct length when registering a user string.
28261 Handle ConstructorBuilder and MonoMethod in get_token ().
28262 Make mono_type_get_object () aware of cached types.
28263 * object.c: back out change to mono_string_new ().
28265 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
28266 * object.c: mono_string_new should return a NULL when the string
28267 passed in is NULL -- not try to deference it.
28269 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
28271 * icall.c: hack to make IsSubType work for TypeBuilders.
28272 * reflection.c: emit constructors before methods.
28273 Retrieve param names in mono_param_get_objects().
28275 2002/01/05 Nick Drochak <ndrochak@gol.com>
28277 * Makefile.am: fix list of headers and sources so automake 1.5
28278 doesn't complain. Removed \# at end of list.
28280 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
28282 * reflection.c: get token for a method ref. Set return type of
28283 constructor to void.
28284 * loader.c: debug message.
28285 * class.c: typo fix.
28287 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
28289 * icall.c: fix array init with rank > 1. FindMembers
28290 loops in parent class as well.
28291 * image.c: do not insert nested types in name cache.
28292 * reflection.c: warning fix.
28293 * reflection.h: add override method (for interface impl).
28295 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
28297 * metadata.c: fix customattr decoding.
28299 2001-12-21 Miguel de Icaza <miguel@ximian.com>
28301 * rawbuffer.cs: Added native Win32 implementation, avoids using
28302 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
28304 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
28306 * class.c: make the low-level routines handle the cache.
28308 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
28310 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
28312 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
28314 * class.c: fix mono_array_element_size() for objects.
28315 * class.h, class.c: add properties to MonoClass and load them
28317 * icall.c: check with isinst() when assigning a value to an array
28318 instead of requiring the classes to match exactly.
28319 Implemented icall for System.Type::GetType().
28320 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
28321 enums. Handle bindingflags when looking for methods and fields.
28322 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
28323 and mono_metadata_methods_from_property().
28324 * reflection.h, reflection.c: added structures for propreties,
28325 parameters and enums. Implemented mono_property_get_object() and
28326 mono_param_get_objects().
28328 2001-12-18 Dick Porter <dick@ximian.com>
28330 * file-io.c: Use mono_string_to_utf16() instead of
28331 mono_string_chars()
28333 * object.c: Added mono_string_to_utf16(), which copies the non
28334 NULL-terminated MonoString into a new double-null-terminated
28337 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
28339 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
28341 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
28343 * file-io.c: raise exceptions if handle is invalid.
28345 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
28347 * assembly.c: yet another check for mscorlib.
28348 * class.c, class.h: load nesting info for classes.
28349 * icall.c: many new functions to support the Reflection classes.
28350 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
28351 * reflection.h, reflection.c: mono_image_create_token(),
28352 mono_assembly_get_object(), mono_type_get_object(),
28353 mono_method_get_object(), mono_field_get_object(): methods to return
28354 objects that parallel the C representation of assemblies, types,
28357 2001-12-11 Dick Porter <dick@ximian.com>
28360 * file-io.c: Internal calls for file IO.
28362 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
28364 * tabledefs.h: missing FileAttributes.
28365 * verify.h, verify.c: use is_valid_string () to simplify and check for
28366 valid strings more correctly. Fix warnings and speeling.
28367 Check more tables: Filed, File, ModuleRef, StandAloneSig.
28368 Check code: branches, maxstack, method calls.
28370 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
28372 * object.c (mono_object_allocate): removed static, so that the jit
28373 can allocate value types.
28375 * icall.c (ves_icall_System_DateTime_GetNow): impl.
28377 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
28379 * class.c: init enum types right away and register the
28380 token->MonoClass map in mono_class_create_from_typedef ().
28381 * verify.h, verify.c: first cut of the verifier.
28382 * pedump.c: add --verify switch to verify metadata tables.
28383 * tabledefs.h: add some missing enums.
28385 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
28387 * class.c (mono_install_runtime_class_init): impl.
28388 (mono_class_init): renamed mono_class_metadata_init to
28389 mono_class_init, also removed the metadata_inited flag
28391 * object.c (mono_object_isinst): use faster algorithm
28393 2001-11-30 Radek Doulik <rodo@ximian.com>
28395 * mono-endian.h: reverted last change
28396 added function prototypes
28398 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
28399 add mono-endian.c back
28401 * mono-endian.c: returned back, as Paolo pointed out, it's needed
28402 for unaligned access, I've mistaked it with endianess. I am
28404 (mono_read16): fix reverted endianess
28405 (mono_read64): ditto
28406 (mono_read32): ditto
28408 2001-11-30 Dick Porter <dick@ximian.com>
28410 * exception.c: Implement mono_exception_from_name()
28412 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
28414 * metadata.h, metadata.c: remove params_size and locals_size and their
28415 calculation from the metadata code: they are only usefult to the
28418 2001-11-29 Radek Doulik <rodo@ximian.com>
28420 * object.c (mono_ldstr): swap bytes here, it's probably not the
28421 best place, but works for me now, I'll redo it once I know mono
28422 better, also note that I add PROT_WRITE and don't reset back, also
28423 note that it's only affects big endians, so x86 should be OK
28425 * mono-endian.h (read16): use just glib macros for both endians
28427 * mono-endian.c: removed as glib macros are used in in
28428 mono-endian.h so we don't need to care about endianess for read
28429 macros as glib does that for us already
28431 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
28433 * class.h, class.h: take minimum alignment into consideration so
28434 that the fields of a class remain aligned also when in an array.
28436 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
28438 * loader.h, loader.c: add mono_method_get_param_names().
28439 * class.c: 0-init class fields.
28441 2001-11-26 Dick Porter <dick@ximian.com>
28445 * threads.c: New file that handles System.Threading on all platforms
28448 * object.h: Remove the synchronisation struct from MonoObject,
28449 replace it with a pointer that gets initialised on demand
28451 * Makefile.am: Replace all the system-specific threading code with
28452 a single file that uses the new wrapper library
28454 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
28456 * class.c, class.h: add mono_install_trampoline() so that the runtime
28457 can register a function to create a trampoline: removes the ugly
28458 requirement that a runtime needed to export arch_create_jit_trampoline.
28459 * object.h, object.c: added mono_install_handler() so that the runtime
28460 can install an handler for exceptions generated in C code (with
28461 mono_raise_exception()). Added C struct for System.Delegate.
28462 * pedump.c: removed arch_create_jit_trampoline.
28463 * reflection.c: some cleanups to allow registering user strings and
28464 later getting a token for methodrefs and fieldrefs before the assembly
28466 * row-indexes.h: updates and fixes from the new ECMA specs.
28468 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
28470 * class.h, class.c: add enum_basetype field to MonoClass.
28471 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
28472 to get index in the constant table reated to a field, param or
28474 * reflection.h, reflection.c: handle constructors. Set public-key and
28475 version number of the built assembly to 0.
28476 * row-indexes.h: update from new ECMA spec.
28478 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
28480 * class.h, class.c: add a max_interface_id to MonoClass.
28481 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
28482 since it's used to do that. Added mono_type_type_from_obj().
28483 Make GetType() return NULL instead of segfaulting if the type was not
28484 found. Handle simple arrays in assQualifiedName.
28485 * object.h: add a struct to represent an Exception.
28486 * reflection.c: output call convention in method signature.
28487 Add code to support P/Invoke methods and fixed offsets for fields.
28489 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
28491 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
28493 * icall.c: use mono_array_addr instead of array->vector: fixes the
28494 reflection image writing.
28495 * reflection.c: init call convention byte to 0 in method signature.
28496 Encode the property signature. Don't output property-related methods
28497 twice. Really process the properties for a type (don't cast a field to
28498 a property, my mom always told me that).
28499 Fix 64 bit issues in pointer alignment in a different and more
28502 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
28504 * loader.h: Removed type class from MonoDefaults, added monotype
28506 * loader.c: Loaded MonoType, removed loading of Type
28508 * icall.c (my_mono_new_object): Now returns a System.MonoType,
28509 and fills in System.Type._impl with a RuntimeTypeHandle rather
28510 than the actual MonoClass *
28512 (ves_icall_type_from_handle): change from type_class to
28515 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
28518 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
28521 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
28523 (ves_icall_System_Reflection_Assembly_GetType): implemented
28525 (ves_icall_System_MonoType_assQualifiedName): implemented
28527 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
28529 2001-11-09 Miguel de Icaza <miguel@ximian.com>
28531 * assembly.c (mono_assembly_open): Implement a cache for the
28534 (mono_assembly_close): only destroy the assembly when the last
28537 2001-11-09 Dick Porter <dick@ximian.com>
28539 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
28541 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
28543 * class.c (mono_class_metadata_init): bug fix: compute the right slot
28545 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
28547 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
28548 from Martin Weindel.
28549 * object.h: add mono_string_chars ().
28551 2001-11-07 Miguel de Icaza <miguel@ximian.com>
28553 * reflection.c (build_compressed_metadata): Eliminates warnings
28554 and uses 64-bit clean code.
28556 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
28557 (mono_type_equal): Change signature to eliminate warnings.
28559 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
28561 * icall.c, loader.c: remove the internalcall array constructors.
28562 Changes to match the new MonoArray structure.
28563 * object.h, object.c: an array object doesn't allocate an extra
28564 vector. Add mono_array_new_full () to create jagged arrays easily.
28566 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
28568 * metadata.h, metadata.c: add mono_metadata_field_info () to
28569 retreive all the info about a field from vairous tables.
28570 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
28571 * class.h, class.c: augment MonoClassField with more info.
28572 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
28573 policy and load a field's RVA if needed.
28575 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
28577 * class.c (mono_class_metadata_init): create a trampoline for all
28578 virtual functions instead of actually compiling them.
28580 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
28582 * class.h, class.c: include name in MonoClassField.
28583 * class.c: fix fundamental type of System.Object and System.String.
28584 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
28586 * icall.c: remove internalcalls for the Reflection stuff that is now
28588 * loader.c: mono_field_from_memberref () implementation.
28589 * mono-endian.c: thinko (s/struct/union/g).
28590 * object.c, object.h: make the mono_string_* prototypes actually use
28591 MonoString instead of MonoObject.
28592 * reflection.c, reflection.h: updates for changes in the reflection
28593 code in corlib: we use C structures that map to the actual C# classes.
28594 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
28595 fat method header if needed and use the info from the ILGenerator for
28596 methods. Handle fields in types. Misc fixes.
28598 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
28600 * class.c (mono_class_metadata_init): bug fix: always allocate
28601 space for static class data
28603 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
28605 * class.c (mono_compute_relative_numbering): use relative
28606 numbering to support fast runtime type checks.
28608 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
28610 * class.c (mono_class_create_from_typeref): added debugging output
28611 to print class name when MonoDummy is returned instead of real class
28613 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
28615 * class.c (mono_class_metadata_init): interface offset table now
28616 contains pointers into the vtable - this is more efficient for the jit
28618 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
28620 * class.c (mono_class_metadata_init): use a temporary vtable (the
28621 old algorithm only worked for the interpreter, but not for the jit)
28623 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
28625 * loader.c (method_from_memberref): use mono_class_get to get the
28626 class of an array instead of using System.Array directly.
28627 (mono_get_method): also add MEMBERREF methods to the method cache
28628 which usefull for arrays.
28630 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
28632 * pedump.c (arch_compile_method): added to compute vtable entry
28634 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
28635 number of interfaces.
28637 * class.h: merged MonoArrayClass into MonoClass
28639 * class.c (mono_class_create_from_typedef): compute the vtable size and
28640 allocate space to include the vtable inside MonoClass
28641 (mono_class_metadata_init): initialize the vtable
28643 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
28645 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
28646 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
28647 * image.c: endian fixes by Laurent Rioux.
28648 * object.h, object.c: rename MonoStringObject to MonoString and
28649 MonoArrayObject to MonoArray. Change some function names to conform to
28650 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
28651 guint16* as first argument, so don't use char*.
28652 Provide macros to do the interesting things on arrays in a portable way.
28653 * threads-pthread.c: updates for the API changes and #include <sched.h>
28654 (required for sched_yield()).
28655 * icall.c: updates for the API changes above.
28656 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
28657 platforms that need them.
28659 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
28661 * class.c: set the correct type for all the fundamental
28662 type when loading the class.
28664 2001-10-05 Dick Porter <dick@ximian.com>
28666 * threads-pthread.c (pthread_mutex_timedlock): Simple
28667 compatibility version for C libraries that lack this call.
28669 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
28671 * class.c: MonoTypes stored in MonoClass are stored as
28672 fundamental MonoTypes when the class represents a
28673 fundamental type (System.Int32, ...).
28674 The TypeHandle return by ldtoken is a MonoType*.
28675 * icall.c: ves_icall_get_data_chunk () write out all the
28676 PE/COFF stuff. Implement ves_icall_define_method (),
28677 ves_icall_set_method_body (), ves_icall_type_from_handle ().
28678 * image.c: properly skip unknown streams.
28679 * loader.h, loader.c: add type_class to mono_defaults.
28680 * metadata.c, metadata.h: export compute_size () as
28681 mono_metadata_compute_size () with a better interface.
28682 Typo and C&P fixes.
28683 * pedump.c: don't try to print the entry point RVA if there is no entry point.
28684 * reflection.c, reflection.h: many cleanups, fixes, output method
28685 signatures and headers, typedef and typeref info, compress the metadata
28686 tables, output all the heap streams, cli header etc.
28687 * row-indexes.h: typo fixes.
28689 2001-10-04 Dick Porter <dick@ximian.com>
28691 * object.h: Add a synchronisation mutex struct to MonoObject
28693 * object.c (mono_new_object): Initialise the object
28694 synchronisation mutexes
28696 * icall.c: System.Threading.Monitor internal calls
28698 * threads-pthread.h:
28699 * threads-pthread.c: System.Threading.Monitor internal calls
28701 * threads-types.h: New file, includes the system-specific thread
28704 * threads-pthread-types.h:
28705 * threads-pthread-types.c: New files, handle pthread-specific
28706 synchronisation types
28708 * threads-dummy-types.h:
28709 * threads-dummy-types.c: New files of dummy support for
28710 thread-specific types
28714 * pedump.c: include mono-endian.h not endian.h
28716 * Makefile.am: More threads files.
28717 Name mono-endian.h not endian.h
28719 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
28721 * Makefile.am, reflection.h, reflection.c: move here the reflection related
28722 stuff and implement a few more bits.
28723 * icall.c: a field needs to be dereferenced twice. Do not use the same
28724 name for two variables in the same scope.
28725 * image.c, image.h: cleanups.
28727 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
28729 * class.c (mono_class_metadata_init): bug fix: compute the right size
28731 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
28733 * icall.c: implemented some of the Reflection internalcalls.
28734 * image.c, image.h: start writing out the PE/COFF image.
28735 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
28736 that does the reverse than decode_blob_size ().
28737 * object.c: use mono_metadata_encode_value (). Move here
28738 temporary implementation of mono_string_to_utf8 ().
28739 * rawbuffer.c: make malloc_map static.
28741 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
28743 * metadata.c: fix type comparison for arrays.
28744 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
28745 Added a couple of new classes to monodefaults.
28746 * icall.c: added a couple of Reflection-related internalcalls.
28747 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
28748 Added a byval_arg MonoType to MonoClass.
28750 2001-09-28 Dick Porter <dick@ximian.com>
28753 * threads-pthread.h:
28754 * threads-pthread.c: Implemented internal calls for
28755 LocalDataStoreSlot operations. Applied mutexes around all shared
28756 data. Reworked the thread creation and Start() operations to
28757 avoid a race condition.
28760 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
28762 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
28764 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
28766 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
28768 * class.c, loader.c: warn and return NULL instead of erroring out.
28769 * icall.c: added System.AppDomain::getCurDomain().
28770 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
28772 2001-09-25 Dick Porter <dick@ximian.com>
28774 * threads-pthread.h:
28775 * threads-pthread.c: Implemented timed thread joining and added
28776 System.Threading.Thread::Join_internal internal call
28778 * icall.c: Added System.Threading.Thread::Join_internal internal call
28781 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
28783 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
28785 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
28786 mono_string_intern () to implement the semantics of the ldstr opcode
28787 and the interning of System.Strings.
28788 * icall.c: provide hooks to make String::IsIntern and String::Intern
28791 2001-09-23 Dick Porter <dick@ximian.com>
28794 * threads-dummy.h: New files of dummy threading routines
28796 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
28797 support code based on system specifics
28799 Rename PTHREAD_LIBS to THREAD_LIBS
28801 2001-09-23 Dick Porter <dick@ximian.com>
28803 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
28804 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
28806 (mono_thread_init): Set up a Thread object instance to return when
28807 the main thread calls Thread.CurrentThread
28808 (mono_thread_cleanup): Wait for all subthreads to exit
28810 * icall.c: New internal calls for System.Threading.Thread::Sleep
28811 (including Schedule) and CurrentThread
28813 * threads.h: New file, to insulate thread-specific stuff from the
28816 2001-09-21 Dick Porter <dick@ximian.com>
28818 * threads-pthread.h:
28819 * threads-pthread.c: New file, for handling pthreads-style
28820 threading support. Start() now starts a new thread and executes
28821 the ThreadStart delegate instance.
28823 * icall.c: Added the internalcall for
28824 System.Threading.Thread::Start_internal
28826 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
28828 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
28830 * loader.c: work around the different signatures for delegates
28831 constructors csc generates in compiled code vs the ones compiled in mscorlib.
28833 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
28835 * class.h, class.c: add mono_class_get_field_from_name ().
28836 * *: Fix C comments and other ANSI C issues.
28838 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
28840 * endian.h, assembly.c: fix some endianness issues.
28842 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
28844 * loader.h, load.c: add delegate_class to mono_defaults.
28845 Handle runtime provided methods in mono_get_method ().
28847 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
28849 * loader.c (mono_get_method): use pinvoke for internal call
28851 * icall.c: use pinvoke for internal call
28853 * loader.c (method_from_memberref): set the method name
28855 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
28857 * metadata.c: help the compiler generate better code for
28858 mono_class_from_mono_type ().
28860 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
28862 * class.c (mono_class_metadata_init): delayed computing of the
28863 class size to mono_class_metadata_init ()
28865 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
28867 * class.c, class.h: add an interfaces member to MonoClass.
28868 * image.c, image.h: add assembly_name field to MonoImage
28869 from the assembly table.
28870 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
28872 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
28874 * class.c: Handle Array in mono_class_from_mono_type ().
28875 * metadata.c, pedump.c: some endian fixes.
28877 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
28879 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
28880 * metadata.c: fix small problem introduced with the latest commit.
28882 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
28884 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
28885 We don't need a MonoMetadata pointer anymore to compare signatures in
28886 mono_metadata_signature_equal (), update callers.
28887 Reduced memory usage an number of allocations for MonoMethodHeader and
28888 MonoMethodSignature.
28890 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
28892 * metadata.c: added compare for szarray.
28894 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
28896 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
28897 and add a couple more types to it and mono_defaults. Give an hint on
28898 classes that need implementing in our corlib and are referenced
28901 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
28903 * class.h, class.c: keep track if a class is also an Enum.
28904 * loader.c: Implement a couple more types for use in libffi
28905 marshalling. Gives better diagnostics when failing to dlopen
28906 a library. Set method->klass for P/Invoke methods, too.
28908 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
28910 * class.c, class.h: add a MonoType this_arg to MonoClass that
28911 represents a pointer to an object of the class' type that
28912 can be used by the interpreter and later the type cache.
28913 Add best guess alignment info for valuetype objects.
28915 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
28917 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
28918 into MonoType: one less level of indirection and allocation and
28919 simplifies quite a bit of code. Added cache for MonoTypes that are
28920 used frequently, so that we don't need to allocate them all the time.
28922 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
28924 * class.c (mono_class_create_from_typedef): System.Enum is also a
28925 value type, although it does not derive from System.ValueType
28926 (maybe a bug in the ms compiler?)
28928 * metadata.c (mono_type_size): return the right size for value types
28930 * loader.c (mono_get_method): only initialize method header if not abstract
28932 * class.c (mono_class_from_mono_type): use mono_default values.
28934 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
28936 * *: use MonoClass pointers instead of <type_tokens>
28938 * class.h: new flag: metadata_inited.
28940 * class.c (mono_class_metadata_init): impl.
28941 (mono_class_instance_size): impl.
28942 (mono_class_data_size): impl.
28944 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
28946 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
28947 MonoClass now has the name and name_space fields.
28948 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
28949 mono_get_method () takes and optional MonoClass as argument.
28950 Removed mono_typedef_from_name() and added mono_class_token_from_name()
28951 instead that takes advantage of a map from class names to typedef
28952 tokens in MonoImage.
28954 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
28956 * metadata.c: zero is not a valid alignment boundary.
28957 Merge MONO_TYPE_VOID in default decoding code.
28959 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
28961 * image.h: merged MonoMetadata into MonoImage
28963 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
28964 identify the type of elements.
28966 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
28968 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
28969 * cil-coff.h: split MonoMSDOSHeader and add size info.
28970 * image.c: add some consistency checks.
28971 * metadata.c: fix row size computation: one programmer
28972 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
28973 add explanation for the locator routine.
28974 Fix decoding of size in method header.
28976 2001-08-20 Miguel de Icaza <miguel@ximian.com>
28978 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
28979 (g_concat_dir_and_file): Bring g_concat_dir_and_file
28980 function from gnome-libs. This uses the right path separator
28981 based on the OS, and also works around a bug in some systems where
28982 a double slash is not allowed.
28983 (default_assembly_name_resolver): Use g_concat_dir_and_file
28984 (mono_assembly_open): ditto.
28986 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
28988 * metadata.c (mono_metadata_signature_equal): impl.
28990 * *: void is now a realy MonoType (instead of using NULL)
28992 * metadata.c (do_mono_metadata_parse_type): use
28993 mono_metadata_parse_type to parse void value.
28995 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
28997 * metadata.c, metadata.h: in the signature and method header store
28998 only the space required for holding the loca vars and incoming arguments.
29000 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
29002 * metadata.c (do_mono_metadata_parse_type): treat void like any
29003 other type (instead of assigning NULL);
29005 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
29007 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
29009 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
29011 * image.c (do_mono_image_open): added a cache for arrays.
29013 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
29015 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
29016 decode a single column from a row in a metadata table and changes
29017 to take advantage of it in the typedef locator (gives a nice speed up).
29018 Store offset info for function params.
29020 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
29022 * image.h (MONO_IMAGE_IS_CORLIB): removed
29024 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
29026 * assembly.c: how could mono_assembly_close () had ever worked?
29027 * metadata.c, metadata.h: provide offset info for local vars.
29028 Implement mono_type_size () to take care of alignment as well
29029 as size (it was mono_field_type_size in cli/class.c before).
29031 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
29033 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
29035 * assembly.h (CORLIB_NAME): set to corlib.dll
29037 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
29039 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
29041 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
29042 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
29043 tokentype.h: massive namespace cleanup.
29045 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
29047 * metadata.h, metadata.c: decode exception clauses when parsing method header.
29049 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
29051 * metadata.c (mono_metadata_free_type): added check for type !=
29052 NULL (void) before calling mono_metadata_free_type()
29054 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
29056 * metadata.h, row_indexes.h: added header with enumerations to use
29057 to index in the columns from tables in metadata and to decode coded
29058 tokens: we should start using this instead of embedding magic numbers
29061 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
29063 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
29064 Move metadata_t info from cli_image_info_t to MonoImage, where
29065 it's easily accessible. Changed all the uses accordingly.
29066 Added the method and class caches to MonoImage.
29067 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
29068 and mono_metadata_decode_value () signature to be more consistent
29069 with the other parse functions (and simplify code). Taken advantage
29070 of zero-length array allocation with GCC. Removed reduntant (and
29071 wrong) MonoFieldType struct and use MonoParam instead. Changed
29072 mono_metadata_parse_field_type () to use common code for parsing.
29073 Added mono_metadata_typedef_from_field () and
29074 mono_metadata_typedef_from_method () to lookup a typedef index from a
29075 field or method token.
29076 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
29078 2001-07-23 Miguel de Icaza <miguel@ximian.com>
29080 * metadata.c (mono_metadata_parse_field_type): Implement.
29081 (do_mono_metadata_parse_type): Split engine from
29082 mono_metadata_parse_type, so that we can create smaller structures
29083 for things that just have one pointer to the MonoType (look at
29086 2001-07-20 Miguel de Icaza <miguel@ximian.com>
29088 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
29089 as Jan Gray found out, it is incorrect.
29091 2001-07-18 Miguel de Icaza <miguel@ximian.com>
29093 * assembly.c: Implement asssembly loading. This loads an image
29094 and loads all the referenced assemblies. Come to think of it, we
29095 could always do lazy loading of the assemblies.
29097 * image.c (mono_image_open): Keep loaded images in a hashtable.
29099 * image.h (MonoImage): Add reference count.
29101 2001-07-17 Miguel de Icaza <miguel@ximian.com>
29103 * assembly.c (mono_assembly_open): Keep track of the file name in
29104 case the assembly has no ASSEMBLY table.
29106 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
29109 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
29111 * metadata.c, metadata.h: decode local vars in method header
29112 parse function. Change callers accordingly.
29114 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
29116 * metadata.h, cil-coff.h: protect against multiple inclusion.
29117 Added some new structures to hold information decoded from metadata:
29118 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
29119 and relevant decoding/free functions.
29120 * metadata.c: implement decoding functions. Add warning for out of bounds
29121 index in mono_metadata_locate(). Implement mono_get_method () to retreive
29122 all the info about a method signature and invocation. Remove check on
29123 uninitialized local var in parse_mh() and fix memory leak.
29125 2001-07-12 Miguel de Icaza <miguel@ximian.com>
29127 * metadata.h: More macros.
29129 * tokentype.h: New file.
29131 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
29133 * assembly.c: added a consistency check and initialize
29134 some structures with g_new0().
29135 * metadata.c: fixed a couple more bugs in table size computation
29136 and add other checks for out-of bound access to metadata.
29138 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
29140 * metatada.c: fix bugs computing table sizes. Spew a
29141 warning when index in string heap is out of bounds.
29143 2001-07-04 Miguel de Icaza <miguel@ximian.com>
29145 * metadata.h: Add a couple of macros to manipulate tokens.
29147 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
29149 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
29150 cli_section_tables).
29152 2001-07-01 Miguel de Icaza <miguel@ximian.com>
29154 * metadata.c (mono_metadata_user_string): New function, provides
29155 access to the UserString heap.
29157 2001-06-27 Miguel de Icaza <miguel@ximian.com>
29159 * metadata.c: Add inline documentation.
29161 2001-06-26 Miguel de Icaza <miguel@ximian.com>
29163 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
29166 2001-06-22 Miguel de Icaza <miguel@ximian.com>
29168 * typeattr.h: New file, TypeAttribute flags.
29170 2001-06-21 Miguel de Icaza <miguel@ximian.com>
29172 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
29173 mono_assembly_ensure_section): Section loading code.
29174 (load_section_tables): Load the sections.
29176 * mono/metadata/metadata.c (mono_metadata_locate_token,
29177 mono_metadata_locate): Functions to locate the information
29178 definition given a token or a table and an index.
29179 (mono_metadata_compute_table_bases): New.
29180 (compute_size): New function to compute the sizes of the various
29183 * mono/metadata/metadata.h: Finish listing the different index
29186 * mono/metadata/pedump.c: Improve to dump new information.
29188 2001-06-19 Miguel de Icaza <miguel@ximian.com>
29190 * mono/metadata/metadata.c: Entered all the tables matching
29193 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2